Hilbert II - Version 0.03.08

org.qedeq.gui.se.util
Class MenuHelper

java.lang.Object
  extended byorg.qedeq.gui.se.util.MenuHelper

public final class MenuHelper
extends Object

Various menu utility methods.

Version:
$Revision: 1.1 $

Method Summary
static JCheckBoxMenuItem createCheckBoxMenuItem(String text, boolean selected)
           
static JCheckBoxMenuItem createCheckItem(String text, boolean enabled, boolean selected)
          Creates and returns a JCheckBoxMenuItem with the given enablement and selection state.
static JMenu createMenu(String text, char mnemonic)
           
static JMenuItem createMenuItem(String text)
           
static JMenuItem createMenuItem(String text, char mnemonic)
           
static JMenuItem createMenuItem(String text, char mnemonic, KeyStroke key)
           
static JMenuItem createMenuItem(String text, Icon icon)
           
static JMenuItem createMenuItem(String text, Icon icon, char mnemonic)
           
static JMenuItem createMenuItem(String text, Icon icon, char mnemonic, KeyStroke key)
           
static JRadioButtonMenuItem createRadioButtonMenuItem(String text, boolean selected)
           
static JRadioButtonMenuItem createRadioItem(String text, boolean enabled, boolean selected)
          Creates and returns a JRadioButtonMenuItem with the given enablement and selection state.
static boolean isAboutInOSMenu()
          Checks and answers whether the about action has been moved to an operating system specific menu, e.g. the OS X application menu.
static boolean isQuitInOSMenu()
          Checks and answers whether the quit action has been moved to an operating system specific menu, e.g. the OS X application menu.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isQuitInOSMenu

public static boolean isQuitInOSMenu()
Checks and answers whether the quit action has been moved to an operating system specific menu, e.g. the OS X application menu.

Returns:
true if the quit action is in an OS-specific menu

createMenu

public static JMenu createMenu(String text,
                               char mnemonic)

createMenuItem

public static JMenuItem createMenuItem(String text)

createMenuItem

public static JMenuItem createMenuItem(String text,
                                       char mnemonic)

createMenuItem

public static JMenuItem createMenuItem(String text,
                                       char mnemonic,
                                       KeyStroke key)

createMenuItem

public static JMenuItem createMenuItem(String text,
                                       Icon icon)

createMenuItem

public static JMenuItem createMenuItem(String text,
                                       Icon icon,
                                       char mnemonic)

createMenuItem

public static JMenuItem createMenuItem(String text,
                                       Icon icon,
                                       char mnemonic,
                                       KeyStroke key)

createRadioButtonMenuItem

public static JRadioButtonMenuItem createRadioButtonMenuItem(String text,
                                                             boolean selected)

createCheckBoxMenuItem

public static JCheckBoxMenuItem createCheckBoxMenuItem(String text,
                                                       boolean selected)

isAboutInOSMenu

public static boolean isAboutInOSMenu()
Checks and answers whether the about action has been moved to an operating system specific menu, e.g. the OS X application menu.

Returns:
true if the about action is in an OS-specific menu

createRadioItem

public static JRadioButtonMenuItem createRadioItem(String text,
                                                   boolean enabled,
                                                   boolean selected)
Creates and returns a JRadioButtonMenuItem with the given enablement and selection state.


createCheckItem

public static JCheckBoxMenuItem createCheckItem(String text,
                                                boolean enabled,
                                                boolean selected)
Creates and returns a JCheckBoxMenuItem with the given enablement and selection state.


Hilbert II - Version 0.03.08

©left GNU General Public Licence
All Rights Reserved.