Class BaseCustomizableDiagramAction
- 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
-
- 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
- Direct Known Subclasses:
DrawShapeDiagramAction
@OpenApiAll public class BaseCustomizableDiagramAction extends com.nomagic.magicdraw.ui.actions.BaseDiagramAction
Action which can be customized in custom diagram descriptor UI.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction
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 BaseCustomizableDiagramAction(java.lang.String actionID, java.lang.String actionName, javax.swing.KeyStroke key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BaseCustomizableDiagramAction
clone()
Clones the object.protected com.nomagic.magicdraw.ui.states.State
createState()
Creates ShapeDrawState and sets to to the canvas.com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction
getCustomAdditionalDrawAction()
Returns custom additional draw action for this action.com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction
getDefaultAdditionalDrawAction()
Returns default additional draw action for this actionprotected ResizableIcon
getDefaultIcon()
com.nomagic.magicdraw.ui.diagrams.IconCollection
getIcons()
javax.swing.Icon
getLargeIcon()
Returns the large icon of the action.javax.swing.Icon
getSmallIcon()
Returns the small icon of the action.PropertyManager
getStyle()
void
setCustomAdditionalDrawAction(com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction customAdditionalDrawAction)
Set custom additional draw action for this action.void
setDescription(java.lang.String description)
Sets new action description.void
setIcons(com.nomagic.magicdraw.ui.diagrams.IconCollection icons)
void
setStyle(PropertyManager style)
void
setStyle(com.nomagic.magicdraw.ui.diagrams.PropertyManagerProxy style)
-
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
-
-
-
-
Method Detail
-
getIcons
public com.nomagic.magicdraw.ui.diagrams.IconCollection getIcons()
-
setIcons
public void setIcons(com.nomagic.magicdraw.ui.diagrams.IconCollection icons)
-
getLargeIcon
@CheckForNull public javax.swing.Icon getLargeIcon()
Description copied from class:NMAction
Returns the large icon of the action.- Overrides:
getLargeIcon
in classNMAction
- Returns:
- the large icon of the action.
-
getSmallIcon
@CheckForNull public javax.swing.Icon getSmallIcon()
Description copied from class:NMAction
Returns the small icon of the action.- Overrides:
getSmallIcon
in classNMAction
- Returns:
- the small icon of the action.
-
getDefaultIcon
@CheckForNull protected ResizableIcon getDefaultIcon()
-
setDescription
public void setDescription(java.lang.String description)
Description copied from class:NMAction
Sets new action description.- Overrides:
setDescription
in classNMAction
- Parameters:
description
- action description.
-
clone
public BaseCustomizableDiagramAction clone()
Description copied from class:NMAction
Clones the object. Does the deep clone.- Overrides:
clone
in classcom.nomagic.magicdraw.ui.actions.BaseDiagramAction
- Returns:
- cloned object
-
getStyle
@CheckForNull public PropertyManager getStyle()
-
setStyle
public void setStyle(@CheckForNull PropertyManager style)
-
setStyle
public void setStyle(@CheckForNull com.nomagic.magicdraw.ui.diagrams.PropertyManagerProxy style)
-
createState
@NotApi protected com.nomagic.magicdraw.ui.states.State createState()
Creates ShapeDrawState and sets to to the canvas.- Overrides:
createState
in classcom.nomagic.magicdraw.ui.actions.BaseDiagramAction
-
getCustomAdditionalDrawAction
public com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction getCustomAdditionalDrawAction()
Returns custom additional draw action for this action.- Returns:
- additional draw action
-
getDefaultAdditionalDrawAction
@CheckForNull public com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction getDefaultAdditionalDrawAction()
Returns default additional draw action for this action- Returns:
- default additional draw action
-
setCustomAdditionalDrawAction
public void setCustomAdditionalDrawAction(com.nomagic.magicdraw.uml.symbols.manipulators.drawactions.AdditionalDrawAction customAdditionalDrawAction)
Set custom additional draw action for this action. This draw action will be used if not null.- Parameters:
customAdditionalDrawAction
- custom additional draw action
-
-