Package com.nomagic.magicdraw.ui.actions
Class DiagramContextToolbarAction
java.lang.Object
javax.swing.AbstractAction
com.nomagic.actions.NMAction
com.nomagic.magicdraw.actions.MDAction
com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramAction
com.nomagic.magicdraw.ui.actions.DefaultDiagramAction
com.nomagic.magicdraw.ui.actions.DiagramContextToolbarAction
- All Implemented Interfaces:
com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction
,DiagramAction
,com.nomagic.magicdraw.actions.ShortcutSchemaAction
,ActionListener
,Serializable
,Cloneable
,Comparable
,EventListener
,Action
Diagram context toolbar action
- See Also:
-
Field Summary
Fields inherited from class com.nomagic.actions.NMAction
ACTION_SHORTCUTS, BELONGS_TO_SEPARATE_GROUP_IN_UI, DO_NO_SHOW_ACTION_NAME_IN_UI, DO_NOT_REGISTER_ACTION_TO_COMPONENTS, GENERATED_ID_PREFIX, GROUP, ID, LARGE_ICON, MENU_SHORTCUT_MASK, TINY_ICON
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
Constructor Summary
ConstructorDescriptionDiagramContextToolbarAction
(String actionID, String name, Icon icon) DiagramContextToolbarAction
(String actionID, Icon icon) DiagramContextToolbarAction
(String actionID, Icon icon, boolean isExtendedAction) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Executes action.protected void
Returns the large icon of the action.Returns the small icon of the action.boolean
boolean
Return fake mouse event flag - does this action fakes mouse pressed and mouse released event on action event.boolean
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.protected void
showContextToolbarIfCanvasFocused
(com.nomagic.magicdraw.ui.DiagramWindowPanel panel) void
If action has assigned relative group, takes enable flag value from this group and sets to itself.Methods inherited from class com.nomagic.magicdraw.ui.actions.DefaultDiagramAction
getDiagram, setDiagram, setDiagram
Methods inherited from class com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramAction
getFirstSelected, getSelected
Methods inherited from class com.nomagic.magicdraw.actions.MDAction
isUseShortcutSchema
Methods inherited from class com.nomagic.actions.NMAction
accept, addAction, addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, clone, compareTo, createMenuItem, equals, firePropertyChange, forEach, forEachIncludingSelf, getActions, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeOrSmallIcon, getMenuShortcutMaskAsString, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallOrLargeIcon, getTinyIcon, hashCode, hasMenuShortcutMask, isIDGenerated, removeAction, removeIf, removePropertyChangeListener, removeShortcut, removeWeakPropertyChangeListener, setActions, setDescription, setGroup, setIcon, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, setTinyIcon, shallowClone, toString
Methods inherited from class javax.swing.AbstractAction
getKeys, getValue, isEnabled, putValue, setEnabled
-
Constructor Details
-
DiagramContextToolbarAction
-
DiagramContextToolbarAction
-
DiagramContextToolbarAction
-
-
Method Details
-
updateState
public void updateState()Description copied from class:MDAction
If action has assigned relative group, takes enable flag value from this group and sets to itself.- Overrides:
updateState
in classMDAction
-
getSmallIcon
Description copied from class:NMAction
Returns the small icon of the action.- Overrides:
getSmallIcon
in classNMAction
- Returns:
- the small icon of the action.
-
getLargeIcon
Description copied from class:NMAction
Returns the large icon of the action.- Overrides:
getLargeIcon
in classNMAction
- Returns:
- the large icon of the action.
-
actionPerformed
Description copied from class:MDAction
Executes action.- Specified by:
actionPerformed
in interfaceActionListener
- Overrides:
actionPerformed
in classMDAction
- Parameters:
e
- event caused execution.
-
showContextToolbarIfCanvasFocused
protected void showContextToolbarIfCanvasFocused(com.nomagic.magicdraw.ui.DiagramWindowPanel panel) -
closeContextToolbar
protected void closeContextToolbar() -
setExtendedAction
public void setExtendedAction(boolean isExtended) -
isExtendedAction
public boolean isExtendedAction() -
isFakeMouseEvents
public boolean isFakeMouseEvents()Return fake mouse event flag - does this action fakes mouse pressed and mouse released event on action event.- Returns:
- true if fake mouse event should be generated
-
setFakeMouseEvents
public void setFakeMouseEvents(boolean fakeMouseEvents) Sets fake mouse event flag - does this action fakes mouse pressed and mouse released event on action event.- Parameters:
fakeMouseEvents
- true if generate fake mouse events
-
setReuseIconFromInnerAction
public void setReuseIconFromInnerAction(boolean reuseIconFromInnerAction) Sets reuse icon from inner action flag value.- Parameters:
reuseIconFromInnerAction
- reuse icon from inner action flag value.
-
isReuseIconFromInnerAction
public boolean isReuseIconFromInnerAction()Gets reuse icon from inner action flag value.- Returns:
- reuse icon from inner action flag value.
-