Package se.conciliate.extensions.ui
Interface ModelingActionProvider
public interface ModelingActionProvider
Provides actions that are shown for entities in the modeling tool.
-
Method Summary
Modifier and TypeMethodDescriptiondefault List<ModelingAction>
getActionsForCompleteEdge
(MTCompleteEdge edge, Component invoker, Point p) Returns actions that can be performed on a loaded edge.default List<? extends ModelingAction>
getActionsForCompleteModel
(MTCompleteModel model, Component invoker, Point p) Returns actions that can be performed on a fully loaded model.default List<ModelingAction>
getActionsForCompleteVertex
(MTCompleteVertex vertex, Component invoker, Point p) Returns actions that can be performed on a loaded symbol.default List<ModelingAction>
Returns actions that can be performed on an edge header.default List<? extends ModelingAction>
Returns actions that can be performed on a model header.default List<? extends ModelingAction>
getActionsForModelType
(ModelType modelType) Returns actions that can be performed on the the type itself, i.e.default List<ModelingAction>
Returns actions that can be performed on a symbol header.default Collection<String>
Returns the names of core keyboard shortcuts that are overridden by this action provider in a given model.default ModelingAction
getShortcutActionForCompleteEdge
(MTCompleteEdge edge, KeyStroke ks, boolean doubleClick, Component invoker, Point p) Returns an action to be executed for a keyboard shortcut or double-click on an edge.default ModelingAction
getShortcutActionForCompleteModel
(MTCompleteModel model, KeyStroke ks, boolean doubleClick, Component invoker, Point p) Returns an action to be executed for a keyboard shortcut or double-click on a model.default ModelingAction
getShortcutActionForCompleteVertex
(MTCompleteVertex vertex, KeyStroke ks, boolean doubleClick, Component invoker, Point p) Returns an action to be executed for a keyboard shortcut or double-click on a vertex.default List<ModelingAction>
Returns "tools" actions.default List<ModelingAction>
getToolsActions
(Runnable onUpdate) Returns "tools" actions.
-
Method Details
-
getActionsForCompleteVertex
default List<ModelingAction> getActionsForCompleteVertex(MTCompleteVertex vertex, Component invoker, Point p) Returns actions that can be performed on a loaded symbol. This will most likely only be shown in the UI when right-clicking a vertex showing the symbol.- Parameters:
vertex
- The vertex containing the symbol being edited.invoker
- The invoker component to use if showing a UIPopup.p
- The point to use if showing a UIPopup.- Returns:
- A list of actions to show for the vertex/symbol.
- Since:
- 3.3
-
getShortcutActionForCompleteVertex
default ModelingAction getShortcutActionForCompleteVertex(MTCompleteVertex vertex, KeyStroke ks, boolean doubleClick, Component invoker, Point p) Returns an action to be executed for a keyboard shortcut or double-click on a vertex. Note that returning an action for double-click will override the default title editor.- Parameters:
vertex
- The selected vertex.ks
- The keystroke or null if this is a double-click on the vertex.doubleClick
- true if this was a double-click on the vertex.invoker
- The invoker component to use if showing a UIPopup.p
- The point to use if showing a UIPopup.- Returns:
- An action for the short-cut or double-click to execute, or null to ignore the event.
-
getActionsForSymbolHeader
Returns actions that can be performed on a symbol header. This could be used for example in the object browser.- Parameters:
symbol
- The symbol being edited.- Returns:
- A list of actions to show for the vertex/symbol.
- Since:
- 3.3
-
getActionsForModelType
Returns actions that can be performed on the the type itself, i.e. the action does not have a model as context. An example might be editing settings that are global for all models of the type, such as default swimlane settings. It might also be an action to create models of the type (although this is handled by the framework) or to close all open models of that type.- Parameters:
modelType
- The model type.- Returns:
- A list of actions for the model type.
- Since:
- 3.3
-
getActionsForCompleteModel
default List<? extends ModelingAction> getActionsForCompleteModel(MTCompleteModel model, Component invoker, Point p) Returns actions that can be performed on a fully loaded model. This can be actions to edit custom properties (that need fully loaded models).- Parameters:
model
- The model being edited.- Returns:
- A list of actions to show for the model.
- Since:
- 3.3
-
getShortcutActionForCompleteModel
default ModelingAction getShortcutActionForCompleteModel(MTCompleteModel model, KeyStroke ks, boolean doubleClick, Component invoker, Point p) Returns an action to be executed for a keyboard shortcut or double-click on a model.- Parameters:
model
- The selected model.ks
- The keystroke or null if this is a double-click on the model.doubleClick
- true if this was a double-click on the model.invoker
- The invoker component to use if showing a UIPopup.p
- The point to use if showing a UIPopup.- Returns:
- An action for the short-cut or double-click to execute, or null to ignore the event.
-
getActionsForModelHeader
Returns actions that can be performed on a model header. Note that the actions returned are able to load the model (asynchronously) and make changes to the fully loaded model.- Parameters:
model
- The model being edited.- Returns:
- A list of actions to show for the model.
- Since:
- 3.3
-
getActionsForCompleteEdge
default List<ModelingAction> getActionsForCompleteEdge(MTCompleteEdge edge, Component invoker, Point p) Returns actions that can be performed on a loaded edge. This will most likely only be shown in the UI when right-clicking the edge in the editor.- Parameters:
edge
- The edge being edited.- Returns:
- A list of actions to show for the edge.
- Since:
- 3.3
-
getShortcutActionForCompleteEdge
default ModelingAction getShortcutActionForCompleteEdge(MTCompleteEdge edge, KeyStroke ks, boolean doubleClick, Component invoker, Point p) Returns an action to be executed for a keyboard shortcut or double-click on an edge. Note that returning an action for double-click will override the default type and title editor.- Parameters:
edge
- The selected edge.ks
- The keystroke or null if this is a double-click on the edge.doubleClick
- true if this was a double-click on the edge.invoker
- The invoker component to use if showing a UIPopup.p
- The point to use if showing a UIPopup.- Returns:
- An action for the short-cut or double-click to execute, or null to ignore the event.
-
getActionsForEdgeHeader
Returns actions that can be performed on an edge header.- Parameters:
edge
- The edge being edited.- Returns:
- A list of actions to show for the vertex/symbol.
- Since:
- 3.3
-
getToolsActions
Returns "tools" actions. These will not be shown for a specific model but instead will appear in the top-level UI, for example under the "tools menu. -
getToolsActions
Returns "tools" actions. These will not be shown for a specific model but instead will appear in the top-level UI, for example under the "tools menu.- Parameters:
onUpdate
- Call this if some state has changed that should cause a rebuild of the actions in the UI. Never invoke this directly in the call since this will cause an endless loop of updates.
-
getOverriddenShortcuts
Returns the names of core keyboard shortcuts that are overridden by this action provider in a given model. These are enum constant names that are currently not publicly exposed through the API, see KeyboardShortcut in the client.
-