Package com.nomagic.magicdraw.actions
Class DiagramsActionsManager
java.lang.Object
com.nomagic.magicdraw.actions.DiagramsActionsManager
The class responsible for managing the actions used in all kind of diagrams.
All actions in this manager are grouped by diagram type.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addManager
(String type, Supplier<ActionsManager> manager) Adds the given manager of the given diagram type.getActionFor
(KeyStroke stroke) Return the action for given stroke.getManager
(String type) Returns the manager for the given diagram type.Returns the list of all managers.void
removeManager
(String type) Removes the added manager of the given diagram type.
-
Constructor Details
-
DiagramsActionsManager
public DiagramsActionsManager()
-
-
Method Details
-
getManager
Returns the manager for the given diagram type.- Returns:
- the manager for the given diagram type.
-
addManager
Adds the given manager of the given diagram type.- Parameters:
type
- the type of the diagram.manager
- the given manager.
-
removeManager
Removes the added manager of the given diagram type.- Parameters:
type
- the type of the diagram.
-
getManagers
Returns the list of all managers.- Returns:
- the list of all managers.
-
getActionFor
Return the action for given stroke. It looks in all managers.- Returns:
- the action for given stroke or null if there are no action with such stroke.
-