@OpenApi public class DiagramPresentationElement extends PresentationElement implements com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner, StereotypesDisplayModeOwner, com.nomagic.magicdraw.core.diagram.DiagramPresentationImplementer
ModelElementsManager
class.PresentationElementsManager
class.ModelElementsManager
,
PresentationElementsManager
DASHED_STROKE, DOTTED_STROKE, SOLID_STROKE
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 and Description |
---|
DiagramPresentationElement()
Constructs new empty diagram.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Method accepts visitor, and calls method visit<class name>(this) of visitor .
|
boolean |
addContentPropertyChangeListener(java.beans.PropertyChangeListener listener)
Registers the listener all diagram elements.
|
void |
close()
Closes diagram window.
|
void |
ensureLoaded()
Ensures that diagram is loaded.
|
PresentationElement |
findPresentationElement(Element element,
java.lang.Class presentationElementClass)
Finds presentation element for given model element of given symbol type in this diagram.
|
PresentationElement |
findPresentationElementForPathConnecting(BaseElement element,
java.lang.Class presentationElementClass)
Finds presentation element to connect some PathElement for given model element of given type in this diagram.
|
Diagram |
getDiagram()
Returns Diagram model element of this presentation element.
|
DiagramType |
getDiagramType()
Returns the type of the diagram.
|
java.util.Collection<Element> |
getUsedModelElements(boolean checkOnlyPersistent)
Returns collection of model elements that are drawn in this diagram.
|
boolean |
isElementInDiagram(Element element)
Checks if given element exist in any diagram.
|
boolean |
isInitialFrameSizeSet() |
boolean |
isLoaded()
Check if diagram is loaded.
|
boolean |
layout(boolean useCommands)
Layout the diagram using default layouter.
|
boolean |
layout(boolean useCommands,
DiagramLayouter layouter)
Layouts the diagram with the specified layouter.
|
boolean |
layout(boolean useCommands,
DiagramLayouter diagramLayouter,
AbstractDiagramLayouterOptionsGroup options)
Layout the diagram.
|
void |
open()
Open the diagram
|
void |
open(boolean showProgress)
Open the diagram in a new diagram tab, or activates diagram tab if this diagram is already open
|
void |
openInActiveTab(boolean showProgress)
Open diagram in currently active diagram tab
If no other diagram is opened yet, creates a new tab
If this diagram is already opened, simply activates that tab
|
boolean |
removeContentPropertyChangeListener(java.beans.PropertyChangeListener listener)
Unregister the given listener from the element.
|
void |
setDiagramType(DiagramType type)
Sets the type of the diagram and fires
the property change event with name ExtendedPropertyNames.EDIT_DIAGRAM_TYPE .
|
void |
setInitialFrameSizeSet(boolean value)
Set a flag that diagram frame size should not be recalculated on opening.
|
void |
sSetDiagramType(DiagramType type)
Sets the type of the diagram.
|
addProperty, collectSubManipulatedElements, editName, editName, getBounds, getBoundsShape, getDiagramPresentationElement, getDiagramSurface, getElement, getManipulatedParent, getManipulatedPresentationElements, getMiddlePoint, getObjectParent, getParent, getPreferredSize, getPresentationElements, getPresentationElementStroke, getPresentationElementStroke, getProperty, getPropertyManager, getSelected, getStroke, getStroke, getStroke, getStroke, getStroke, getStroke, hasManipulatedPresentationElements, isSelected, onFind, onFind, setAllSelected, setSelected, setSelected, useParentProperties
clone
accept, addPropertyChangeListener, atInsert, canAdd, canAdd, canAddChild, canAddChild, canAddInstance, canBeDeleted, canChangeParent, canDeleteChild, compareTo, createSortKeys, dispose, fireMultiSourcePropertyChange, firePropertyChange, generateID, getClassType, getCommandForAppending, getHumanName, getHumanType, getID, getName, getProject, getProjectImpl, getResourceID, getSortKeys, hasListeners, isEditable, isParentOf, removeAllChildren, removeAllParents, removeAllPropertyChangeListeners, removePropertyChangeListener, setID, setMDElement, sGetID, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getStereotypesDisplayMode, getUseStereotypeMode, isShowAbbreviatedDiagramType, isShowContextKind, isShowContextName, isShowContextType, isShowDiagramName, isShowDiagramType, isShowParameters
getDSLStereotypesDisplayMode, getStereotypesDisplayMode, setDSLStereotypesDisplayMode, setStereotypesDisplayMode, sSetDSLStereotypesDisplayMode, sSetStereotypesDisplayMode
@OpenApi public DiagramPresentationElement()
@OpenApi public void sSetDiagramType(@CheckForNull DiagramType type)
type
- the type of the diagram@OpenApi public void setDiagramType(DiagramType type)
type
- the type of the diagramExtendedPropertyNames.EDIT_DIAGRAM_TYPE
,
Project
@OpenApi public DiagramType getDiagramType()
DiagramTypeConstants.UML_CLASS_DIAGRAM
,
DiagramTypeConstants.UML_USECASE_DIAGRAM
,
DiagramTypeConstants.UML_COMMUNICATION_DIAGRAM
,
DiagramTypeConstants.UML_SEQUENCE_DIAGRAM
,
DiagramTypeConstants.UML_STATECHART_DIAGRAM
,
DiagramTypeConstants.UML_PROTOCOL_STATE_MACHINE_DIAGRAM
,
DiagramTypeConstants.UML_ACTIVITY_DIAGRAM
,
DiagramTypeConstants.UML_COMPOSITE_STRUCTURE_DIAGRAM
,
DiagramTypeConstants.UML_OBJECT_DIAGRAM
,
DiagramTypeConstants.UML_PACKAGE_DIAGRAM
,
DiagramTypeConstants.UML_COMPONENT_DIAGRAM
,
DiagramTypeConstants.UML_DEPLOYMENT_DIAGRAM
,
DiagramTypeConstants.UML_PROFILE_DIAGRAM
@OpenApi public Diagram getDiagram()
getElement()
@OpenApi public void accept(Visitor visitor) throws java.lang.Exception
MDElement
@OpenApi public void open()
@OpenApi public void open(boolean showProgress)
showProgress
- show progress dialog@OpenApi public void openInActiveTab(boolean showProgress)
showProgress
- show progress dialog@OpenApi @CheckForNull public final PresentationElement findPresentationElement(@CheckForNull Element element, @CheckForNull java.lang.Class presentationElementClass)
element
- the given ModelElement.presentationElementClass
- the class of presentation element or null if any.@CheckForNull @OpenApi public final PresentationElement findPresentationElementForPathConnecting(BaseElement element, java.lang.Class presentationElementClass)
element
- the given ModelElementpresentationElementClass
- the class of presentation element or null if any.@OpenApi public boolean isLoaded()
@OpenApi public void ensureLoaded()
@OpenApi public final void close()
@OpenApi public boolean layout(boolean useCommands)
Make sure before doing layout:
open()
to open diagram.SessionManager.closeSession()
to close session.PresentationElement.setSelected(java.util.List)
()} to selects symbols in the diagram.useCommands
- true to create commands. If true, this command will be available in project's command history.@OpenApi public boolean layout(boolean useCommands, DiagramLayouter layouter)
Make sure before doing layout:
open()
to open diagram.SessionManager.closeSession()
to close session.PresentationElement.setSelected(java.util.List)
()} to selects symbols in the diagram.useCommands
- true to create commands. If true, this command will be available in project's command history.layouter
- layouter to be used for layouting.@OpenApi public boolean layout(boolean useCommands, DiagramLayouter diagramLayouter, AbstractDiagramLayouterOptionsGroup options)
Make sure before doing layout:
open()
to open diagram.SessionManager.closeSession()
to close session.PresentationElement.setSelected(java.util.List)
()} to selects symbols in the diagram.useCommands
- true to create commands. If true, this command will be available in project's command history.diagramLayouter
- layouter to useoptions
- layout options@OpenApi public java.util.Collection<Element> getUsedModelElements(boolean checkOnlyPersistent)
checkOnlyPersistent
- if true, result includes elements for symbols which are saved to XMI and not created at run-time. If false, includes all elements.@OpenApi public boolean isElementInDiagram(Element element)
element
- Element
object.@OpenApi public boolean addContentPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the PropertyChangeListener
to be added.PropertyChangeSupport
@OpenApi public boolean removeContentPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the PropertyChangeListener to be removed.PropertyChangeSupport
@OpenApi public boolean isInitialFrameSizeSet()
@OpenApi public void setInitialFrameSizeSet(boolean value)
value
- new value