Package com.nomagic.magicdraw.ui.actions
Class DrawShapeDiagramAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- com.nomagic.actions.NMAction
-
- com.nomagic.actions.NMStateAction
-
- com.nomagic.magicdraw.actions.MDStateAction
-
- com.nomagic.magicdraw.ui.actions.DefaultDiagramStateAction
-
- com.nomagic.magicdraw.ui.actions.BaseDiagramAction
-
- com.nomagic.magicdraw.ui.diagrams.BaseCustomizableDiagramAction
-
- com.nomagic.magicdraw.ui.actions.DrawShapeDiagramAction
-
- All Implemented Interfaces:
DiagramAction
,com.nomagic.magicdraw.actions.ShortcutSchemaAction
,java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Comparable
,java.util.EventListener
,javax.swing.Action
@OpenApi public abstract class DrawShapeDiagramAction extends BaseCustomizableDiagramAction
The abstract diagram action to draw shape from diagram toolbar.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.nomagic.magicdraw.ui.diagrams.BaseCustomizableDiagramAction
customAdditionalDrawAction
-
Fields inherited from class com.nomagic.actions.NMStateAction
DISTINGUISH, GROUPED, STATE
-
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
-
-
Constructor Summary
Constructors Constructor Description DrawShapeDiagramAction(java.lang.String actionID, java.lang.String actionName, javax.swing.KeyStroke key)
Constructs new action with given id and name.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PresentationElement
create()
Creates presentation element.com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction
createAdditionalDrawAction(PresentationElement view)
protected abstract Element
createElement()
Creates model elementprotected PresentationElement
createPresentationElement()
Creates presentation element.protected com.nomagic.magicdraw.ui.states.State
createState()
Creates ShapeDrawState and sets to to the canvas.protected java.awt.Dimension
getDefaultSize()
-
Methods inherited from class com.nomagic.magicdraw.ui.diagrams.BaseCustomizableDiagramAction
clone, getCustomAdditionalDrawAction, getDefaultAdditionalDrawAction, getDefaultIcon, getIcons, getLargeIcon, getSmallIcon, getStyle, setCustomAdditionalDrawAction, setDescription, setIcons, setStyle, setStyle
-
Methods inherited from class com.nomagic.magicdraw.ui.actions.BaseDiagramAction
actionPerformed, getCanvas, getDiagramActionsExecuter, getElementCreatorInfo, getNameSpace, getProject, isAllowedToCreateSymbol, isEnabledInRODiagram, replaceState, replaceWithSelectionActionState, setEnabledInRODiagram, updateState
-
Methods inherited from class com.nomagic.magicdraw.ui.actions.DefaultDiagramStateAction
getDiagram, getFirstSelected, getSelected, setDiagram
-
Methods inherited from class com.nomagic.magicdraw.actions.MDStateAction
isUseShortcutSchema
-
Methods inherited from class com.nomagic.actions.NMStateAction
accept, getState, isDistinguish, isGrouped, isStateEvent, setDistinguish, setGrouped, setState
-
Methods inherited from class com.nomagic.actions.NMAction
addAction, addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, 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, setGroup, setIcon, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, setTinyIcon, shallowClone, toString
-
Methods inherited from class javax.swing.AbstractAction
getKeys, getValue, isEnabled, putValue, setEnabled
-
-
-
-
Constructor Detail
-
DrawShapeDiagramAction
@OpenApi public DrawShapeDiagramAction(java.lang.String actionID, java.lang.String actionName, @CheckForNull javax.swing.KeyStroke key)
Constructs new action with given id and name.- Parameters:
actionID
- the action id.actionName
- name of the action.key
- the command key for action.
-
-
Method Detail
-
createState
@NotApi protected com.nomagic.magicdraw.ui.states.State createState()
Creates ShapeDrawState and sets to to the canvas.- Overrides:
createState
in classBaseCustomizableDiagramAction
-
createElement
@OpenApi protected abstract Element createElement()
Creates model element- Returns:
- created model element
-
getDefaultSize
@CheckForNull protected java.awt.Dimension getDefaultSize()
-
create
public final PresentationElement create()
Creates presentation element.- Returns:
- created presentation element
-
createPresentationElement
@OpenApi protected PresentationElement createPresentationElement()
Creates presentation element.- Returns:
- created presentation element
-
createAdditionalDrawAction
@CheckForNull public com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction createAdditionalDrawAction(PresentationElement view)
-
-