Package com.nomagic.magicdraw.actions
Class DiagramsActionsManager
- java.lang.Object
-
- com.nomagic.magicdraw.actions.DiagramsActionsManager
-
@OpenApiAll public class DiagramsActionsManager extends java.lang.Object
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
Constructors Constructor Description DiagramsActionsManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addManager(java.lang.String type, java.util.function.Supplier<ActionsManager> manager)
Adds the given manager of the given diagram type.NMAction
getActionFor(javax.swing.KeyStroke stroke)
Return the action for given stroke.ActionsManager
getManager(java.lang.String type)
Returns the manager for the given diagram type.java.util.List<ActionsManager>
getManagers()
Returns the list of all managers.void
removeManager(java.lang.String type)
Removes the added manager of the given diagram type.
-
-
-
Method Detail
-
getManager
@CheckForNull public ActionsManager getManager(java.lang.String type)
Returns the manager for the given diagram type.- Returns:
- the manager for the given diagram type.
-
addManager
public void addManager(java.lang.String type, java.util.function.Supplier<ActionsManager> manager)
Adds the given manager of the given diagram type.- Parameters:
type
- the type of the diagram.manager
- the given manager.
-
removeManager
public void removeManager(java.lang.String type)
Removes the added manager of the given diagram type.- Parameters:
type
- the type of the diagram.
-
getManagers
public java.util.List<ActionsManager> getManagers()
Returns the list of all managers.- Returns:
- the list of all managers.
-
getActionFor
@CheckForNull public NMAction getActionFor(javax.swing.KeyStroke stroke)
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.
-
-