< prev index next >

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

Print this page




 498         return true;
 499     }
 500 
 501     @Override
 502     public boolean isFrameStateSupported(int state) throws HeadlessException {
 503         switch (state) {
 504             case Frame.NORMAL:
 505             case Frame.ICONIFIED:
 506             case Frame.MAXIMIZED_BOTH:
 507                 return true;
 508             default:
 509                 return false;
 510         }
 511     }
 512 
 513     /**
 514      * Determines which modifier key is the appropriate accelerator
 515      * key for menu shortcuts.
 516      * <p>
 517      * Menu shortcuts, which are embodied in the
 518      * <code>MenuShortcut</code> class, are handled by the
 519      * <code>MenuBar</code> class.
 520      * <p>
 521      * By default, this method returns <code>Event.CTRL_MASK</code>.
 522      * Toolkit implementations should override this method if the
 523      * <b>Control</b> key isn't the correct key for accelerators.
 524      * @return    the modifier mask on the <code>Event</code> class
 525      *                 that is used for menu shortcuts on this toolkit.
 526      * @see       java.awt.MenuBar
 527      * @see       java.awt.MenuShortcut
 528      * @since     1.1
 529      */
 530     @Override
 531     public int getMenuShortcutKeyMask() {
 532         return Event.META_MASK;
 533     }
 534 
 535     @Override
 536     public Image getImage(final String filename) {
 537         final Image nsImage = checkForNSImage(filename);
 538         if (nsImage != null) {
 539             return nsImage;
 540         }
 541 
 542         if (imageCached(filename)) {
 543             return super.getImage(filename);
 544         }




 498         return true;
 499     }
 500 
 501     @Override
 502     public boolean isFrameStateSupported(int state) throws HeadlessException {
 503         switch (state) {
 504             case Frame.NORMAL:
 505             case Frame.ICONIFIED:
 506             case Frame.MAXIMIZED_BOTH:
 507                 return true;
 508             default:
 509                 return false;
 510         }
 511     }
 512 
 513     /**
 514      * Determines which modifier key is the appropriate accelerator
 515      * key for menu shortcuts.
 516      * <p>
 517      * Menu shortcuts, which are embodied in the
 518      * {@code MenuShortcut} class, are handled by the
 519      * {@code MenuBar} class.
 520      * <p>
 521      * By default, this method returns {@code Event.CTRL_MASK}.
 522      * Toolkit implementations should override this method if the
 523      * <b>Control</b> key isn't the correct key for accelerators.
 524      * @return    the modifier mask on the {@code Event} class
 525      *                 that is used for menu shortcuts on this toolkit.
 526      * @see       java.awt.MenuBar
 527      * @see       java.awt.MenuShortcut
 528      * @since     1.1
 529      */
 530     @Override
 531     public int getMenuShortcutKeyMask() {
 532         return Event.META_MASK;
 533     }
 534 
 535     @Override
 536     public Image getImage(final String filename) {
 537         final Image nsImage = checkForNSImage(filename);
 538         if (nsImage != null) {
 539             return nsImage;
 540         }
 541 
 542         if (imageCached(filename)) {
 543             return super.getImage(filename);
 544         }


< prev index next >