Class MnemonicInstaller


  • public class MnemonicInstaller
    extends java.lang.Object
    A singleton class that that intercepts components, extracts a mnemonic key from the component's label or button text, and sets that as the the component's mnemonic key.
    Author:
    Chris Jennings
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int getMask()
      Returns the bitmask of component types that the manager will automatically handle mnemonics for.
      static boolean isMnemonicHidden()
      Returns true if mnemonic letters will not be marked within the UI.
      static void setMask​(int mask)
      Sets the bitmask that determines which control types to manage.
      static void setMnemonicHidden​(boolean hide)
      Sets whether mnemonics will be displayed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setMnemonicHidden

        public static void setMnemonicHidden​(boolean hide)
        Sets whether mnemonics will be displayed. When set to true, mnemonic codes will still be extracted and set on components, but they will not be marked in the UI. For example, if mnemonic letters are normally underlined, this underlining will be disabled.
        Parameters:
        hide - if true, mnemonics will be hidden
      • isMnemonicHidden

        public static boolean isMnemonicHidden()
        Returns true if mnemonic letters will not be marked within the UI.
        Returns:
        true if mnemonics are hidden
        See Also:
        setMnemonicHidden(boolean)
      • getMask

        public static int getMask()
        Returns the bitmask of component types that the manager will automatically handle mnemonics for.
        Returns:
        the mask of component types
      • setMask

        public static void setMask​(int mask)
        Sets the bitmask that determines which control types to manage. Setting the mask to 0 will disable automatic management of mnemonics.
        Parameters:
        mask - the logical or of the mask values for the control types to manage