Package com.nomagic.magicdraw.ui.actions
Class DefaultDiagramTriStateAction
java.lang.Object
javax.swing.AbstractAction
com.nomagic.actions.NMAction
com.nomagic.actions.BaseNMStateAction
com.nomagic.actions.NMTriStateAction
com.nomagic.magicdraw.actions.MDTriStateAction
com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramTriStateAction
com.nomagic.magicdraw.ui.actions.DefaultDiagramTriStateAction
- All Implemented Interfaces:
com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction
,DiagramAction
,com.nomagic.magicdraw.actions.ShortcutSchemaAction
,ActionListener
,Serializable
,Cloneable
,Comparable
,EventListener
,Action
@OpenApiAll
public class DefaultDiagramTriStateAction
extends com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramTriStateAction
implements DiagramAction
The default implementation of DiagramAction and MDTriStateAction
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.nomagic.actions.NMTriStateAction
NMTriStateAction.ACTION_STATE
-
Field Summary
Fields inherited from class com.nomagic.actions.NMTriStateAction
TRI_STATE
Fields inherited from class com.nomagic.actions.BaseNMStateAction
GROUPED
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
ConstructorDescriptionDefaultDiagramTriStateAction
(String actionID, String actionName, KeyStroke stroke, String group) Constructs new action.DefaultDiagramTriStateAction
(String actionID, String actionName, KeyStroke stroke, String group, boolean useSchema) Constructs new action. -
Method Summary
Modifier and TypeMethodDescriptionprotected DiagramPresentationElement
Returns diagram this action.final void
Sets the diagram to this action.void
setDiagram
(DiagramPresentationElement diagram) Sets diagram for this action.Methods inherited from class com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramTriStateAction
getFirstSelected, getSelected
Methods inherited from class com.nomagic.magicdraw.actions.MDTriStateAction
actionPerformed, isUseShortcutSchema, updateState
Methods inherited from class com.nomagic.actions.NMTriStateAction
accept, getState, setMixedIconSupplier, setSelectedIconSupplier, setState, setUnselectedIconSupplier
Methods inherited from class com.nomagic.actions.BaseNMStateAction
isGrouped, setGrouped
Methods inherited from class com.nomagic.actions.NMAction
addAction, addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, clone, compareTo, createMenuItem, equals, firePropertyChange, forEach, forEachIncludingSelf, getActions, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeIcon, getLargeOrSmallIcon, getMenuShortcutMaskAsString, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallIcon, 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
-
DefaultDiagramTriStateAction
public DefaultDiagramTriStateAction(String actionID, @CheckForNull String actionName, @CheckForNull KeyStroke stroke, @CheckForNull String group) Constructs new action.- Parameters:
actionID
- the action ID.actionName
- the action name.stroke
- the action stroke.group
- the action group.
-
DefaultDiagramTriStateAction
public DefaultDiagramTriStateAction(String actionID, @CheckForNull String actionName, @CheckForNull KeyStroke stroke, @CheckForNull String group, boolean useSchema) Constructs new action.- Parameters:
actionID
- the action ID.actionName
- the action name.stroke
- the action stroke.group
- the action group.useSchema
- use shortcuts schema
-
-
Method Details
-
setDiagram
Sets diagram for this action.- Specified by:
setDiagram
in interfaceDiagramAction
- Parameters:
diagram
- the given diagram
-
setDiagram
Sets the diagram to this action. Only @DiagramPresentationElement
are supported.- Specified by:
setDiagram
in interfacecom.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction
- Overrides:
setDiagram
in classcom.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramTriStateAction
- Parameters:
diagram
- the given diagram
-
getDiagram
Description copied from class:com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramTriStateAction
Returns diagram this action. MagicDraw framework guarantee that diagram will set if this method is called from updateState() or actionPerformed(ActionEvent) methods.- Overrides:
getDiagram
in classcom.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramTriStateAction
- Returns:
- diagram.
-