@OpenApiAll public class MenuAction extends ActionsCategory implements javax.swing.event.PopupMenuListener, javax.swing.event.MenuListener
ACTIONS_PROPERTY, ADDED_ACTION_PROPERTY, CHANGE_ACTIONS_PROPERTY, MAX_CATEGORY_ACTIONS, REMOVED_ACTION_PROPERTY, USE_AS_SEPARATOR_IN_UI
ACTION_SHORTCUTS, BELONGS_TO_SEPARATE_GROUP_IN_UI, DO_NO_SHOW_ACTION_NAME_IN_UI, GENERATED_ID_PREFIX, GROUP, ID, LARGE_ICON, MENU_SHORTCUT_MASK
Constructor and Description |
---|
MenuAction(java.lang.String id,
java.lang.String name)
Construct a menu action with id and name
|
MenuAction(java.lang.String id,
java.lang.String name,
int keyCode)
Creates menu action with given id, name, and key code.
|
MenuAction(java.lang.String id,
java.lang.String name,
int keyCode,
java.lang.String group)
Creates menu action with given id, name, and key code.
|
MenuAction(java.lang.String id,
java.lang.String name,
javax.swing.KeyStroke stroke)
Creates menu action with given id, name, and KeyStroke.
|
MenuAction(java.lang.String id,
java.lang.String name,
javax.swing.KeyStroke stroke,
java.lang.String group)
Creates menu action with given id, name, and KeyStroke.
|
Modifier and Type | Method and Description |
---|---|
void |
menuCanceled(javax.swing.event.MenuEvent e) |
void |
menuDeselected(javax.swing.event.MenuEvent e) |
void |
menuSelected(javax.swing.event.MenuEvent e)
Invoked when a menu is selected.
|
void |
popupMenuCanceled(javax.swing.event.PopupMenuEvent e) |
void |
popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e) |
void |
popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e) |
accept, actionPerformed, addAction, addAction, addActions, breakActions, breakActions, breakActions, breakeActions, clone, getAction, getActions, getActionsRecursively, getCategories, isDisplayHeader, isEmpty, isNested, isUseActionForDisable, removeAction, setActions, setDisplayHeader, setNested, setUseActionForDisable, shallowClone, size, sort, toString
addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, compareTo, createMenuItem, equals, firePropertyChange, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeIcon, getLargeOrSmallIcon, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallIcon, getSmallOrLargeIcon, hashCode, isIDGenerated, removePropertyChangeListener, removeShortcut, removeWeakPropertyChangeListener, setDescription, setGroup, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, updateState
public MenuAction(@CheckForNull java.lang.String id, @CheckForNull java.lang.String name)
id
- the id of the category.name
- the name of the category.public MenuAction(@CheckForNull java.lang.String id, @CheckForNull java.lang.String name, @CheckForNull javax.swing.KeyStroke stroke)
id
- the id of the category.name
- the name of the category.stroke
- key stroke used for invoking action category.public MenuAction(@CheckForNull java.lang.String id, @CheckForNull java.lang.String name, @CheckForNull javax.swing.KeyStroke stroke, @CheckForNull java.lang.String group)
id
- the id of the category.name
- the name of the category.stroke
- key stroke used for invoking action category.group
- the name of the related commands group.public MenuAction(@CheckForNull java.lang.String id, @CheckForNull java.lang.String name, int keyCode)
id
- the id of the category.name
- the name of the category.keyCode
- key stroke used for invoking action category.public MenuAction(@CheckForNull java.lang.String id, @CheckForNull java.lang.String name, int keyCode, java.lang.String group)
id
- the id of the category.name
- the name of the category.keyCode
- key stroke used for invoking action category.group
- the name of the related commands group.public void menuSelected(javax.swing.event.MenuEvent e)
menuSelected
in interface javax.swing.event.MenuListener
e
- an MenuEvent objectpublic void menuDeselected(javax.swing.event.MenuEvent e)
menuDeselected
in interface javax.swing.event.MenuListener
public void menuCanceled(javax.swing.event.MenuEvent e)
menuCanceled
in interface javax.swing.event.MenuListener
public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent e)
popupMenuWillBecomeVisible
in interface javax.swing.event.PopupMenuListener
public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent e)
popupMenuWillBecomeInvisible
in interface javax.swing.event.PopupMenuListener
public void popupMenuCanceled(javax.swing.event.PopupMenuEvent e)
popupMenuCanceled
in interface javax.swing.event.PopupMenuListener