Module tvbrowser
Package devplugin

Class ActionMenu

  • Direct Known Subclasses:
    ActionMenuProxy

    public class ActionMenu
    extends java.lang.Object
    This class represents a structure for context menus.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ID_ACTION_NONE
      ID for menu action which shouldn't be available for mouse actions.
      static java.lang.String KEY_SHOW_ONLY_SUB_MENUS
      To show the submenus directly in the context menu of a program add this key to the action and set the value to true
    • Constructor Summary

      Constructors 
      Constructor Description
      ActionMenu​(int actionId, java.lang.String menuTitle, javax.swing.Icon menuIcon, ActionMenu[] subItems)
      Creates a menu item having sub menu items.
      ActionMenu​(int actionId, java.lang.String menuTitle, javax.swing.Icon menuIcon, ActionMenu[] subItems, boolean showOnlySubMenus)
      Creates a menu item having sub menu items.
      ActionMenu​(int actionId, javax.swing.Action action)
      Creates a new single menu entry
      ActionMenu​(int actionId, javax.swing.Action action, boolean isSelected)
      Creates a new single checkbox menu entry.
      ActionMenu​(ActionMenu actionMenu)
      Clone an existing ActionMenu
      ActionMenu​(java.lang.String menuTitle, ActionMenu[] subItems)
      Creates a menu item having sub menu items.
      ActionMenu​(java.lang.String menuTitle, java.lang.Object[] subItems)
      Creates a menu item having sub menu items.
      ActionMenu​(java.lang.String menuTitle, javax.swing.Action[] subItems)
      Creates a menu item having sub menu items.
      ActionMenu​(java.lang.String menuTitle, javax.swing.Icon menuIcon, ActionMenu[] subItems)
      Creates a menu item having sub menu items.
      ActionMenu​(java.lang.String menuTitle, javax.swing.Icon menuIcon, java.lang.Object[] subItems)
      Creates a menu item having sub menu items.
      ActionMenu​(java.lang.String menuTitle, javax.swing.Icon menuIcon, javax.swing.Action[] subItems)
      Creates a menu item having sub menu items.
      ActionMenu​(javax.swing.Action action)
      Creates a new single menu entry
      ActionMenu​(javax.swing.Action action, boolean isSelected)
      Creates a new single checkbox menu entry.
      ActionMenu​(javax.swing.Action action, ActionMenu[] subItems)
      Deprecated.
      ActionMenu​(javax.swing.Action action, java.lang.Object[] subItems)
      Deprecated.
      since 3.0, use ActionMenu(String, Icon, Object[]) instead
      ActionMenu​(javax.swing.Action action, javax.swing.Action[] subItems)
      Deprecated.
      since 3.0, use ActionMenu(String, Icon, Action[]) instead
    • Field Detail

      • ID_ACTION_NONE

        public static final int ID_ACTION_NONE
        ID for menu action which shouldn't be available for mouse actions.
        See Also:
        Constant Field Values
      • KEY_SHOW_ONLY_SUB_MENUS

        public static final java.lang.String KEY_SHOW_ONLY_SUB_MENUS
        To show the submenus directly in the context menu of a program add this key to the action and set the value to true
        Since:
        3.4.5
        See Also:
        Constant Field Values
    • Constructor Detail

      • ActionMenu

        @Deprecated(since="3.0")
        public ActionMenu​(javax.swing.Action action,
                          ActionMenu[] subItems)
        Deprecated.
        Creates a menu item having sub menu items. These items can have further sub menu items.
        Parameters:
        action - The action to use for this ActionMenu
        subItems - The actions for the sub items of this ActionMenu
        See Also:
        ContextMenuAction
      • ActionMenu

        public ActionMenu​(java.lang.String menuTitle,
                          javax.swing.Icon menuIcon,
                          ActionMenu[] subItems)
        Creates a menu item having sub menu items. These items can have further sub menu items.
        Parameters:
        menuTitle - title of the sub menu
        menuIcon - icon of the sub menu
        subItems - sub menu items
        See Also:
        ContextMenuAction
      • ActionMenu

        public ActionMenu​(int actionId,
                          java.lang.String menuTitle,
                          javax.swing.Icon menuIcon,
                          ActionMenu[] subItems)
        Creates a menu item having sub menu items. These items can have further sub menu items.
        Parameters:
        actionId - an ID to identify this action menu for mouse action
        menuTitle - title of the sub menu
        menuIcon - icon of the sub menu
        subItems - sub menu items
        See Also:
        ContextMenuAction
      • ActionMenu

        public ActionMenu​(int actionId,
                          java.lang.String menuTitle,
                          javax.swing.Icon menuIcon,
                          ActionMenu[] subItems,
                          boolean showOnlySubMenus)
        Creates a menu item having sub menu items. These items can have further sub menu items.
        Parameters:
        actionId - an ID to identify this action menu for mouse actions
        menuTitle - title of the sub menu
        menuIcon - icon of the sub menu
        subItems - sub menu items
        showOnlySubMenus - if the sub items of this menu should be shown directly in TV-Browser context menu
        See Also:
        ContextMenuAction
      • ActionMenu

        public ActionMenu​(java.lang.String menuTitle,
                          ActionMenu[] subItems)
        Creates a menu item having sub menu items. These items can have further sub menu items.
        Parameters:
        menuTitle - title of the sub menu
        subItems - sub menu items
        See Also:
        ContextMenuAction
      • ActionMenu

        @Deprecated(since="3.0")
        public ActionMenu​(javax.swing.Action action,
                          javax.swing.Action[] subItems)
        Deprecated.
        since 3.0, use ActionMenu(String, Icon, Action[]) instead
        Creates a menu item having sub menu items.
        Parameters:
        action - The action to use for this ActionMenu
        subItems - The actions for the sub items of this ActionMenu
      • ActionMenu

        public ActionMenu​(java.lang.String menuTitle,
                          javax.swing.Icon menuIcon,
                          javax.swing.Action[] subItems)
        Creates a menu item having sub menu items.
        Parameters:
        menuTitle - title of the sub menu
        menuIcon - icon of the sub menu
        subItems - The actions for the sub items of this ActionMenu
      • ActionMenu

        public ActionMenu​(java.lang.String menuTitle,
                          javax.swing.Action[] subItems)
        Creates a menu item having sub menu items.
        Parameters:
        menuTitle - title of the sub menu
        subItems - The actions for the sub items of this ActionMenu
      • ActionMenu

        @Deprecated(since="3.0")
        public ActionMenu​(javax.swing.Action action,
                          java.lang.Object[] subItems)
        Deprecated.
        since 3.0, use ActionMenu(String, Icon, Object[]) instead
        Creates a menu item having sub menu items.
        Parameters:
        action - The action to use for this ActionMenu.
        subItems - sub menu items, can be Actions or ActionMenus in mixed order
      • ActionMenu

        public ActionMenu​(java.lang.String menuTitle,
                          javax.swing.Icon menuIcon,
                          java.lang.Object[] subItems)
        Creates a menu item having sub menu items.
        Parameters:
        menuTitle - title of the sub menu
        menuIcon - icon of the sub menu
        subItems - sub menu items, can be Actions or ActionMenus in mixed order
      • ActionMenu

        public ActionMenu​(java.lang.String menuTitle,
                          java.lang.Object[] subItems)
        Creates a menu item having sub menu items.
        Parameters:
        menuTitle - title of the sub menu
        subItems - sub menu items, can be Actions or ActionMenus in mixed order
      • ActionMenu

        public ActionMenu​(int actionId,
                          javax.swing.Action action,
                          boolean isSelected)
        Creates a new single checkbox menu entry.
        Parameters:
        actionId - The ID for the action for mouse functions.
        action - The action for the context menu.
        isSelected - state of the check box (checked/unchecked).
      • ActionMenu

        public ActionMenu​(javax.swing.Action action,
                          boolean isSelected)
        Creates a new single checkbox menu entry.
        Parameters:
        action - The action to use for this ActionMenu.
        isSelected - state of the check box (checked/unchecked)
      • ActionMenu

        public ActionMenu​(javax.swing.Action action)
        Creates a new single menu entry
        Parameters:
        action - The action to use for this ActionMenu.
      • ActionMenu

        public ActionMenu​(int actionId,
                          javax.swing.Action action)
        Creates a new single menu entry
        Parameters:
        actionId - an id to identify this action menu
        action - The action to use for this ActionMenu.
      • ActionMenu

        public ActionMenu​(ActionMenu actionMenu)
        Clone an existing ActionMenu
        Parameters:
        actionMenu - clone this ActionMenu
    • Method Detail

      • getTitle

        public java.lang.String getTitle()
      • hasSubItems

        public boolean hasSubItems()
      • isSelected

        public boolean isSelected()
      • getAction

        public javax.swing.Action getAction()
      • getActionId

        public int getActionId()
      • showOnlySubMenus

        public boolean showOnlySubMenus()