src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java

Print this page




 639         return CInputMethod.mapInputMethodHighlight(highlight);
 640     }
 641 
 642     /**
 643      * Returns key modifiers used by Swing to set up a focus accelerator key stroke.
 644      */
 645     @Override
 646     public int getFocusAcceleratorKeyMask() {
 647         return InputEvent.CTRL_MASK | InputEvent.ALT_MASK;
 648     }
 649 
 650     /**
 651      * Tests whether specified key modifiers mask can be used to enter a printable
 652      * character.
 653      */
 654     @Override
 655     public boolean isPrintableCharacterModifiersMask(int mods) {
 656         return ((mods & (InputEvent.META_MASK | InputEvent.CTRL_MASK)) == 0);
 657     }
 658 








 659     // Extends PeerEvent because we want to pass long an ObjC mediator object and because we want these events to be posted early
 660     // Typically, rather than relying on the notifier to call notifyAll(), we use the mediator to stop the runloop
 661     public static class CPeerEvent extends PeerEvent {
 662         private long _mediator = 0;
 663 
 664         public CPeerEvent(Runnable runnable, long mediator) {
 665             super(Toolkit.getDefaultToolkit(), runnable, null, true, 0);
 666             _mediator = mediator;
 667         }
 668 
 669         public void dispatch() {
 670             try {
 671                 super.dispatch();
 672             } finally {
 673                 if (_mediator != 0) {
 674                     LWCToolkit.stopAWTRunLoop(_mediator);
 675                 }
 676             }
 677         }
 678     }




 639         return CInputMethod.mapInputMethodHighlight(highlight);
 640     }
 641 
 642     /**
 643      * Returns key modifiers used by Swing to set up a focus accelerator key stroke.
 644      */
 645     @Override
 646     public int getFocusAcceleratorKeyMask() {
 647         return InputEvent.CTRL_MASK | InputEvent.ALT_MASK;
 648     }
 649 
 650     /**
 651      * Tests whether specified key modifiers mask can be used to enter a printable
 652      * character.
 653      */
 654     @Override
 655     public boolean isPrintableCharacterModifiersMask(int mods) {
 656         return ((mods & (InputEvent.META_MASK | InputEvent.CTRL_MASK)) == 0);
 657     }
 658 
 659     /**
 660      * Returns whether popup is allowed to be shown above the task bar.
 661      */
 662     @Override
 663     public boolean canPopupOverlapTaskBar() {
 664         return false;
 665     }
 666 
 667     // Extends PeerEvent because we want to pass long an ObjC mediator object and because we want these events to be posted early
 668     // Typically, rather than relying on the notifier to call notifyAll(), we use the mediator to stop the runloop
 669     public static class CPeerEvent extends PeerEvent {
 670         private long _mediator = 0;
 671 
 672         public CPeerEvent(Runnable runnable, long mediator) {
 673             super(Toolkit.getDefaultToolkit(), runnable, null, true, 0);
 674             _mediator = mediator;
 675         }
 676 
 677         public void dispatch() {
 678             try {
 679                 super.dispatch();
 680             } finally {
 681                 if (_mediator != 0) {
 682                     LWCToolkit.stopAWTRunLoop(_mediator);
 683                 }
 684             }
 685         }
 686     }