Class JMenuItemHpr<T extends JMenuItem>

Direct Known Subclasses:
JMenuHpr

public class JMenuItemHpr<T extends JMenuItem> extends JComponentHpr<T>
A helper implementation for JMenuItem (with specific support for subclasses: JCheckBoxMenuItem,JRadioButtonMenuItem).
  • Constructor Details

    • JMenuItemHpr

      public JMenuItemHpr()
  • Method Details

    • getChildCount

      public int getChildCount(T anObj)
      Override to suppress children.
      Overrides:
      getChildCount in class JComponentHpr<T extends JMenuItem>
    • initUI

      public void initUI(T aMenuItem, UIOwner anOwner)
      Override to enable Action event.
      Overrides:
      initUI in class JComponentHpr<T extends JMenuItem>
    • getPropertyNameMapped

      public String getPropertyNameMapped(T anObj, String aName)
      Returns a mapped property name.
      Overrides:
      getPropertyNameMapped in class UIHelper<T extends JMenuItem>
    • createMenuItem

      public static JMenuItem createMenuItem(String aName, String theText, String aKey)
      Creates a JMenuItem for name and text and key accelerator description.
    • getKeyText

      public static String getKeyText(KeyStroke aKeyStroke)
      This utility method returns key text for a key stroke and tries to make it more conforming.
    • getKeyStroke

      public static KeyStroke getKeyStroke(String aString)
      This utility method tries to get a keystroke from a string and tries to be more forgiving than KeyStroke.getKeyStroke().