Class DiagramPresentationElement
java.lang.Object
com.nomagic.magicdraw.uml.MDElementImpl
com.nomagic.magicdraw.uml.symbols.PresentationElement
com.nomagic.magicdraw.uml.symbols.AbstractDiagramPresentationElement
com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement
- All Implemented Interfaces:
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionDiagram use stereotype modes.Fields inherited from class com.nomagic.magicdraw.uml.symbols.AbstractDiagramPresentationElement
CANVAS_SIZE, DEFAULT_GRID_SIZE, DIAGRAM_CONTENT_LOADED_PROPERTY, DIAGRAM_ORIENTATION_HORIZONTAL, DIAGRAM_ORIENTATION_MODES, DIAGRAM_ORIENTATION_VERTICAL, FORCE_CONTENT_SAVE_PROPERTY, MAX_GRID_SIZE, MIN_GRID_SIZE
Fields inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
DASHED_STROKE, DEFAULT_LINE_WIDTH, DOTTED_STROKE, HANDLE_SIZE, MAX_LINE_WIDTH, MIN_LINE_WIDTH, peStyle, SHADOW_WIDTH, SOLID_STROKE
Fields 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
ConstructorsConstructorDescriptionConstructs new empty diagram.DiagramPresentationElement
(Diagram diagram) DiagramPresentationElement
(Diagram diagram, com.nomagic.magicdraw.core.diagram.DiagramRepresentationObject repObject) DiagramPresentationElement
(Diagram diagram, DiagramType type) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Method accepts a visitor, and calls method "visit<class name>(this)" of a visitor.static void
addDiagramCreationInfo
(Diagram diagram) static void
addDiagramCreationInfo
(Diagram diagram, boolean overwrite) void
Applies properties stored in default style for diagram and marked as forced.boolean
canAddInstance
(PresentationElement symbol) Object view has no children.protected void
clone()
void
createDiagramInfoShape
(boolean simple) static DiagramPresentationElement
get
(PresentationElement symbol) Returns diagram of given presentation element.com.nomagic.magicdraw.uml.symbols.DiagramObjectViewContainer
static String
getDefaultStyleForDiagram
(StyleManager styleManager) Finds style for this diagramReturns Diagram model element of this presentation element.Get the frame of the diagram.Returns the type of the diagram.Gets DSL stereotype display mode.Returns model element of this presentation element.Returns human representation of the data typegetName()
Gets the name of thisDiagramPresentationElement
object.Returns real diagram type.com.nomagic.magicdraw.core.diagram.DiagramRepresentationObject
Gets setereotypes display mode.Returns collection of model elements that have views in this diagram.getUsedModelElements
(boolean checkOnlyPersistent) Deprecated.checkOnlyPersistent parameter is ignored.getUsedModelElements
(boolean checkOnlyPersistent, boolean checkOnlyFriendly) Deprecated.checkOnlyPersistent and checkOnlyFriendly parameters are ignored.getUsedModelElements
(UsedElementPolicy usedElementPolicy) Returns collection of model elements that are used in this diagram.Gets diagram use stereotype mode.boolean
Check is diagram has heavyweight symbols - symbols those can be painted correctly only if diagram is displayed in some JComponentprotected boolean
boolean
protected void
internalAddToCache
(AbstractDiagramPresentationElement diagram, String oldType, String newType) void
internalApplyProperties
(com.dassault_systemes.modeler.magic.diagram.styledelegates.PresentationElementStyleChanger changer) Applies properties from given property managerprotected void
protected void
protected void
internalSetDiagramType
(String diagramType, String diagramUmlType) void
Silently applies all properties after initializationboolean
boolean
isElementInDiagram
(Element element) Checks if given element exist in any diagram.boolean
isElementInDiagram
(Element element, boolean skipProxyCheck, UsedElementPolicy usedElementPolicy) Checks if given element exist in any diagram.boolean
isElementInDiagram
(Element element, UsedElementPolicy usedElementPolicy) Checks if given element exist in any diagram.boolean
boolean
Indicates if automatic diagram modification time update is disabledboolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Indicates if smart path/shape edit should be used in this diagram.boolean
layout
(boolean useCommands, DiagramLayouter layouter) Deprecated, for removal: This API element is subject to removal in a future version.void
void
void
void
preferredSize
(Dimension dim) void
Listens for property change it can be: data was edited text box was editedstatic void
registerHeavyWeightSymbolsChecker
(com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement.HeavyWeightSymbolsChecker checker) void
Reset cached last diagram modification time.void
setAspectRatioMode
(String mode) void
setAutosize
(boolean val) void
Sets new diagram style id to representation objectvoid
Sets diagram orientation mode.void
setDiagramType
(DiagramType type) Sets the type of the diagram and fires the property change event with name ExtendedPropertyNames.EDIT_DIAGRAM_TYPE .void
Sets DSL stereotype display mode value.void
Sets initial diagram frame bounds for this diagram's frame.void
setInitialFrameSizeSet
(boolean value) Set a flag that diagram frame size should not be recalculated on opening.void
setModificationTimeUpdateDisabled
(boolean modificationTimeUpdateDisabled) Disables automatic diagram modification time update.void
setRealType
(String realType) If diagram type is not registered then known type is set.void
setShowAbbreviatedDiagramType
(boolean show) void
setShowActivations
(boolean b) void
setShowContextKind
(boolean show) void
setShowContextName
(boolean show) void
setShowContextType
(boolean show) void
setShowDiagramFrame
(boolean show) void
setShowDiagramInfo
(boolean showDiagramInfo) void
setShowDiagramName
(boolean show) void
setShowDiagramOwner
(boolean show) void
setShowDiagramType
(boolean show) void
setShowMessageNumbers
(boolean b) void
setShowParameters
(boolean show) void
Sets stereotype display mode value.void
void
setUseAdvancedNumbering
(boolean b) void
setUseStereotypeMode
(String mode) Sets diagram use stereotype mode.void
sSetAspectRatioMode
(String mode) void
sSetAutosize
(boolean val) void
sSetDiagramFrame
(com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView diagramFrame) void
Simple set for diagram orientation mode propertyvoid
sSetDiagramType
(DiagramType type) Sets the type of the diagram.void
Simple sets (no updates) DSL stereotypes display mode.void
sSetElement
(Element element) Sets diagram element for this object.protected void
sSetForceStoreContentOnSave
(boolean forceStoreContentOnSave) void
sSetShowAbbreviatedDiagramType
(boolean show) void
sSetShowActivations
(boolean b) void
sSetShowContextKind
(boolean show) void
sSetShowContextName
(boolean show) void
sSetShowContextType
(boolean show) void
sSetShowDiagramFrame
(boolean show) void
sSetShowDiagramInfo
(boolean b) void
sSetShowDiagramName
(boolean show) void
sSetShowDiagramOwner
(boolean show) void
sSetShowDiagramType
(boolean show) void
sSetShowParameters
(boolean show) void
Simple sets (no updates) stereotypes display mode.void
void
sSetUseStereotypeMode
(String mode) Simple set for diagram use stereotype mode propertystatic void
unRegisterHeavyWeightSymbolsChecker
(com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement.HeavyWeightSymbolsChecker checker) void
void
updateFrameSize
(PresentationElement element) Methods inherited from class com.nomagic.magicdraw.uml.symbols.AbstractDiagramPresentationElement
addContentPropertyChangeListener, addDynamicRepresentationProvider, addDynamicStyleProvider, addPresentationElement, addPropertyChangeListener, adjustInitialDiagramFrameBounds, atInsert, autosizeSuspendedSymbolsWithHiddenContent, calculateInitialDiagramFrameBounds, canAddChild, canDeleteChild, cleanupAfterLoad, close, close, collectPresentationElementsRecursively, collectShowingManipulatedElementsRecursively, collectShowingPresentationElementsRecursively, coversPoint, dispose, ensureLoaded, findPresentationElement, findPresentationElement, findPresentationElementForPathConnecting, findPresentationElements, findPresentationElements, findPresentationElementsForPathConnecting, fireContentPropertyChange, firePropertyChange, getAbstractDiagramPresentationElement, getBackgroundColor, getBounds, getCenterlineManager, getContentHash, getContentState, getDiagramOrientationMode, getDynamicRepresentationProviders, getDynamicStyleProviders, getGridSize, getID, getLineJumpPlace, getManipulatedElementAt, getManipulatedElementAt, getManipulationSortManager, getOpenConfigurator, getOwnStyleDelegate, getPathGridSize, getPathToMoveCache, getPresentationElementAt, getPresentationElementAt, getPresentationElements, getPresentationElementsAt, getPresentationElementsAt, getPresentationElementsAt, getRepresentation, getSortManager, getSortManagers, getSurfaces, getSuspendShapeAutoResizeMode, getValue, getValueOrCompute, getVisibleBounds, getZoom, hasSelectableSymbols, hasVerticalOrientation, initialize, intersects, isDummyMode, isEmpty, isForceStoreContentOnSave, isLabelsAutoDisplaySuspended, isLoaded, isModified, isOpening, isShapesAutoResizeSuspended, isShowGrid, isSnapToGridPaths, isSnapToGridShapes, isSymbolDiagram, isUseGradientForFill, layout, layout, loadContents, open, open, open, open, openInActiveTab, paintChildren, paintSelf, recalculateInternalDataRequired, recursiveAutosize, registerInProject, removeContentPropertyChangeListener, removeDynamicRepresentationProvider, removeDynamicStyleProvider, removePropertyChangeListener, resetContainer, sAddPresentationElement, setBounds, setContentHash, setDiagramRepresentationObject, setDummyMode, setForceStoreContentOnSave, setGridSize, setID, setInitializer, setLabelsAutoDisplaySuspended, setModified, setOpenConfigurator, setPresentationElements, setShapesAutoResizeSuspended, setShowGrid, setSnapToGridPaths, setSnapToGridShapes, setUseGradientForFill, setValue, setZoomProvider, snapViewToGrid, sSetBounds, sSetGridSize, sSetLabelsAutoDisplaySuspended, sSetLineJumpPlace, sSetPresentationElements, sSetShapesAutoResizeSuspended, sSetShowGrid, sSetSnapToGridPaths, sSetSnapToGridShapes, unloadDiagram, unregisterFromProject, useParentStyle
Methods inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
addPresentationElement, addPresentationElementWithoutResize, addProperty, adjustBoundsBeforeChange, adjustChildBounds, adjustChildBoundsForMoving, alwaysShowTooltip, applyProperties, askDeleteDataConfirmation, atInsertChildren, autosizeAndResizeManipulatedParent, autosizeAndResizeParent, beforeDelete, boundsChanged, boundsChanged, canAddChild, canAddInstance, canBeDisposedOnUpdate, canChangeElementOwner, canChangeParent, canChangeParent, canFill, canHavePaths, changeProperties, checkElementOwnerOnChange, checkProxyVisibility, checkShowsProxy, childrenForMoving, clearShowsProxy, collectSubManipulatedElements, collectSubPresentationElements, collectSubPresentationElements, collectSubShowingPresentationElements, coversPoint, createFillStrategy, createPresentationElementStyle, createPropertyChangeListener, createSmartListenerConfig, disposeChildren, disposePropertyChangeListener, draw, drawBackground, drawSymbol, drawSymbolBackground, dynamicFillColor, dynamicLineColor, dynamicLineWidth, dynamicLineWidth, dynamicPaintShadow, dynamicStroke, dynamicStroke, dynamicStroke, dynamicStyleFillColor, dynamicStyleLineColor, dynamicStyleTextColor, dynamicStyleTransparency, dynamicStyleTransparency, dynamicStyleValue, dynamicTextAlignment, dynamicTextColor, editName, editName, findOwnerForChildElement, findOwnerForElement, findPresentationElement, generateID, getActualElement, getAdditionalRenderersToNotifyOnPropertiesChange, getAssignableModelElementsClasses, getBoundsShape, getBoundsToRepaint, getBoundsWithChildrenOnEdge, getCenterlinePoint, getCenterlinePointX, getCenterlinePointY, getChildPresentationElementForContextMenu, getChildrenWithSymbolProperties, getConfiguration, getDiagramPresentationElement, getDiagramSurface, getDrawComparator, getDynamicConfigurations, getDynamicStyleOwner, getEffectiveStyleDelegate, getEffectiveStyleOwner, getElementsForRelationshipConnecting, getElementToConnectRelationship, getFillColor, getFont, getFontHeight, getFontRenderContext, getHumanName, getIntersection, getLineColor, getLineWidth, getManipulatedElementAt, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedParent, getManipulatedPresentationElements, getManipulationBounds, getManipulationPreferredDimension, getMiddlePoint, getMiddlePoint, getMiddlePointX, getMiddlePointX, getMiddlePointY, getMiddlePointY, getMinimumDimension, getModelElement, getModelElementsForRelationshipConnecting, getModelElementToConnectRelationship, getModelElementToMove, getNotCopyBounds, getNotZoomedTolerance, getObjectParent, getParent, getParentSymbolStyleOwner, getPreferredBounds, getPreferredDimension, getPreferredDimensionForAutosize, getPreferredSize, getPresentationElementAt, getPresentationElementAt, getPresentationElementAt, getPresentationElementCount, getPresentationElementIndex, getPresentationElementsAt, getPresentationElementStroke, getPresentationElementStroke, getProjectImpl, getProperty, getPropertyManager, getPropertyManagerName, getRenderer, getSelected, getStroke, getStroke, getStroke, getStroke, getStroke, getStroke, getStyle, getSymbolRenderer, getTextColor, getTolerance, getVisibility, getVisiblePresentationElements, handleModelDelete, hasManipulatedPresentationElements, hasManipulator, hasSharedModelElement, initializeAndAutosize, internalBeforeUpdate, internalCreatePropertyChangeListener, internalGetBoundsShape, internalGetModelElementsForRelationshipConnecting, internalGetModelElementsForRelationshipConnecting, internalGetModelElementToConnectRelationship, internalGetPresentationElementStroke, internalGetSpecificFont, internalGetSpecificTextColor, internalIsSuitableToConnectRelationship, internalIsSuitableToConnectRelationship, internalSnapToGrid, internalSnapToGrid, internalUpdatePresentationElement, intersects, invalidate, isCanChildrenChangeEdge, isChildVisible, isContentHidden, isCreateElementListener, isDetectable, isDisposed, isLayouting, isMovableByMoveManager, isNotNull, isParentOf, isParentOf, isPreserveProportionsWhenGrowing, isSelected, isShowElementTypeAsLabel, isShowsProxy, isSnapToGrid, isSortable, isSuitableToConnectRelationship, isTextEditable, isUseFillColor, isUseFillColorByProperty, isVisible, isVisibleInDiagram, isVisibleOrShrunken, movePathElements, movePathElementsRecursively, mustShowContextMenu, notifyCreated, notifyDiagramFrameSizeChange, notifyRepaintManager, onChildAdd, onChildRemove, onDiagramSurfaceSet, onFind, onFind, onParentChange, paintAdornments, paintAdornmentsBackground, paintChildrenAndAdornments, paintChildrenBackground, paintSelfBackground, preDisposeOnUpdate, prepareForLineDrawing, prepareForShadowDrawing, prepareForTextDrawing, recreateListeners, registerInSortManager, rememberBounds, rememberBounds, removeFromSortManager, removeItSelfOnUpdate, removePresentationElement, resizeParent, sAddPresentationElement, selectChildrenForMoving, selectObjectsForMoving, selectPathsForMoving, setAllSelected, setBounds, setCreateElementListener, setDummyResizeMode, setElement, setFillColor, setFont, setLayouting, setLineColor, setLineWidth, setLoadedVisibility, setLocation, setLocation, setModelElement, setNeedRecreateListeners, setParent, setPropertyManagerName, setSelected, setSelected, setSize, setSize, setSize, setTextColor, setTextEditable, setUseFillColor, setVisibility, setVisible, silentApply, silentApply, simpleSetBounds, simpleSetBounds, snapToGrid, snapToGrid, snapViewToGrid, sortObjectsByX, sortObjectsByY, sRemovePresentationElement, sSetBounds, sSetLocation, sSetLocation, sSetModelElement, sSetParent, sSetParentForAll, sSetSize, sSetSize, sSetSize, sSetVisibility, sSetVisible, tryToDeleteModelElementUponRemoval, update, updateAfterLoad, updateLabelsIgnoringSuspendableLater, updateLater, updateModelByView, updateModelByViewInternal, updateViewAfterPropertyChange, useParentProperties
Methods inherited from class com.nomagic.magicdraw.uml.MDElementImpl
accept, canAdd, canAddChild, canBeDeleted, compareTo, createSortKeys, getClassType, getProjectProvider, getResourceID, getSortKeys, hasListeners, isEditable, removeAllParents, removeAllPropertyChangeListeners, setProjectProvider, setResourceIDProvider, sGetID, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.nomagic.magicdraw.uml.BaseElement
canAdd, isSelfChangeable
Methods inherited from interface com.nomagic.magicdraw.uml.MDElement
getProject
Methods inherited from interface com.nomagic.magicdraw.uml.symbols.PropertyBasedPresentationElement
addProperty, asPresentationElement, getProperty, getPropertyManager
-
Field Details
-
DIAGRAM_USE_STEREOTYPE_MODES
Diagram use stereotype modes.
-
-
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. -
DiagramPresentationElement
-
DiagramPresentationElement
-
DiagramPresentationElement
public DiagramPresentationElement(@CheckForNull Diagram diagram, @CheckForNull com.nomagic.magicdraw.core.diagram.DiagramRepresentationObject repObject)
-
-
Method Details
-
internalAddToCache
protected void internalAddToCache(AbstractDiagramPresentationElement diagram, @CheckForNull String oldType, @CheckForNull String newType) - Overrides:
internalAddToCache
in classAbstractDiagramPresentationElement
-
internalRemoveFromCache
- Overrides:
internalRemoveFromCache
in classAbstractDiagramPresentationElement
-
hasNoRegisteredRealTypeDescriptor
public boolean hasNoRegisteredRealTypeDescriptor()- Overrides:
hasNoRegisteredRealTypeDescriptor
in classAbstractDiagramPresentationElement
-
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:
-
internalSetDiagramType
- Specified by:
internalSetDiagramType
in classAbstractDiagramPresentationElement
-
getDiagramType
Returns the type of the diagram.- Specified by:
getDiagramType
in classAbstractDiagramPresentationElement
- Returns:
- the type of the diagram
- See Also:
-
DiagramTypes.UML_CLASS_DIAGRAM
DiagramTypes.UML_USECASE_DIAGRAM
DiagramTypes.UML_COMMUNICATION_DIAGRAM
DiagramTypes.UML_SEQUENCE_DIAGRAM
DiagramTypes.UML_STATECHART_DIAGRAM
DiagramTypes.UML_PROTOCOL_STATE_MACHINE_DIAGRAM
DiagramTypes.UML_ACTIVITY_DIAGRAM
DiagramTypes.UML_COMPOSITE_STRUCTURE_DIAGRAM
DiagramTypes.UML_OBJECT_DIAGRAM
DiagramTypes.UML_PACKAGE_DIAGRAM
DiagramTypes.UML_COMPONENT_DIAGRAM
DiagramTypes.UML_DEPLOYMENT_DIAGRAM
DiagramTypes.UML_PROFILE_DIAGRAM
-
getHumanType
Returns human representation of the data type- Specified by:
getHumanType
in interfaceBaseElement
- Overrides:
getHumanType
in classPresentationElement
- Returns:
- the name of the data
-
clone
- Specified by:
clone
in interfaceBaseElement
- Overrides:
clone
in classAbstractDiagramPresentationElement
-
getDiagram
Returns Diagram model element of this presentation element.- Returns:
- Diagram object of this element.
- See Also:
-
getElement
Description copied from class:PresentationElement
Returns model element of this presentation element. Some presentation elements (for example TextBoxes) do not have model elements.- Specified by:
getElement
in interfaceModelElementProvider
- Overrides:
getElement
in classPresentationElement
- Returns:
- model element of this presentation element.
-
propertyChange
Description copied from class:PresentationElement
Listens for property change it can be: data was edited text box was edited- Specified by:
propertyChange
in interfacePropertyChangeListener
- Overrides:
propertyChange
in classAbstractDiagramPresentationElement
-
accept
Description copied from interface:MDElement
Method accepts a visitor, and calls method "visit<class name>(this)" of a visitor. See "Visitor" pattern for more details.- Specified by:
accept
in interfaceMDElement
- Overrides:
accept
in classAbstractDiagramPresentationElement
- Parameters:
visitor
- which visits this element.- Throws:
Exception
-
getDiagramTypeAsString
- Specified by:
getDiagramTypeAsString
in classAbstractDiagramPresentationElement
-
getName
Gets the name of thisDiagramPresentationElement
object. -
sSetShowDiagramOwner
public void sSetShowDiagramOwner(boolean show) -
sSetShowAbbreviatedDiagramType
public void sSetShowAbbreviatedDiagramType(boolean show) -
sSetShowDiagramName
public void sSetShowDiagramName(boolean show) -
sSetShowParameters
public void sSetShowParameters(boolean show) -
sSetShowContextName
public void sSetShowContextName(boolean show) -
sSetShowContextType
public void sSetShowContextType(boolean show) -
sSetShowDiagramType
public void sSetShowDiagramType(boolean show) -
sSetShowContextKind
public void sSetShowContextKind(boolean show) -
setShowAbbreviatedDiagramType
public void setShowAbbreviatedDiagramType(boolean show) -
setShowDiagramName
public void setShowDiagramName(boolean show) -
setShowParameters
public void setShowParameters(boolean show) -
setShowContextName
public void setShowContextName(boolean show) -
setShowContextType
public void setShowContextType(boolean show) -
setShowDiagramType
public void setShowDiagramType(boolean show) -
setShowContextKind
public void setShowContextKind(boolean show) -
isShowAbbreviatedDiagramType
public boolean isShowAbbreviatedDiagramType()- Specified by:
isShowAbbreviatedDiagramType
in interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
isShowDiagramName
public boolean isShowDiagramName()- Specified by:
isShowDiagramName
in interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
isShowParameters
public boolean isShowParameters()- Specified by:
isShowParameters
in interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
isShowContextName
public boolean isShowContextName()- Specified by:
isShowContextName
in interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
isShowContextType
public boolean isShowContextType()- Specified by:
isShowContextType
in interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
isShowDiagramType
public boolean isShowDiagramType()- Specified by:
isShowDiagramType
in interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
isShowContextKind
public boolean isShowContextKind()- Specified by:
isShowContextKind
in interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
sSetShowDiagramFrame
public void sSetShowDiagramFrame(boolean show) -
isShowDiagramOwner
public boolean isShowDiagramOwner() -
isShowDiagramFrame
public boolean isShowDiagramFrame()- Overrides:
isShowDiagramFrame
in classAbstractDiagramPresentationElement
-
setShowDiagramOwner
public void setShowDiagramOwner(boolean show) -
setShowDiagramFrame
public void setShowDiagramFrame(boolean show) -
sSetElement
Sets diagram element for this object.- Overrides:
sSetElement
in classPresentationElement
-
canAddInstance
Description copied from class:PresentationElement
Object view has no children.- Overrides:
canAddInstance
in classAbstractDiagramPresentationElement
-
hasManipulationSortManager
protected boolean hasManipulationSortManager()- Overrides:
hasManipulationSortManager
in classAbstractDiagramPresentationElement
-
onFontChange
public void onFontChange()- Overrides:
onFontChange
in classPresentationElement
-
setShowMessageNumbers
public void setShowMessageNumbers(boolean b) -
setUseAdvancedNumbering
public void setUseAdvancedNumbering(boolean b) -
isShowMessageNumbers
public boolean isShowMessageNumbers() -
isUseAdvancedNumbering
public boolean isUseAdvancedNumbering() -
isShowDiagramInfo
public boolean isShowDiagramInfo() -
sSetShowDiagramInfo
public void sSetShowDiagramInfo(boolean b) -
resetLastModificationUpdateTime
public void resetLastModificationUpdateTime()Reset cached last diagram modification time. -
getDiagramPropertiesShape
-
setShowDiagramInfo
public void setShowDiagramInfo(boolean showDiagramInfo) -
createDiagramInfoShape
public void createDiagramInfoShape(boolean simple) -
positionDiagramInfoShapeOnFrame
-
addDiagramCreationInfo
-
addDiagramCreationInfo
-
sSetShowActivations
public void sSetShowActivations(boolean b) -
setShowActivations
public void setShowActivations(boolean b) -
isShowActivations
public boolean isShowActivations() -
sSetDiagramOrientationMode
Simple set for diagram orientation mode property- Parameters:
mode
- - diagram orientation mode.
-
setDiagramOrientationMode
Sets diagram orientation mode.- Parameters:
mode
- - diagram orientation mode.
-
sSetUseStereotypeMode
Simple set for diagram use stereotype mode property- Parameters:
mode
- - diagram orientation mode.
-
setUseStereotypeMode
Sets diagram use stereotype mode.- Parameters:
mode
- - diagram orientation mode.
-
getUseStereotypeMode
Gets diagram use stereotype mode.- Specified by:
getUseStereotypeMode
in interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
- Returns:
- diagram orientation mode.
-
getAspectRatioMode
-
setAspectRatioMode
-
sSetAspectRatioMode
-
internalSilentApply
public void internalSilentApply()Description copied from class:PresentationElement
Silently applies all properties after initialization- Overrides:
internalSilentApply
in classAbstractDiagramPresentationElement
-
internalApplyProperties
public void internalApplyProperties(com.dassault_systemes.modeler.magic.diagram.styledelegates.PresentationElementStyleChanger changer) Description copied from class:PresentationElement
Applies properties from given property manager- Overrides:
internalApplyProperties
in classAbstractDiagramPresentationElement
- Parameters:
changer
- new properties
-
preferredSize
- Overrides:
preferredSize
in classAbstractDiagramPresentationElement
-
isModificationTimeUpdateDisabled
public boolean isModificationTimeUpdateDisabled()Indicates if automatic diagram modification time update is disabled- Returns:
- true when diagram modification time update is disabled
-
setModificationTimeUpdateDisabled
public void setModificationTimeUpdateDisabled(boolean modificationTimeUpdateDisabled) Disables automatic diagram modification time update.- Parameters:
modificationTimeUpdateDisabled
- true to disable automatic diagram modification time update.
-
updateDiagramPropertiesShapeModificationTime
public void updateDiagramPropertiesShapeModificationTime() -
applyForcedProperties
public void applyForcedProperties()Applies properties stored in default style for diagram and marked as forced. They can be marked as forced using "apply" from styles dialog.- Specified by:
applyForcedProperties
in classAbstractDiagramPresentationElement
-
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
@Deprecated public Collection<Element> getUsedModelElements(boolean checkOnlyPersistent, boolean checkOnlyFriendly) Deprecated.checkOnlyPersistent and checkOnlyFriendly parameters are 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.checkOnlyFriendly
- check only "friendly" symbols- 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
-
isElementInDiagram
public boolean isElementInDiagram(Element element, boolean skipProxyCheck, UsedElementPolicy usedElementPolicy) Checks if given element exist in any diagram.- Parameters:
element
- elementskipProxyCheck
- enables to skip if diagram's actual element is proxy- Returns:
- true if element exist in any diagram otherwise false
-
setDefaultStyleID
Sets new diagram style id to representation object- Parameters:
id
- new id
-
getDefaultStyleID
- Returns:
- Returns the defaultStyleForDiagramID, can be null if default style is equal to diagram style, or diagram is loaded.
-
getDefaultStyleForDiagram
Finds style for this diagram- Parameters:
styleManager
- manager to find in.- Returns:
- found style, null if no style is created.
-
getRealType
Returns real diagram type. Real diagram type is diagram type which is not registered but loaded from project file.- Overrides:
getRealType
in classAbstractDiagramPresentationElement
- Returns:
- real type. Can be null.
-
setRealType
If diagram type is not registered then known type is set. Real type is preserved for saving.- Parameters:
realType
- real diagram type.
-
getCurrentDate
-
sSetDiagramFrame
public void sSetDiagramFrame(@CheckForNull com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView diagramFrame) - Overrides:
sSetDiagramFrame
in classAbstractDiagramPresentationElement
-
getDiagramFrame
Get the frame of the diagram.- Specified by:
getDiagramFrame
in classAbstractDiagramPresentationElement
- Returns:
- frame of the diagram.
-
getContainer
public com.nomagic.magicdraw.uml.symbols.DiagramObjectViewContainer getContainer()- Overrides:
getContainer
in classAbstractDiagramPresentationElement
- Returns:
- diagram container
-
setInitialDiagramFrameBounds
public void setInitialDiagramFrameBounds()Sets initial diagram frame bounds for this diagram's frame.- Overrides:
setInitialDiagramFrameBounds
in classAbstractDiagramPresentationElement
-
getStereotypesDisplayMode
Description copied from interface:com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
Gets setereotypes display mode.- Specified by:
getStereotypesDisplayMode
in interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
- Specified by:
getStereotypesDisplayMode
in interfaceStereotypesDisplayModeOwner
- Returns:
- stereotypes display mode.
-
sSetStereotypesDisplayMode
Description copied from interface:StereotypesDisplayModeOwner
Simple sets (no updates) stereotypes display mode.- Specified by:
sSetStereotypesDisplayMode
in interfaceStereotypesDisplayModeOwner
- Parameters:
mode
- stereotypes display mode value.
-
setStereotypesDisplayMode
Description copied from interface:StereotypesDisplayModeOwner
Sets stereotype display mode value.- Specified by:
setStereotypesDisplayMode
in interfaceStereotypesDisplayModeOwner
- Parameters:
mode
- stereotype display mode.
-
getDSLStereotypesDisplayMode
Description copied from interface:StereotypesDisplayModeOwner
Gets DSL stereotype display mode.- Specified by:
getDSLStereotypesDisplayMode
in interfaceStereotypesDisplayModeOwner
- Returns:
- stereotype display mode.
-
sSetDSLStereotypesDisplayMode
Description copied from interface:StereotypesDisplayModeOwner
Simple sets (no updates) DSL stereotypes display mode.- Specified by:
sSetDSLStereotypesDisplayMode
in interfaceStereotypesDisplayModeOwner
- Parameters:
mode
- stereotypes display mode value.
-
setDSLStereotypesDisplayMode
Description copied from interface:StereotypesDisplayModeOwner
Sets DSL stereotype display mode value.- Specified by:
setDSLStereotypesDisplayMode
in interfaceStereotypesDisplayModeOwner
- Parameters:
mode
- stereotype display mode.
-
isAutosized
public boolean isAutosized() -
sSetAutosize
public void sSetAutosize(boolean val) -
setAutosize
public void setAutosize(boolean val) -
updateFrameSize
- Overrides:
updateFrameSize
in classAbstractDiagramPresentationElement
-
isUseFlowLayoutLogic
public boolean isUseFlowLayoutLogic()Indicates if smart path/shape edit should be used in this diagram.- Overrides:
isUseFlowLayoutLogic
in classAbstractDiagramPresentationElement
- Returns:
- true if smart symbol editing should be used, false otherwise.
-
clearCaches
protected void clearCaches()- Overrides:
clearCaches
in classAbstractDiagramPresentationElement
-
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
-
hasHeavyWeightSymbols
public boolean hasHeavyWeightSymbols()Check is diagram has heavyweight symbols - symbols those can be painted correctly only if diagram is displayed in some JComponent- Returns:
- true if heavyweight symbols exists in the diagram
-
registerHeavyWeightSymbolsChecker
public static void registerHeavyWeightSymbolsChecker(com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement.HeavyWeightSymbolsChecker checker) -
unRegisterHeavyWeightSymbolsChecker
public static void unRegisterHeavyWeightSymbolsChecker(com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement.HeavyWeightSymbolsChecker checker) -
sSetSuspendShapeAutoResizeMode
- Overrides:
sSetSuspendShapeAutoResizeMode
in classAbstractDiagramPresentationElement
-
setSuspendShapeAutoResizeMode
- Overrides:
setSuspendShapeAutoResizeMode
in classAbstractDiagramPresentationElement
-
internalClearOnUnload
protected void internalClearOnUnload()- Overrides:
internalClearOnUnload
in classAbstractDiagramPresentationElement
-
getRepresentationFromModelElement
public com.nomagic.magicdraw.core.diagram.DiagramRepresentationObject getRepresentationFromModelElement()- Specified by:
getRepresentationFromModelElement
in classAbstractDiagramPresentationElement
-
postOpenFromCommand
public void postOpenFromCommand()- Overrides:
postOpenFromCommand
in classAbstractDiagramPresentationElement
-
sSetForceStoreContentOnSave
protected void sSetForceStoreContentOnSave(boolean forceStoreContentOnSave) - Overrides:
sSetForceStoreContentOnSave
in classAbstractDiagramPresentationElement
-
get
Returns diagram of given presentation element.- Returns:
- diagram of given presentation element.
-
layout
@OpenApi @Deprecated(since="2024x Refresh3", forRemoval=true) public boolean layout(boolean useCommands, DiagramLayouter layouter) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractDiagramPresentationElement
Layouts the diagram with the specified layouter. Only selected symbols in the diagram are layouted. All symbols are layouted if selection is empty. UsePresentationElement.setSelected(java.util.List)
} to select symbols in the diagram.- Specified by:
layout
in classAbstractDiagramPresentationElement
- Parameters:
useCommands
- true to create commands. If true, this command will be available in the project's command historylayouter
- layouter to be used for layouting- Returns:
- true if layout was performed.
-
getDefaultDiagramLayouter
- Specified by:
getDefaultDiagramLayouter
in classAbstractDiagramPresentationElement
-