Package com.nomagic.actions
Class ActionsCommandBarCreator
java.lang.Object
com.nomagic.actions.ActionsCommandBarCreator
- All Implemented Interfaces:
ActionsVisitor
,com.nomagic.magicdraw.ui.actions.MainActionsVisitor
@OpenApiAll
public abstract class ActionsCommandBarCreator
extends Object
implements ActionsVisitor, com.nomagic.magicdraw.ui.actions.MainActionsVisitor
The abstract class for creating toolbars from actions.
This class provides common framework for toolbar creation, but does not
implement specific methods for buttons creation.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Buttons factory used to create a buttonstatic class
The renderer used to represent some font face name.static class
Class for representing list action as combo box.static class
static class
static interface
Buttons factory used to create a button -
Field Summary
Modifier and TypeFieldDescriptionprotected JComponent
The toolbar to add buttons into during the visit actions. -
Constructor Summary
ModifierConstructorDescriptionprotected
Creates new creator with Jide buttons factoryprotected
Creates new creator with given buttons factoryprotected
ActionsCommandBarCreator
(ActionsCommandBarCreator.ButtonFactory factory, ActionsCommandBarCreator.SplitButtonFactory splitButtonFactory) Creates new creator with given buttons factory -
Method Summary
Modifier and TypeMethodDescriptionprotected void
acceptChildren
(ActionsManager manager) For all categories in manager calls accept this visitor.protected void
acceptChildren
(NMAction parent) Calls accept for all actions in given action.protected void
Adds a flexible separator into the current toolbar.protected abstract void
protected void
addToJideSplitButton
(ActionsCategory category) protected AbstractButton
createComponent
(NMAction action) Creates NMActionButton for given action.protected AbstractButton
createComponent
(NMStateAction action) Creates MDStateActionButton from MDStateAction.protected AbstractButton
createComponent
(NMTriStateAction action) Creates MDStateActionButton from MDTriStateAction.protected Component
createComponent
(com.nomagic.magicdraw.uml.symbols.actions.ChangeFontAction action) protected Component
createComponent
(com.nomagic.magicdraw.uml.symbols.actions.ChangeZoomAction category) protected com.nomagic.awt.NMJideSplitButton
protected void
com.nomagic.awt.ActionIconProvider
void
setIconProvider
(com.nomagic.awt.ActionIconProvider iconProvider) abstract void
visit
(ActionsCategory category) Visits ActionsCategory.void
Visits action.void
visit
(NMStateAction action) Visits NMStateAction.void
visit
(NMTriStateAction action) Visits NMTriStateActionvoid
visit
(SelectItemAction action) void
visit
(PropertyAction action) void
visit
(com.nomagic.magicdraw.uml.symbols.actions.ChangeFontAction action) void
visit
(com.nomagic.magicdraw.uml.symbols.actions.ChangeZoomAction category)
-
Field Details
-
currentToolbar
The toolbar to add buttons into during the visit actions.
-
-
Constructor Details
-
ActionsCommandBarCreator
protected ActionsCommandBarCreator()Creates new creator with Jide buttons factory -
ActionsCommandBarCreator
Creates new creator with given buttons factory- Parameters:
factory
- factory
-
ActionsCommandBarCreator
protected ActionsCommandBarCreator(ActionsCommandBarCreator.ButtonFactory factory, ActionsCommandBarCreator.SplitButtonFactory splitButtonFactory) Creates new creator with given buttons factory- Parameters:
factory
- factory
-
-
Method Details
-
acceptChildren
For all categories in manager calls accept this visitor.- Parameters:
manager
- manager from which categories will be collected.
-
addFlexibleSeparator
protected void addFlexibleSeparator()Adds a flexible separator into the current toolbar. It should move other buttons to the most right/bottom position -
addToJideSplitButton
-
createJideSplitButton
-
acceptChildren
Calls accept for all actions in given action.- Parameters:
parent
- container of actions.
-
createComponent
Creates NMActionButton for given action.- Parameters:
action
- action source for button.- Returns:
- created button.
-
createComponent
Creates MDStateActionButton from MDStateAction.- Parameters:
action
- source for creating button.- Returns:
- created button.
-
createComponent
Creates MDStateActionButton from MDTriStateAction.- Parameters:
action
- source for creating button.- Returns:
- created button.
-
visit
Description copied from interface:ActionsVisitor
Visits action.- Specified by:
visit
in interfaceActionsVisitor
- Parameters:
action
- the action to visit.
-
visit
Description copied from interface:ActionsVisitor
Visits NMStateAction.- Specified by:
visit
in interfaceActionsVisitor
- Parameters:
action
- the action to visit.
-
visit
Description copied from interface:ActionsVisitor
Visits NMTriStateAction- Specified by:
visit
in interfaceActionsVisitor
- Parameters:
action
- the action to visit
-
visit
Description copied from interface:ActionsVisitor
Visits ActionsCategory.- Specified by:
visit
in interfaceActionsVisitor
- Parameters:
category
- the category to visit.
-
visit
- Specified by:
visit
in interfacecom.nomagic.magicdraw.ui.actions.MainActionsVisitor
-
visit
public void visit(com.nomagic.magicdraw.uml.symbols.actions.ChangeFontAction action) - Specified by:
visit
in interfacecom.nomagic.magicdraw.ui.actions.MainActionsVisitor
-
createComponent
protected Component createComponent(com.nomagic.magicdraw.uml.symbols.actions.ChangeFontAction action) -
visit
public void visit(com.nomagic.magicdraw.uml.symbols.actions.ChangeZoomAction category) - Specified by:
visit
in interfacecom.nomagic.magicdraw.ui.actions.MainActionsVisitor
-
createComponent
protected Component createComponent(com.nomagic.magicdraw.uml.symbols.actions.ChangeZoomAction category) -
visit
- Specified by:
visit
in interfacecom.nomagic.magicdraw.ui.actions.MainActionsVisitor
-
createPropertyActionComponent
-
getIconProvider
public com.nomagic.awt.ActionIconProvider getIconProvider() -
setIconProvider
public void setIconProvider(com.nomagic.awt.ActionIconProvider iconProvider) -
addToCurrentToolbar
-