Class MenuItemData


  • public class MenuItemData
    extends ButtonData
    Default menu item data implementation.
    • Constructor Detail

      • MenuItemData

        public MenuItemData()
        Constructor.
      • MenuItemData

        public MenuItemData​(Image icon)
        Constructor.
        Parameters:
        icon - The icon to display in the menu item.
      • MenuItemData

        public MenuItemData​(java.lang.String text)
        Constructor.
        Parameters:
        text - The text to display in the menu item.
      • MenuItemData

        public MenuItemData​(Image icon,
                            java.lang.String text)
        Constructor.
        Parameters:
        icon - The icon to display in the menu item.
        text - The text to display in the menu item.
      • MenuItemData

        public MenuItemData​(BaseContent content)
        Constructor.
        Parameters:
        content - The icon and text to display in the menu item.
      • MenuItemData

        public MenuItemData​(Image icon,
                            java.lang.String text,
                            Keyboard.KeyStroke keyboardShortcut)
        Constructor.
        Parameters:
        icon - The icon to display in the menu item.
        text - The text to display in the menu item.
        keyboardShortcut - The keyboard shortcut associated with this menu item.
    • Method Detail

      • setKeyboardShortcut

        public void setKeyboardShortcut​(Keyboard.KeyStroke keyboardShortcut)
      • setKeyboardShortcut

        public void setKeyboardShortcut​(java.lang.String keyboardShortcut)
        Set the keyboard shortcut for this menu item using a string recognizable by the Keyboard.KeyStroke.decode(java.lang.String) method.
        Parameters:
        keyboardShortcut - The keystroke name.