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_SIZEFields 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_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
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 TypeMethodDescriptionvoidMethod accepts a visitor, and calls method "visit<class name>(this)" of a visitor.static voidaddDiagramCreationInfo(Diagram diagram) static voidaddDiagramCreationInfo(Diagram diagram, boolean overwrite) voidApplies properties stored in default style for diagram and marked as forced.booleancanAddInstance(PresentationElement symbol) Object view has no children.protected voidclone()voidcreateDiagramInfoShape(boolean simple) static DiagramPresentationElementget(PresentationElement symbol) Returns diagram of given presentation element.com.nomagic.magicdraw.uml.symbols.DiagramObjectViewContainerstatic StringgetDefaultStyleForDiagram(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 thisDiagramPresentationElementobject.Returns real diagram type.com.nomagic.magicdraw.core.diagram.DiagramRepresentationObjectGets 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.booleanCheck is diagram has heavyweight symbols - symbols those can be painted correctly only if diagram is displayed in some JComponentprotected booleanbooleanprotected voidinternalAddToCache(AbstractDiagramPresentationElement diagram, String oldType, String newType) voidinternalApplyProperties(com.dassault_systemes.modeler.magic.diagram.styledelegates.PresentationElementStyleChanger changer) Applies properties from given property managerprotected voidprotected voidprotected voidinternalSetDiagramType(String diagramType, String diagramUmlType) voidSilently applies all properties after initializationbooleanbooleanisElementInDiagram(Element element) Checks if given element exist in any diagram.booleanisElementInDiagram(Element element, boolean skipProxyCheck, UsedElementPolicy usedElementPolicy) Checks if given element exist in any diagram.booleanisElementInDiagram(Element element, UsedElementPolicy usedElementPolicy) Checks if given element exist in any diagram.booleanbooleanIndicates if automatic diagram modification time update is disabledbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanIndicates if smart path/shape edit should be used in this diagram.booleanlayout(boolean useCommands, DiagramLayouter layouter) Deprecated, for removal: This API element is subject to removal in a future version.voidvoidvoidvoidpreferredSize(Dimension dim) voidListens for property change it can be: data was edited text box was editedstatic voidregisterHeavyWeightSymbolsChecker(com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement.HeavyWeightSymbolsChecker checker) voidReset cached last diagram modification time.voidsetAspectRatioMode(String mode) voidsetAutosize(boolean val) voidSets new diagram style id to representation objectvoidSets diagram orientation mode.voidsetDiagramType(DiagramType type) Sets the type of the diagram and fires the property change event with name ExtendedPropertyNames.EDIT_DIAGRAM_TYPE .voidSets DSL stereotype display mode value.voidSets initial diagram frame bounds for this diagram's frame.voidsetInitialFrameSizeSet(boolean value) Set a flag that diagram frame size should not be recalculated on opening.voidsetModificationTimeUpdateDisabled(boolean modificationTimeUpdateDisabled) Disables automatic diagram modification time update.voidsetRealType(String realType) If diagram type is not registered then known type is set.voidsetShowAbbreviatedDiagramType(boolean show) voidsetShowActivations(boolean b) voidsetShowContextKind(boolean show) voidsetShowContextName(boolean show) voidsetShowContextType(boolean show) voidsetShowDiagramFrame(boolean show) voidsetShowDiagramInfo(boolean showDiagramInfo) voidsetShowDiagramName(boolean show) voidsetShowDiagramOwner(boolean show) voidsetShowDiagramType(boolean show) voidsetShowMessageNumbers(boolean b) voidsetShowParameters(boolean show) voidSets stereotype display mode value.voidvoidsetUseAdvancedNumbering(boolean b) voidsetUseStereotypeMode(String mode) Sets diagram use stereotype mode.voidsSetAspectRatioMode(String mode) voidsSetAutosize(boolean val) voidsSetDiagramFrame(com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView diagramFrame) voidSimple set for diagram orientation mode propertyvoidsSetDiagramType(DiagramType type) Sets the type of the diagram.voidSimple sets (no updates) DSL stereotypes display mode.voidsSetElement(Element element) Sets diagram element for this object.protected voidsSetForceStoreContentOnSave(boolean forceStoreContentOnSave) voidsSetShowAbbreviatedDiagramType(boolean show) voidsSetShowActivations(boolean b) voidsSetShowContextKind(boolean show) voidsSetShowContextName(boolean show) voidsSetShowContextType(boolean show) voidsSetShowDiagramFrame(boolean show) voidsSetShowDiagramInfo(boolean b) voidsSetShowDiagramName(boolean show) voidsSetShowDiagramOwner(boolean show) voidsSetShowDiagramType(boolean show) voidsSetShowParameters(boolean show) voidSimple sets (no updates) stereotypes display mode.voidvoidsSetUseStereotypeMode(String mode) Simple set for diagram use stereotype mode propertystatic voidunRegisterHeavyWeightSymbolsChecker(com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement.HeavyWeightSymbolsChecker checker) voidvoidupdateFrameSize(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, useParentStyleMethods 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, useParentPropertiesMethods 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, 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.MDElement
getProjectMethods 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:
internalAddToCachein classAbstractDiagramPresentationElement
-
internalRemoveFromCache
- Overrides:
internalRemoveFromCachein classAbstractDiagramPresentationElement
-
hasNoRegisteredRealTypeDescriptor
public boolean hasNoRegisteredRealTypeDescriptor()- Overrides:
hasNoRegisteredRealTypeDescriptorin 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:
internalSetDiagramTypein classAbstractDiagramPresentationElement
-
getDiagramType
Returns the type of the diagram.- Specified by:
getDiagramTypein classAbstractDiagramPresentationElement- Returns:
- the type of the diagram
- See Also:
-
DiagramTypes.UML_CLASS_DIAGRAMDiagramTypes.UML_USECASE_DIAGRAMDiagramTypes.UML_COMMUNICATION_DIAGRAMDiagramTypes.UML_SEQUENCE_DIAGRAMDiagramTypes.UML_STATECHART_DIAGRAMDiagramTypes.UML_PROTOCOL_STATE_MACHINE_DIAGRAMDiagramTypes.UML_ACTIVITY_DIAGRAMDiagramTypes.UML_COMPOSITE_STRUCTURE_DIAGRAMDiagramTypes.UML_OBJECT_DIAGRAMDiagramTypes.UML_PACKAGE_DIAGRAMDiagramTypes.UML_COMPONENT_DIAGRAMDiagramTypes.UML_DEPLOYMENT_DIAGRAMDiagramTypes.UML_PROFILE_DIAGRAM
-
getHumanType
Returns human representation of the data type- Specified by:
getHumanTypein interfaceBaseElement- Overrides:
getHumanTypein classPresentationElement- Returns:
- the name of the data
-
clone
- Specified by:
clonein interfaceBaseElement- Overrides:
clonein classAbstractDiagramPresentationElement
-
getDiagram
Returns Diagram model element of this presentation element.- Returns:
- Diagram object of this element.
- See Also:
-
getElement
Description copied from class:PresentationElementReturns model element of this presentation element. Some presentation elements (for example TextBoxes) do not have model elements.- Specified by:
getElementin interfaceModelElementProvider- Overrides:
getElementin classPresentationElement- Returns:
- model element of this presentation element.
-
propertyChange
Description copied from class:PresentationElementListens for property change it can be: data was edited text box was edited- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classAbstractDiagramPresentationElement
-
accept
Description copied from interface:MDElementMethod accepts a visitor, and calls method "visit<class name>(this)" of a visitor. See "Visitor" pattern for more details.- Specified by:
acceptin interfaceMDElement- Overrides:
acceptin classAbstractDiagramPresentationElement- Parameters:
visitor- which visits this element.- Throws:
Exception
-
getDiagramTypeAsString
- Specified by:
getDiagramTypeAsStringin classAbstractDiagramPresentationElement
-
getName
Gets the name of thisDiagramPresentationElementobject. -
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:
isShowAbbreviatedDiagramTypein interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
isShowDiagramName
public boolean isShowDiagramName()- Specified by:
isShowDiagramNamein interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
isShowParameters
public boolean isShowParameters()- Specified by:
isShowParametersin interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
isShowContextName
public boolean isShowContextName()- Specified by:
isShowContextNamein interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
isShowContextType
public boolean isShowContextType()- Specified by:
isShowContextTypein interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
isShowDiagramType
public boolean isShowDiagramType()- Specified by:
isShowDiagramTypein interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
isShowContextKind
public boolean isShowContextKind()- Specified by:
isShowContextKindin interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
-
sSetShowDiagramFrame
public void sSetShowDiagramFrame(boolean show) -
isShowDiagramOwner
public boolean isShowDiagramOwner() -
isShowDiagramFrame
public boolean isShowDiagramFrame()- Overrides:
isShowDiagramFramein classAbstractDiagramPresentationElement
-
setShowDiagramOwner
public void setShowDiagramOwner(boolean show) -
setShowDiagramFrame
public void setShowDiagramFrame(boolean show) -
sSetElement
Sets diagram element for this object.- Overrides:
sSetElementin classPresentationElement
-
canAddInstance
Description copied from class:PresentationElementObject view has no children.- Overrides:
canAddInstancein classAbstractDiagramPresentationElement
-
hasManipulationSortManager
protected boolean hasManipulationSortManager()- Overrides:
hasManipulationSortManagerin classAbstractDiagramPresentationElement
-
onFontChange
public void onFontChange()- Overrides:
onFontChangein 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:
getUseStereotypeModein interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner- Returns:
- diagram orientation mode.
-
getAspectRatioMode
-
setAspectRatioMode
-
sSetAspectRatioMode
-
internalSilentApply
public void internalSilentApply()Description copied from class:PresentationElementSilently applies all properties after initialization- Overrides:
internalSilentApplyin classAbstractDiagramPresentationElement
-
internalApplyProperties
public void internalApplyProperties(com.dassault_systemes.modeler.magic.diagram.styledelegates.PresentationElementStyleChanger changer) Description copied from class:PresentationElementApplies properties from given property manager- Overrides:
internalApplyPropertiesin classAbstractDiagramPresentationElement- Parameters:
changer- new properties
-
preferredSize
- Overrides:
preferredSizein 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:
applyForcedPropertiesin 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:
getRealTypein 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:
sSetDiagramFramein classAbstractDiagramPresentationElement
-
getDiagramFrame
Get the frame of the diagram.- Specified by:
getDiagramFramein classAbstractDiagramPresentationElement- Returns:
- frame of the diagram.
-
getContainer
public com.nomagic.magicdraw.uml.symbols.DiagramObjectViewContainer getContainer()- Overrides:
getContainerin classAbstractDiagramPresentationElement- Returns:
- diagram container
-
setInitialDiagramFrameBounds
public void setInitialDiagramFrameBounds()Sets initial diagram frame bounds for this diagram's frame.- Overrides:
setInitialDiagramFrameBoundsin classAbstractDiagramPresentationElement
-
getStereotypesDisplayMode
Description copied from interface:com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwnerGets setereotypes display mode.- Specified by:
getStereotypesDisplayModein interfacecom.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner- Specified by:
getStereotypesDisplayModein interfaceStereotypesDisplayModeOwner- Returns:
- stereotypes display mode.
-
sSetStereotypesDisplayMode
Description copied from interface:StereotypesDisplayModeOwnerSimple sets (no updates) stereotypes display mode.- Specified by:
sSetStereotypesDisplayModein interfaceStereotypesDisplayModeOwner- Parameters:
mode- stereotypes display mode value.
-
setStereotypesDisplayMode
Description copied from interface:StereotypesDisplayModeOwnerSets stereotype display mode value.- Specified by:
setStereotypesDisplayModein interfaceStereotypesDisplayModeOwner- Parameters:
mode- stereotype display mode.
-
getDSLStereotypesDisplayMode
Description copied from interface:StereotypesDisplayModeOwnerGets DSL stereotype display mode.- Specified by:
getDSLStereotypesDisplayModein interfaceStereotypesDisplayModeOwner- Returns:
- stereotype display mode.
-
sSetDSLStereotypesDisplayMode
Description copied from interface:StereotypesDisplayModeOwnerSimple sets (no updates) DSL stereotypes display mode.- Specified by:
sSetDSLStereotypesDisplayModein interfaceStereotypesDisplayModeOwner- Parameters:
mode- stereotypes display mode value.
-
setDSLStereotypesDisplayMode
Description copied from interface:StereotypesDisplayModeOwnerSets DSL stereotype display mode value.- Specified by:
setDSLStereotypesDisplayModein interfaceStereotypesDisplayModeOwner- Parameters:
mode- stereotype display mode.
-
isAutosized
public boolean isAutosized() -
sSetAutosize
public void sSetAutosize(boolean val) -
setAutosize
public void setAutosize(boolean val) -
updateFrameSize
- Overrides:
updateFrameSizein classAbstractDiagramPresentationElement
-
isUseFlowLayoutLogic
public boolean isUseFlowLayoutLogic()Indicates if smart path/shape edit should be used in this diagram.- Overrides:
isUseFlowLayoutLogicin classAbstractDiagramPresentationElement- Returns:
- true if smart symbol editing should be used, false otherwise.
-
clearCaches
protected void clearCaches()- Overrides:
clearCachesin 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:
sSetSuspendShapeAutoResizeModein classAbstractDiagramPresentationElement
-
setSuspendShapeAutoResizeMode
- Overrides:
setSuspendShapeAutoResizeModein classAbstractDiagramPresentationElement
-
internalClearOnUnload
protected void internalClearOnUnload()- Overrides:
internalClearOnUnloadin classAbstractDiagramPresentationElement
-
getRepresentationFromModelElement
public com.nomagic.magicdraw.core.diagram.DiagramRepresentationObject getRepresentationFromModelElement()- Specified by:
getRepresentationFromModelElementin classAbstractDiagramPresentationElement
-
postOpenFromCommand
public void postOpenFromCommand()- Overrides:
postOpenFromCommandin classAbstractDiagramPresentationElement
-
sSetForceStoreContentOnSave
protected void sSetForceStoreContentOnSave(boolean forceStoreContentOnSave) - Overrides:
sSetForceStoreContentOnSavein 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:AbstractDiagramPresentationElementLayouts 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:
layoutin 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:
getDefaultDiagramLayouterin classAbstractDiagramPresentationElement
-