@OpenApiAll public class DiagramContextToolbarAction extends DefaultDiagramAction
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, TINY_ICON
Constructor and Description |
---|
DiagramContextToolbarAction(java.lang.String actionID,
javax.swing.Icon icon) |
DiagramContextToolbarAction(java.lang.String actionID,
javax.swing.Icon icon,
boolean isExtendedAction) |
DiagramContextToolbarAction(java.lang.String actionID,
java.lang.String name,
javax.swing.Icon icon) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Executes action.
|
protected void |
closeContextToolbar() |
javax.swing.Icon |
getLargeIcon()
Returns the large icon of the action.
|
javax.swing.Icon |
getSmallIcon()
Returns the small icon of the action.
|
boolean |
isExtendedAction() |
boolean |
isFakeMouseEvents()
Return fake mouse event flag - does this action fakes mouse pressed and mouse released event on action event.
|
boolean |
isReuseIconFromInnerAction()
Gets reuse icon from inner action flag value.
|
void |
setExtendedAction(boolean isExtended) |
void |
setFakeMouseEvents(boolean fakeMouseEvents)
Sets fake mouse event flag - does this action fakes mouse pressed and mouse released event on action event.
|
void |
setReuseIconFromInnerAction(boolean reuseIconFromInnerAction)
Sets reuse icon from inner action flag value.
|
void |
updateState()
If action has assigned relative group, takes enable flag value from this group and sets to itself.
|
getDiagram, getFirstSelected, getSelected, setDiagram
accept, addAction, addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, clone, compareTo, createMenuItem, equals, firePropertyChange, getActions, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeOrSmallIcon, getMenuShortcutMaskAsString, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallOrLargeIcon, getTinyIcon, hashCode, hasMenuShortcutMask, isIDGenerated, removeAction, removePropertyChangeListener, removeShortcut, removeWeakPropertyChangeListener, setActions, setDescription, setGroup, setIcon, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, setTinyIcon, shallowClone, toString
public DiagramContextToolbarAction(java.lang.String actionID, @CheckForNull javax.swing.Icon icon)
public DiagramContextToolbarAction(java.lang.String actionID, @CheckForNull java.lang.String name, @CheckForNull javax.swing.Icon icon)
public DiagramContextToolbarAction(java.lang.String actionID, @CheckForNull javax.swing.Icon icon, boolean isExtendedAction)
public void updateState()
MDAction
updateState
in class MDAction
public javax.swing.Icon getSmallIcon()
NMAction
getSmallIcon
in class NMAction
public javax.swing.Icon getLargeIcon()
NMAction
getLargeIcon
in class NMAction
public void actionPerformed(java.awt.event.ActionEvent e)
MDAction
actionPerformed
in interface java.awt.event.ActionListener
actionPerformed
in class MDAction
e
- event caused execution.protected void closeContextToolbar()
public void setExtendedAction(boolean isExtended)
public boolean isExtendedAction()
public boolean isFakeMouseEvents()
public void setFakeMouseEvents(boolean fakeMouseEvents)
fakeMouseEvents
- true if generate fake mouse eventspublic void setReuseIconFromInnerAction(boolean reuseIconFromInnerAction)
reuseIconFromInnerAction
- reuse icon from inner action flag value.public boolean isReuseIconFromInnerAction()