Class DiagramPresentationElement
java.lang.Object
com.nomagic.magicdraw.uml.core.impl.MDElementImpl
com.nomagic.magicdraw.uml.symbols.PresentationElement
com.nomagic.magicdraw.uml.symbols.AbstractDiagramPresentationElement
com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement
- All Implemented Interfaces:
com.dassault_systemes.modeler.foundation.project.ModelElementProjectProvider,com.nomagic.magicdraw.core.diagram.DiagramPresentationImplementer,BaseElement,MDElement,ModelElementProvider,com.nomagic.magicdraw.uml.symbols.PropertyBasedPresentationElement,com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner,StereotypesDisplayModeOwner,NameOwner,PropertyChangeListener,Cloneable,Comparable,EventListener
@OpenApi
public class DiagramPresentationElement
extends AbstractDiagramPresentationElement
implements com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner, StereotypesDisplayModeOwner, com.nomagic.magicdraw.core.diagram.DiagramPresentationImplementer, com.nomagic.magicdraw.uml.symbols.PropertyBasedPresentationElement
Class for representing UML diagram. Diagram purpose is to contain set of presentation elements.
For diagram creation use
For working with diagram presentation elements use
For diagram creation use
ModelElementsManager class.For working with diagram presentation elements use
PresentationElementsManager class.- See Also:
-
Field Summary
Fields inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
DASHED_STROKE, DOTTED_STROKE, SOLID_STROKEFields inherited from interface com.nomagic.magicdraw.uml.symbols.shapes.StereotypesDisplayModeOwner
DSL_STEREOTYPE_DISPLAY_MODE_ALL, DSL_STEREOTYPE_DISPLAY_MODE_LAST, DSL_STEREOTYPE_DISPLAY_MODE_NONE, DSL_STEREOTYPE_DISPLAY_MODES, STEREOTYPE_DISPLAY_MODE_DO_NOT_DISPLAY_STEREOTYPES, STEREOTYPE_DISPLAY_MODE_ICON, STEREOTYPE_DISPLAY_MODE_SHAPE_IMAGE, STEREOTYPE_DISPLAY_MODE_SHAPE_IMAGE_AND_TEXT, STEREOTYPE_DISPLAY_MODE_TEXT, STEREOTYPE_DISPLAY_MODE_TEXT_AND_ICON, STEREOTYPES_DISPLAY_MODES, STEREOTYPES_DISPLAY_MODES_SIMPLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(BasePresentationElementVisitor visitor) static DiagramPresentationElementget(PresentationElement symbol) Returns diagram of given presentation element.Returns Diagram model element of this presentation element.Get the frame of the diagram.Returns the type of the diagram.Returns collection of model elements that have views in this diagram.getUsedModelElements(boolean checkOnlyPersistent) Deprecated.checkOnlyPersistent parameter is ignored.getUsedModelElements(UsedElementPolicy usedElementPolicy) Returns collection of model elements that are used in this diagram.booleanisElementInDiagram(Element element) Checks if given element exist in any diagram.booleanisElementInDiagram(Element element, UsedElementPolicy usedElementPolicy) Checks if given element exist in any diagram.booleanbooleanChecks if diagram displays symbols as its contents.voidsetDiagramType(DiagramType type) Sets the type of the diagram and fires the property change event with name ExtendedPropertyNames.EDIT_DIAGRAM_TYPE .voidsetInitialFrameSizeSet(boolean value) Set a flag that diagram frame size should not be recalculated on opening.voidsSetDiagramType(DiagramType type) Sets the type of the diagram.Methods inherited from class com.nomagic.magicdraw.uml.symbols.AbstractDiagramPresentationElement
addContentPropertyChangeListener, close, collectPresentationElementsRecursively, collectShowingManipulatedElementsRecursively, collectShowingPresentationElementsRecursively, ensureLoaded, findPresentationElement, findPresentationElement, findPresentationElementForPathConnecting, findPresentationElementsForPathConnecting, isLoaded, open, open, openInActiveTab, removeContentPropertyChangeListenerMethods inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
collectSubManipulatedElements, editName, editName, getBoundsShape, getManipulatedParent, getManipulatedPresentationElements, getMiddlePoint, getObjectParent, getParent, getPreferredDimension, getPresentationElementStroke, getPresentationElementStroke, getSelected, getStroke, getStroke, getStroke, getStroke, getStroke, getStroke, hasManipulatedPresentationElements, isSelected, onFind, onFind, setAllSelected, setSelected, setSelectedMethods inherited from class com.nomagic.magicdraw.uml.core.impl.MDElementImpl
canAdd, canAddChild, canBeDeleted, compareTo, createSortKeys, getClassType, getResourceID, getSortKeys, hasListeners, isEditable, removeAllParents, removeAllPropertyChangeListeners, sGetID, toStringMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.nomagic.magicdraw.uml.BaseElement
canAdd, isSelfChangeableMethods inherited from interface com.nomagic.magicdraw.uml.symbols.PropertyBasedPresentationElement
addProperty, asPresentationElement, getProperty, getPropertyManager
-
Constructor Details
-
DiagramPresentationElement
@OpenApi public DiagramPresentationElement()Constructs new empty diagram. Do not use this constructor to create a diagram explicitly. Open API provides method for diagrams creation.- See Also:
-
-
Method Details
-
sSetDiagramType
Sets the type of the diagram.- Parameters:
type- the type of the diagram
-
setDiagramType
Sets the type of the diagram and fires the property change event with name ExtendedPropertyNames.EDIT_DIAGRAM_TYPE .- Parameters:
type- the type of the diagram- See Also:
-
getDiagramType
Returns the type of the diagram.- Returns:
- the type of the diagram
- See Also:
-
getDiagram
Returns Diagram model element of this presentation element.- Returns:
- Diagram object of this element.
- See Also:
-
accept
- Overrides:
acceptin classAbstractDiagramPresentationElement- Throws:
Exception
-
getUsedModelElements
Deprecated.checkOnlyPersistent parameter is ignored. UsegetUsedModelElements()Returns collection of model elements that are drawn in this diagram.- Parameters:
checkOnlyPersistent- if true, result includes elements for symbols which are saved to XMI and not created at run-time. If false, includes all elements.- Returns:
- collection of model elements.
-
getUsedModelElements
Returns collection of model elements that have views in this diagram.- Returns:
- collection of model elements.
-
getUsedModelElements
Returns collection of model elements that are used in this diagram.- Parameters:
usedElementPolicy- used element policy- Returns:
- collection of model elements.
-
isElementInDiagram
Checks if given element exist in any diagram.- Parameters:
element- element- Returns:
- true if element exist in any diagram otherwise false
-
isElementInDiagram
Checks if given element exist in any diagram.- Parameters:
element- element- Returns:
- true if element exist in any diagram otherwise false
-
getDiagramFrame
Get the frame of the diagram.- Returns:
- frame of the diagram.
-
isInitialFrameSizeSet
@OpenApi public boolean isInitialFrameSizeSet()- Returns:
- false if diagram frame size should not be recalculated on opening.
-
setInitialFrameSizeSet
@OpenApi public void setInitialFrameSizeSet(boolean value) Set a flag that diagram frame size should not be recalculated on opening.- Parameters:
value- new value
-
get
Returns diagram of given presentation element.- Returns:
- diagram of given presentation element.
-
isSymbolDiagram
@OpenApi public boolean isSymbolDiagram()Checks if diagram displays symbols as its contents. Another type of diagrams may be tables, matrices.- Overrides:
isSymbolDiagramin classAbstractDiagramPresentationElement- Returns:
- true if diagram displays symbols
-