@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
Constructor and Description |
---|
MultipleModelElementAction(java.lang.String actionID,
java.lang.String actionName,
javax.swing.KeyStroke stroke,
java.lang.String group)
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, updateState
accept, addAction, addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, clone, compareTo, createMenuItem, equals, firePropertyChange, getActions, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeIcon, getLargeOrSmallIcon, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallIcon, getSmallOrLargeIcon, hashCode, isIDGenerated, removeAction, removePropertyChangeListener, removeShortcut, removeWeakPropertyChangeListener, setActions, setDescription, setGroup, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, 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 groupprotected 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