@OpenApiAll public class MultipleModelElementAction extends SingleModelElementAction implements IMultipleModelElementAction
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 |
---|
MultipleModelElementAction(java.lang.String actionID,
java.lang.String actionName,
javax.swing.KeyStroke stroke,
java.lang.String group)
Constructor
|
MultipleModelElementAction(java.lang.String actionID,
java.lang.String actionName,
javax.swing.KeyStroke stroke,
java.lang.String group,
boolean useSchema)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static <T> java.util.List<T> |
createCollection(T element)
Utility method to create an empty collection in case given element is null or a singleton collection in other case.
|
protected Element |
getElement()
Returns data from selected node.
|
protected java.util.List<Element> |
getElements()
Returns data from selected node.
|
ModelElementsProvider |
getElementsProvider()
Gets the provider.
|
void |
setElementsProvider(ModelElementsProvider provider)
Set provider for action
|
getProvider, setProvider
actionPerformed, isUseShortcutSchema, updateState
accept, 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
public MultipleModelElementAction(@CheckForNull java.lang.String actionID, java.lang.String actionName, @CheckForNull javax.swing.KeyStroke stroke, @CheckForNull java.lang.String group)
actionID
- action idactionName
- action namestroke
- action strokegroup
- action grouppublic MultipleModelElementAction(@CheckForNull java.lang.String actionID, java.lang.String actionName, @CheckForNull javax.swing.KeyStroke stroke, @CheckForNull java.lang.String group, boolean useSchema)
actionID
- action idactionName
- action namestroke
- action strokegroup
- action groupuseSchema
- use shortcuts schemaprotected java.util.List<Element> getElements()
public static <T> java.util.List<T> createCollection(@CheckForNull T element)
element
- elementpublic void setElementsProvider(ModelElementsProvider provider)
setElementsProvider
in interface IMultipleModelElementAction
provider
- the provider to setpublic ModelElementsProvider getElementsProvider()
IMultipleModelElementAction
getElementsProvider
in interface IMultipleModelElementAction
protected Element getElement()
SingleModelElementAction
getElement
in class SingleModelElementAction