Package com.nomagic.magicdraw.uml
Class DiagramDescriptor
- java.lang.Object
-
- com.nomagic.magicdraw.uml.DiagramDescriptor
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
NonSymbolDiagramDescriptor
@OpenApi public abstract class DiagramDescriptor extends java.lang.Object implements java.lang.CloneableDescriptor of some extended diagram.
This descriptor is used to define a new diagram type in the MagicDraw application. New diagram type be extended from some already existing type. New diagram will have separate diagram panel with its own toolbar.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCategory()Diagram category name.MDActionsManagergetDiagramActions()Returns manager of actions used in the diagram.abstract DiagramContextAMConfiguratorgetDiagramContextConfigurator()abstract AMConfiguratorgetDiagramShortcutsConfigurator()abstract AMConfiguratorgetDiagramToolbarConfigurator()abstract java.lang.StringgetDiagramTypeId()Return diagram type id.abstract java.lang.StringgetPluralDiagramTypeHumanName()Return diagram human name.abstract java.lang.StringgetSingularDiagramTypeHumanName()Return diagram human name.abstract java.net.URLgetSmallIconURL()URL of small icon for diagram.abstract java.lang.StringgetSuperType()Returns super type of this diagram.abstract ResizableIcongetSVGIcon()Resizable icon for diagram.abstract booleanisCreatable()Returns creatable flag.booleanisUsedForSymbols()Check if this diagram is used to draw symbols.voidsetCategory(java.lang.String category)Set diagram category name.
-
-
-
Method Detail
-
getSuperType
@OpenApi public abstract java.lang.String getSuperType()
Returns super type of this diagram.- Returns:
- String the 'super diagram' type of the diagram type.
E.g.
Interaction Diagramis a 'super diagram' forCollaboration DiagramandSequence Diagram.
-
isCreatable
@OpenApi public abstract boolean isCreatable()
Returns creatable flag.- Returns:
- boolean flag indicating if the diagram will be creatable.
-
isUsedForSymbols
@OpenApi public boolean isUsedForSymbols()
Check if this diagram is used to draw symbols. Some diagram may be used to display tables, graphs or other components (for example dependency matrix table)- Returns:
- true if diagram is used to draw symbols
-
getDiagramToolbarConfigurator
@CheckForNull @OpenApi public abstract AMConfigurator getDiagramToolbarConfigurator()
- Returns:
- AMConfigurator which configures described diagram toolbar.
-
getDiagramShortcutsConfigurator
@CheckForNull @OpenApi public abstract AMConfigurator getDiagramShortcutsConfigurator()
- Returns:
- AMConfigurator which configures described diagram shortcuts.
-
getDiagramContextConfigurator
@CheckForNull @OpenApi public abstract DiagramContextAMConfigurator getDiagramContextConfigurator()
- Returns:
- AMConfigurator which configures described diagram context menu actions.
-
getDiagramTypeId
@OpenApi public abstract java.lang.String getDiagramTypeId()
Return diagram type id. Id is used to identify the diagram.- Returns:
- String used to identify diagram type.
- See Also:
DiagramTypeConstants
-
getSingularDiagramTypeHumanName
@OpenApi public abstract java.lang.String getSingularDiagramTypeHumanName()
Return diagram human name. Id is used to show the diagram type in the UI.- Returns:
- human diagram name in singular.
-
getPluralDiagramTypeHumanName
@OpenApi public abstract java.lang.String getPluralDiagramTypeHumanName()
Return diagram human name. Id is used to show the diagram type in the UI.- Returns:
- human diagram name in plural.
-
getSVGIcon
@CheckForNull @OpenApi public abstract ResizableIcon getSVGIcon()
Resizable icon for diagram. svg and wmf format. Used in Content diagram.- Returns:
- resizable icon in svg or wmf formats.
-
getSmallIconURL
@CheckForNull @OpenApi public abstract java.net.URL getSmallIconURL()
URL of small icon for diagram. Used in browser and menu.- Returns:
- URL to icon shown diagram in browser and menu items.
-
getDiagramActions
@OpenApi @CheckForNull public MDActionsManager getDiagramActions()
Returns manager of actions used in the diagram. Later these actions must be configured for toolbar or shortcuts. Only one instance of action must be used in the configurators. If this rule is not applied, some problems may occur(for example changed by user keyboard shortcuts for action may not be saved).- Returns:
- manager of actions.
-
getCategory
@CheckForNull @OpenApi public java.lang.String getCategory()
Diagram category name.- Returns:
- diagram category
-
setCategory
@OpenApi public void setCategory(@CheckForNull java.lang.String category)Set diagram category name.- Parameters:
category- category diagram category name
-
-