- java.lang.Object
-
- devplugin.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 totrue
-
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 entryActionMenu(int actionId, javax.swing.Action action, boolean isSelected)
Creates a new single checkbox menu entry.ActionMenu(ActionMenu actionMenu)
Clone an existing ActionMenuActionMenu(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 entryActionMenu(javax.swing.Action action, boolean isSelected)
Creates a new single checkbox menu entry.ActionMenu(javax.swing.Action action, ActionMenu[] subItems)
Deprecated.since 3.0, useActionMenu(String, Icon, ActionMenu[])
insteadActionMenu(javax.swing.Action action, java.lang.Object[] subItems)
Deprecated.since 3.0, useActionMenu(String, Icon, Object[])
insteadActionMenu(javax.swing.Action action, javax.swing.Action[] subItems)
Deprecated.since 3.0, useActionMenu(String, Icon, Action[])
instead
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.Action
getAction()
int
getActionId()
ActionMenu[]
getSubItems()
java.lang.String
getTitle()
boolean
hasSubItems()
boolean
isSelected()
boolean
showOnlySubMenus()
-
-
-
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 totrue
- 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.since 3.0, useActionMenu(String, Icon, ActionMenu[])
insteadCreates a menu item having sub menu items. These items can have further sub menu items.- Parameters:
action
- The action to use for this ActionMenusubItems
- 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 menumenuIcon
- icon of the sub menusubItems
- 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 actionmenuTitle
- title of the sub menumenuIcon
- icon of the sub menusubItems
- 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 actionsmenuTitle
- title of the sub menumenuIcon
- icon of the sub menusubItems
- sub menu itemsshowOnlySubMenus
- 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 menusubItems
- 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, useActionMenu(String, Icon, Action[])
insteadCreates a menu item having sub menu items.- Parameters:
action
- The action to use for this ActionMenusubItems
- 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 menumenuIcon
- icon of the sub menusubItems
- 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 menusubItems
- 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, useActionMenu(String, Icon, Object[])
insteadCreates 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 menumenuIcon
- icon of the sub menusubItems
- 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 menusubItems
- 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 menuaction
- 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()
-
getSubItems
public ActionMenu[] getSubItems()
-
hasSubItems
public boolean hasSubItems()
-
isSelected
public boolean isSelected()
-
getAction
public javax.swing.Action getAction()
-
getActionId
public int getActionId()
-
showOnlySubMenus
public boolean showOnlySubMenus()
-
-