@OpenApiAll public class DefaultDiagramAction extends MDAction implements DiagramAction
ACTION_SHORTCUTS, BELONGS_TO_SEPARATE_GROUP_IN_UI, DO_NO_SHOW_ACTION_NAME_IN_UI, GENERATED_ID_PREFIX, GROUP, ID, LARGE_ICON, MENU_SHORTCUT_MASK, TINY_ICON
Constructor and Description |
---|
DefaultDiagramAction(java.lang.String actionID,
java.lang.String actionName,
javax.swing.KeyStroke stroke,
java.lang.String group)
Constructs new action.
|
Modifier and Type | Method and Description |
---|---|
DiagramPresentationElement |
getDiagram()
Returns diagram of this action.
|
protected PresentationElement |
getFirstSelected()
Returns first selected presentation element in the diagram.
|
protected java.util.List<PresentationElement> |
getSelected()
Returns list of selected presentation elements.
|
void |
setDiagram(DiagramPresentationElement diagram)
Sets diagram for this action.
|
actionPerformed, updateState
accept, addAction, addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, clone, compareTo, createMenuItem, equals, firePropertyChange, getActions, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeIcon, getLargeOrSmallIcon, getMenuShortcutMaskAsString, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallIcon, getSmallOrLargeIcon, getTinyIcon, hashCode, hasMenuShortcutMask, isIDGenerated, removeAction, removePropertyChangeListener, removeShortcut, removeWeakPropertyChangeListener, setActions, setDescription, setGroup, setIcon, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, setTinyIcon, shallowClone, toString
public DefaultDiagramAction(@CheckForNull java.lang.String actionID, @CheckForNull java.lang.String actionName, @CheckForNull javax.swing.KeyStroke stroke, @CheckForNull java.lang.String group)
actionID
- the action IDactionName
- the action namestroke
- the action strokegroup
- the action grouppublic void setDiagram(@CheckForNull DiagramPresentationElement diagram)
setDiagram
in interface DiagramAction
diagram
- the given diagram@CheckForNull public DiagramPresentationElement getDiagram()
@CheckForNull protected PresentationElement getFirstSelected()
@Nonnull protected java.util.List<PresentationElement> getSelected()