Package com.nomagic.magicdraw.actions
Class MDTriStateAction
java.lang.Object
javax.swing.AbstractAction
com.nomagic.actions.NMAction
com.nomagic.actions.BaseNMStateAction
com.nomagic.actions.NMTriStateAction
com.nomagic.magicdraw.actions.MDTriStateAction
- All Implemented Interfaces:
 com.nomagic.magicdraw.actions.ShortcutSchemaAction,ActionListener,Serializable,Cloneable,Comparable,EventListener,Action
- Direct Known Subclasses:
 com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramTriStateAction
@OpenApiAll
public class MDTriStateAction
extends NMTriStateAction
implements com.nomagic.magicdraw.actions.ShortcutSchemaAction
The class describes the action for changing some tri state (NMTriStateAction.SELECTED, NMTriStateAction.UNSELECTED, NMTriStateAction.MIXED).
 This action uses 
ActionsGroupController for checking enabled/disable state of assigned relative actions group(if it has some group).- 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_STATEFields inherited from class com.nomagic.actions.BaseNMStateAction
GROUPEDFields 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_ICONFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields 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
ConstructorsConstructorDescriptionMDTriStateAction(String id, String name, int mnemonic, String group) Constructs the action with given id, name, mnemonic key and group.MDTriStateAction(String id, String name, KeyStroke stroke, String group) Creates the action with given id, name, key stroke, group.MDTriStateAction(String id, String name, KeyStroke stroke, String group, boolean useShortcutSchema) Creates the action with given id, name, key stroke, group. - 
Method Summary
Modifier and TypeMethodDescriptionvoidExecutes action.booleanvoidIf action has assigned relative group, takes enable flag value from this group and sets to itself.Methods inherited from class com.nomagic.actions.NMTriStateAction
accept, getState, setMixedIconSupplier, setSelectedIconSupplier, setState, setUnselectedIconSupplierMethods inherited from class com.nomagic.actions.BaseNMStateAction
isGrouped, setGroupedMethods 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, toStringMethods inherited from class javax.swing.AbstractAction
getKeys, getValue, isEnabled, putValue, setEnabled 
- 
Constructor Details
- 
MDTriStateAction
public MDTriStateAction(@CheckForNull String id, @CheckForNull String name, @CheckForNull KeyStroke stroke, @CheckForNull String group) Creates the action with given id, name, key stroke, group.- Parameters:
 id- the id of the action.name- the name of the action.stroke- the KeyStroke of the actiongroup- the name of the related commands group.
 - 
MDTriStateAction
public MDTriStateAction(@CheckForNull String id, @CheckForNull String name, @CheckForNull KeyStroke stroke, @CheckForNull String group, boolean useShortcutSchema) Creates the action with given id, name, key stroke, group.- Parameters:
 id- the id of the action.name- the name of the action.stroke- the KeyStroke of the actiongroup- the name of the related commands group.useShortcutSchema- use shortcuts schema
 - 
MDTriStateAction
public MDTriStateAction(@CheckForNull String id, @CheckForNull String name, int mnemonic, @CheckForNull String group) Constructs the action with given id, name, mnemonic key and group.- Parameters:
 id- the id of the action.name- the name of the action.mnemonic- the mnemonic key of the actiongroup- the name of the related commands group.
 
 - 
 - 
Method Details
- 
actionPerformed
Executes action.- Specified by:
 actionPerformedin interfaceActionListener- Overrides:
 actionPerformedin classNMTriStateAction- Parameters:
 e- event caused execution.
 - 
updateState
public void updateState()If action has assigned relative group, takes enable flag value from this group and sets to itself.- Overrides:
 updateStatein classNMAction
 - 
isUseShortcutSchema
public boolean isUseShortcutSchema()- Specified by:
 isUseShortcutSchemain interfacecom.nomagic.magicdraw.actions.ShortcutSchemaAction- Returns:
 - true if action is using schema for taking default shortcuts
 
 
 -