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.Cloneable
Descriptor 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.String
getCategory()
Diagram category name.MDActionsManager
getDiagramActions()
Returns manager of actions used in the diagram.abstract DiagramContextAMConfigurator
getDiagramContextConfigurator()
abstract AMConfigurator
getDiagramShortcutsConfigurator()
abstract AMConfigurator
getDiagramToolbarConfigurator()
abstract java.lang.String
getDiagramTypeId()
Return diagram type id.abstract java.lang.String
getPluralDiagramTypeHumanName()
Return diagram human name.abstract java.lang.String
getSingularDiagramTypeHumanName()
Return diagram human name.abstract java.net.URL
getSmallIconURL()
URL of small icon for diagram.abstract java.lang.String
getSuperType()
Returns super type of this diagram.abstract ResizableIcon
getSVGIcon()
Resizable icon for diagram.abstract boolean
isCreatable()
Returns creatable flag.boolean
isUsedForSymbols()
Check if this diagram is used to draw symbols.void
setCategory(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 Diagram
is a 'super diagram' forCollaboration Diagram
andSequence 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
-
-