Package com.nomagic.magicdraw.actions
Class ActionsCreator
- java.lang.Object
-
- com.nomagic.magicdraw.actions.ActionsCreator
-
@OpenApi public class ActionsCreator extends java.lang.Object
The helper class used for creating and holding all MagicDraw actions.
-
-
Field Summary
Fields Modifier and Type Field Description private MDActionsManager
activityDgrActionsManager
Cached activity diagram actions.private MDActionsManager
anyDgrActionsManager
Cached Any diagram actions.private MDActionsManager
classDgrActionsManager
Cached Class diagram actions.private MDActionsManager
collaborationDgrActionsManager
Cached Collaboration diagram actions.private MDActionsManager
componentDgrActionsManager
Cached component diagram actions.private MDActionsManager
compositeStructureDgrActionsManager
Cached composite structure diagram actions.private PropertyManager
configuration
Loaded actions configuration.private ActionsCategory
customCategory
private MDActionsManager
deploymentDgrActionsManager
Cached deployment diagram actions.private MDActionsManager
diagramContextToolbarActionsManager
Cached Class diagram actions.private DiagramsActionsManager
diagramsActionsManager
All diagrams actions.private MDActionsManager
generalActionsManager
Cached general actions.private MDActionsManager
interactionOverviewDgrActionsManager
Cached interaction overview diagram actions.static java.util.Collection<java.lang.String>
LAYOUT_ACTIONS
private MDActionsManager
objectDgrActionsManager
Cached object diagram actions.private MDActionsManager
packageDgrActionsManager
Cached package diagram actions.private MDActionsManager
profileDgrActionsManager
Cached profile diagram actions.private MDActionsManager
protocolStateDgrActionsManager
Cached state diagram actions.private MDActionsManager
sequenceDgrActionsManager
Cached sequence diagram actions.private MDActionsManager
stateDgrActionsManager
Cached state diagram actions.private MDActionsManager
useCaseDgrActionsManager
Cached UseCase diagram actions.
-
Constructor Summary
Constructors Constructor Description ActionsCreator()
The constructor which constructs all categories and actions and adds everything into the given actions manager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
applyDefaultConfiguration(java.util.Collection<NMAction> actions)
private static NMAction
createAction(ActionsCategory category, java.lang.String id, javax.swing.KeyStroke key, java.lang.String group)
Creates action.private static NMAction
createAction(ActionsCategory category, java.lang.String id, javax.swing.KeyStroke keyStroke, java.lang.String group, java.lang.String key)
Creates action.MDActionsManager
createActivityDiagramActions()
Creates the actions for activity diagramMDActionsManager
createAnyDiagramActions()
Creates the actions for any abstract diagram.private static ActionsCategory
createCategory(java.lang.String id)
Creates actions category.private static ActionsCategory
createCategory(java.lang.String actionID, java.lang.String name)
Creates category with given id and name.MDActionsManager
createClassDiagramActions()
Creates the actions for class diagram.void
createCommonDiagramsActions(ActionsCategory category)
Creates actions common for all diagrams.MDActionsManager
createCommunicationDiagramActions()
Creates the actions for collaboration diagramMDActionsManager
createComponentDiagramActions()
Creates the actions for component diagramMDActionsManager
createCompositeStructureDiagramActions()
Creates the actions for composite structure diagramMDActionsManager
createDeploymentDiagramActions()
Creates the actions for deployment diagramprivate static com.nomagic.magicdraw.ui.actions.BaseDiagramAction
createDiagramAction(ActionsCategory category, java.lang.String id, javax.swing.KeyStroke key)
Creates diagram action.private static DiagramContextToolbarAction
createDiagramContextToolbarAction(ActionsCategory category, java.lang.String id, javax.swing.Icon icon)
Creates action.MDActionsManager
createDiagramContextToolbarActions()
DiagramsActionsManager
createDiagramsActionsManager()
Creates the action managers for diagramsMDActionsManager
createGeneralActions()
Creates the general actions.private static ActionsCategory
createHelpCategory()
MDActionsManager
createImplementationDiagramActions()
Deprecated.MDActionsManager
createInteractionOverviewDiagramActions()
Creates the actions for activity diagramMDActionsManager
createObjectDiagramActions()
Creates the actions for object diagramMDActionsManager
createPackageDiagramActions()
Creates the actions for package diagramMDActionsManager
createProfileDiagramActions()
Creates the actions for profile diagramMDActionsManager
createProtocolStateDiagramActions()
Creates the actions for protocol state machine diagramMDActionsManager
createSequenceDiagramActions()
Creates the actions for collaboration diagramMDActionsManager
createStateDiagramActions()
Creates the actions for state diagramMDActionsManager
createUseCaseDiagramActions()
Creates the actions for use case diagramDiagramContextToolbarAction
getAction(java.lang.String id, javax.swing.Icon icon)
void
storeDefaultConfiguration()
-
-
-
Field Detail
-
generalActionsManager
private MDActionsManager generalActionsManager
Cached general actions.
-
anyDgrActionsManager
private MDActionsManager anyDgrActionsManager
Cached Any diagram actions.
-
classDgrActionsManager
private MDActionsManager classDgrActionsManager
Cached Class diagram actions.
-
useCaseDgrActionsManager
private MDActionsManager useCaseDgrActionsManager
Cached UseCase diagram actions.
-
collaborationDgrActionsManager
private MDActionsManager collaborationDgrActionsManager
Cached Collaboration diagram actions.
-
sequenceDgrActionsManager
private MDActionsManager sequenceDgrActionsManager
Cached sequence diagram actions.
-
stateDgrActionsManager
private MDActionsManager stateDgrActionsManager
Cached state diagram actions.
-
protocolStateDgrActionsManager
private MDActionsManager protocolStateDgrActionsManager
Cached state diagram actions.
-
activityDgrActionsManager
private MDActionsManager activityDgrActionsManager
Cached activity diagram actions.
-
interactionOverviewDgrActionsManager
private MDActionsManager interactionOverviewDgrActionsManager
Cached interaction overview diagram actions.
-
objectDgrActionsManager
private MDActionsManager objectDgrActionsManager
Cached object diagram actions.
-
packageDgrActionsManager
private MDActionsManager packageDgrActionsManager
Cached package diagram actions.
-
componentDgrActionsManager
private MDActionsManager componentDgrActionsManager
Cached component diagram actions.
-
deploymentDgrActionsManager
private MDActionsManager deploymentDgrActionsManager
Cached deployment diagram actions.
-
profileDgrActionsManager
private MDActionsManager profileDgrActionsManager
Cached profile diagram actions.
-
compositeStructureDgrActionsManager
private MDActionsManager compositeStructureDgrActionsManager
Cached composite structure diagram actions.
-
diagramsActionsManager
private DiagramsActionsManager diagramsActionsManager
All diagrams actions.
-
diagramContextToolbarActionsManager
private MDActionsManager diagramContextToolbarActionsManager
Cached Class diagram actions.
-
customCategory
private ActionsCategory customCategory
-
configuration
private PropertyManager configuration
Loaded actions configuration.
-
LAYOUT_ACTIONS
public static final java.util.Collection<java.lang.String> LAYOUT_ACTIONS
-
-
Method Detail
-
createGeneralActions
@OpenApi public MDActionsManager createGeneralActions()
Creates the general actions.- Returns:
- create general actions.
-
createHelpCategory
private static ActionsCategory createHelpCategory()
-
createCommonDiagramsActions
@OpenApi public void createCommonDiagramsActions(ActionsCategory category)
Creates actions common for all diagrams. This method will always create new instances of the actions.- Parameters:
category
- the category to add created actions into.
-
createClassDiagramActions
@OpenApi public MDActionsManager createClassDiagramActions()
Creates the actions for class diagram.- Returns:
- the class diagram actions.
-
createUseCaseDiagramActions
@OpenApi public MDActionsManager createUseCaseDiagramActions()
Creates the actions for use case diagram- Returns:
- the use case diagram actions.
-
createCommunicationDiagramActions
@OpenApi public MDActionsManager createCommunicationDiagramActions()
Creates the actions for collaboration diagram- Returns:
- the collaboration diagram actions.
-
createSequenceDiagramActions
@OpenApi public MDActionsManager createSequenceDiagramActions()
Creates the actions for collaboration diagram- Returns:
- the sequence diagram actions.
-
createStateDiagramActions
@OpenApi public MDActionsManager createStateDiagramActions()
Creates the actions for state diagram- Returns:
- the state diagram actions.
-
createProtocolStateDiagramActions
@OpenApi public MDActionsManager createProtocolStateDiagramActions()
Creates the actions for protocol state machine diagram- Returns:
- the protocol state machine diagram actions.
-
createActivityDiagramActions
@OpenApi public MDActionsManager createActivityDiagramActions()
Creates the actions for activity diagram- Returns:
- the activity diagram actions.
-
createInteractionOverviewDiagramActions
@OpenApi public MDActionsManager createInteractionOverviewDiagramActions()
Creates the actions for activity diagram- Returns:
- the activity diagram actions.
-
createImplementationDiagramActions
@OpenApi @Deprecated public MDActionsManager createImplementationDiagramActions()
Deprecated.Creates the actions for implementation diagram- Returns:
- the implementation diagram actions.
-
createObjectDiagramActions
@OpenApi public MDActionsManager createObjectDiagramActions()
Creates the actions for object diagram- Returns:
- the object diagram actions.
-
createPackageDiagramActions
@OpenApi public MDActionsManager createPackageDiagramActions()
Creates the actions for package diagram- Returns:
- the package diagram actions.
-
createComponentDiagramActions
@OpenApi public MDActionsManager createComponentDiagramActions()
Creates the actions for component diagram- Returns:
- the component diagram actions.
-
createDeploymentDiagramActions
@OpenApi public MDActionsManager createDeploymentDiagramActions()
Creates the actions for deployment diagram- Returns:
- the deployment diagram actions.
-
createProfileDiagramActions
@OpenApi public MDActionsManager createProfileDiagramActions()
Creates the actions for profile diagram- Returns:
- the profile diagram actions.
-
createCompositeStructureDiagramActions
@OpenApi public MDActionsManager createCompositeStructureDiagramActions()
Creates the actions for composite structure diagram- Returns:
- the composite structure diagram actions.
-
createDiagramsActionsManager
public DiagramsActionsManager createDiagramsActionsManager()
Creates the action managers for diagrams- Returns:
- all diagrams actions.
-
createAnyDiagramActions
@OpenApi public MDActionsManager createAnyDiagramActions()
Creates the actions for any abstract diagram.- Returns:
- the abstract diagram actions.
-
createDiagramAction
private static com.nomagic.magicdraw.ui.actions.BaseDiagramAction createDiagramAction(ActionsCategory category, java.lang.String id, @CheckForNull javax.swing.KeyStroke key)
Creates diagram action.- Parameters:
category
- category of action.id
- action id.key
- keystroke of action.
-
createAction
private static NMAction createAction(ActionsCategory category, java.lang.String id, @CheckForNull javax.swing.KeyStroke key, @CheckForNull java.lang.String group)
Creates action.- Parameters:
category
- category of action.id
- action id.key
- keystroke of action.group
- group of action.
-
createAction
private static NMAction createAction(ActionsCategory category, java.lang.String id, @CheckForNull javax.swing.KeyStroke keyStroke, @CheckForNull java.lang.String group, @CheckForNull java.lang.String key)
Creates action.- Parameters:
category
- category of action.id
- action id.keyStroke
- keystroke of action.group
- group of action.key
- key which is used getting name from resources.
-
createCategory
private static ActionsCategory createCategory(java.lang.String id)
Creates actions category.- Parameters:
id
- action id.
-
createCategory
private static ActionsCategory createCategory(java.lang.String actionID, java.lang.String name)
Creates category with given id and name.- Parameters:
actionID
- action idname
- of category- Returns:
- created category
-
storeDefaultConfiguration
public void storeDefaultConfiguration()
-
applyDefaultConfiguration
public void applyDefaultConfiguration(java.util.Collection<NMAction> actions)
-
createDiagramContextToolbarActions
public MDActionsManager createDiagramContextToolbarActions()
-
createDiagramContextToolbarAction
private static DiagramContextToolbarAction createDiagramContextToolbarAction(ActionsCategory category, java.lang.String id, @CheckForNull javax.swing.Icon icon)
Creates action.- Parameters:
category
- category of action.id
- action id.
-
getAction
public DiagramContextToolbarAction getAction(java.lang.String id, @CheckForNull javax.swing.Icon icon)
-
-