Class DiagramShape

java.lang.Object
com.nomagic.magicdraw.uml.MDElementImpl
com.nomagic.magicdraw.uml.symbols.PresentationElement
com.nomagic.magicdraw.uml.symbols.paths.PathConnector
com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement
com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
com.nomagic.magicdraw.uml.symbols.shapes.FrameView
com.nomagic.magicdraw.uml.symbols.shapes.DiagramShape
All Implemented Interfaces:
BaseElement, com.nomagic.magicdraw.uml.CompartmentSupport, MDElement, ModelElementProvider, com.nomagic.magicdraw.uml.symbols.CompartmentContainer, com.nomagic.magicdraw.uml.symbols.CompartmentOwner, com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape, com.nomagic.magicdraw.uml.symbols.PropertyBasedPresentationElement, com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner, com.nomagic.magicdraw.uml.symbols.shapes.QualifiedNameLabelOwner, StereotypesDisplayModeOwner, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider, com.nomagic.magicdraw.uml.symbols.Wrapable, NameOwner, PropertyChangeListener, Cloneable, Comparable, EventListener

@OpenApi public class DiagramShape extends com.nomagic.magicdraw.uml.symbols.shapes.FrameView implements com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
  • Field Details

    • DEFAULT_DIAGRAM_OVERVIEW_SIZE

      public static final UnmodifiableDimension DEFAULT_DIAGRAM_OVERVIEW_SIZE
      Default diagram shape size when in diagram overview mode.
  • Constructor Details

    • DiagramShape

      public DiagramShape()
    • DiagramShape

      public DiagramShape(@CheckForNull PresentationElement parent)
  • Method Details

    • internalGetHeaderInsets

      protected com.nomagic.ui.UnmodifiableInsets internalGetHeaderInsets()
      Overrides:
      internalGetHeaderInsets in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • displayFullDiagramOverview

      public boolean displayFullDiagramOverview()
      Indicates if diagram overview displays detailed diagram frame.
      Returns:
      true if detailed diagram is displayed, false otherwise.
    • getDefaultDimension

      protected UnmodifiableDimension getDefaultDimension()
      Overrides:
      getDefaultDimension in class com.nomagic.magicdraw.uml.symbols.shapes.FrameView
    • accept

      public void accept(Visitor visitor) throws Exception
      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 interface MDElement
      Overrides:
      accept in class com.nomagic.magicdraw.uml.symbols.shapes.FrameView
      Parameters:
      visitor - which visits this element.
      Throws:
      Exception
    • getHeaderView

      public com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderView getHeaderView()
      Overrides:
      getHeaderView in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • getElement

      public Diagram 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 interface ModelElementProvider
      Overrides:
      getElement in class PresentationElement
      Returns:
      model element of this presentation element.
    • getRepresentedDiagramView

      @CheckForNull public DiagramPresentationElement getRepresentedDiagramView()
      Gets diagram presentation element represented by this diagram shape.
      Returns:
      presentation element of the diagram, represented by this shape.
    • updateChildrenVisibility

      public void updateChildrenVisibility()
      Overrides:
      updateChildrenVisibility in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • setStereotypesDisplayMode

      public void setStereotypesDisplayMode(String mode)
      Description copied from interface: StereotypesDisplayModeOwner
      Sets stereotype display mode value.
      Specified by:
      setStereotypesDisplayMode in interface StereotypesDisplayModeOwner
      Overrides:
      setStereotypesDisplayMode in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      Parameters:
      mode - stereotype display mode.
    • sSetStereotypesDisplayMode

      public void sSetStereotypesDisplayMode(String mode)
      Description copied from interface: StereotypesDisplayModeOwner
      Simple sets (no updates) stereotypes display mode.
      Specified by:
      sSetStereotypesDisplayMode in interface StereotypesDisplayModeOwner
      Overrides:
      sSetStereotypesDisplayMode in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      Parameters:
      mode - stereotypes display mode value.
    • getStereotypesToDisplay

      protected com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView.StereotypeDisplayData getStereotypesToDisplay()
      Overrides:
      getStereotypesToDisplay in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      Returns:
      stereotypes to display on this symbol
    • setStereotype

      public void setStereotype()
      Overrides:
      setStereotype in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • isShowAbbreviatedType

      public boolean isShowAbbreviatedType()
    • sSetShowAbbreviatedType

      public void sSetShowAbbreviatedType(boolean showAbbreviatedType)
    • setShowAbbreviatedType

      public void setShowAbbreviatedType(boolean showAbbreviatedType)
    • isShowDiagramName

      public boolean isShowDiagramName()
      Specified by:
      isShowDiagramName in interface com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
    • sSetShowDiagramName

      public void sSetShowDiagramName(boolean show)
    • setShowDiagramName

      public void setShowDiagramName(boolean show)
    • isShowParameters

      public boolean isShowParameters()
      Specified by:
      isShowParameters in interface com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
    • sSetShowParameters

      public void sSetShowParameters(boolean show)
    • setShowParameters

      public void setShowParameters(boolean show)
    • isShowContextName

      public boolean isShowContextName()
      Specified by:
      isShowContextName in interface com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
    • sSetShowContextName

      public void sSetShowContextName(boolean show)
    • setShowContextName

      public void setShowContextName(boolean show)
    • isShowContextType

      public boolean isShowContextType()
      Specified by:
      isShowContextType in interface com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
    • sSetShowContextType

      public void sSetShowContextType(boolean show)
    • setShowContextType

      public void setShowContextType(boolean show)
    • isShowDiagramType

      public boolean isShowDiagramType()
      Specified by:
      isShowDiagramType in interface com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
    • sSetShowDiagramType

      public void sSetShowDiagramType(boolean show)
    • setShowDiagramType

      public void setShowDiagramType(boolean show)
    • isShowContextKind

      public boolean isShowContextKind()
      Specified by:
      isShowContextKind in interface com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
    • sSetShowContextKind

      public void sSetShowContextKind(boolean show)
    • setShowContextKind

      public void setShowContextKind(boolean show)
    • sSetUseStereotypeMode

      public void sSetUseStereotypeMode(String mode)
      Simple set for diagram use stereotype mode property
      Parameters:
      mode - - diagram orientation mode.
    • setUseStereotypeMode

      public void setUseStereotypeMode(String mode)
      Sets diagram use stereotype mode.
      Parameters:
      mode - - diagram orientation mode.
    • getUseStereotypeMode

      public String getUseStereotypeMode()
      Description copied from interface: com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
      Gets use stereotype display mode.
      Specified by:
      getUseStereotypeMode in interface com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
      Returns:
      use stereotype display mode.
    • internalSilentApply

      public void internalSilentApply()
      Description copied from class: PresentationElement
      Silently applies all properties after initialization
      Overrides:
      internalSilentApply in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • 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 class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      Parameters:
      changer - new properties
    • isShowAbbreviatedDiagramType

      public boolean isShowAbbreviatedDiagramType()
      Specified by:
      isShowAbbreviatedDiagramType in interface com.nomagic.magicdraw.uml.symbols.shapes.DiagramFrameHeaderOwner
    • createSmartListenerConfig

      protected void createSmartListenerConfig(List<SmartListenerConfig> configurations)
      Overrides:
      createSmartListenerConfig in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • disposePropertyChangeListener

      protected void disposePropertyChangeListener()
      Overrides:
      disposePropertyChangeListener in class PresentationElement
    • internalCreatePropertyChangeListener

      protected void internalCreatePropertyChangeListener(com.nomagic.magicdraw.uml.symbols.PresentationElement.SmartListenerConfigData data)
      Overrides:
      internalCreatePropertyChangeListener in class PresentationElement
    • dispose

      public void dispose()
      Description copied from class: PresentationElement
      disposes ends of links when link is deleted
      Specified by:
      dispose in interface BaseElement
      Overrides:
      dispose in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • atInsert

      public void atInsert()
      Description copied from class: PresentationElement
      Invalidates object at insert
      Specified by:
      atInsert in interface BaseElement
      Overrides:
      atInsert in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • internalSpecificUpdate

      protected void internalSpecificUpdate()
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      Specific to every shape and model element update operation. Must be overridden in subclasses if you need to do specific tasks. !!! Important - all resizing, paths moving and so on is done in updatePresentationElement and should not be done in specific update.
      Overrides:
      internalSpecificUpdate in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      See Also:
      • AbstractHeaderShapeView.internalUpdatePresentationElement()
    • sSetShowDiagramHeader

      public void sSetShowDiagramHeader(boolean show)
      Sets show diagram header property value.
      Parameters:
      show - show diagram header property value.
    • isShowDiagramHeader

      public boolean isShowDiagramHeader()
      Gets show diagram header property value.
      Returns:
      show diagram header property value.
    • setShowDiagramHeader

      public void setShowDiagramHeader(boolean show)
      Sets show diagram header property value.
      Parameters:
      show - show diagram header property value.
    • sSetShowDiagramOverviewContent

      public void sSetShowDiagramOverviewContent(boolean show)
      Simple sets show diagram overview content symbol property value.
      Parameters:
      show - show diagram overview content value.
    • isShowDiagramOverviewContent

      public boolean isShowDiagramOverviewContent()
      Gets show diagram overview content symbol property value.
      Returns:
      show diagram overview content property value.
    • isAutoScaleDiagramOverviewContent

      public boolean isAutoScaleDiagramOverviewContent()
      Gets auto scale diagram overview content property value.
      Returns:
      auto scale diagram overview content property value.
    • sSetAutoScaleDiagramOverviewContent

      public void sSetAutoScaleDiagramOverviewContent(boolean autoScale)
      Simple sets auto scale diagram overview content symbol property value.
      Parameters:
      autoScale - auto scale diagram overview content property value.
    • setAutoScaleDiagramOverviewContent

      public void setAutoScaleDiagramOverviewContent(boolean autoScale)
      Sets autos cale diagram overview content symbol property value.
      Parameters:
      autoScale - auto scale diagram overview content property value.
    • setShowDiagramOverviewContent

      public void setShowDiagramOverviewContent(boolean show)
      Sets show diagram overview content symbol property value.
      Parameters:
      show - show diagram overview content value.
    • isShowBorder

      public boolean isShowBorder()
    • setShowBorder

      public void setShowBorder(boolean showBorder)
    • sSetShowBorder

      public void sSetShowBorder(boolean showBorder)
    • setDiagramOverviewViews

      public void setDiagramOverviewViews(List<PresentationElement> views)
    • isShowMoreSignInDiagramOverviewContent

      public boolean isShowMoreSignInDiagramOverviewContent()
      Returns:
      true if "more sign" should be visible in overview compartment
    • sSetShowMoreSignInDiagramOverviewContent

      public void sSetShowMoreSignInDiagramOverviewContent(boolean showMoreSign)
      Set "more sign" visibility for overview content compartment. Update/resize shape.
      Parameters:
      showMoreSign - new flag value
    • setShowMoreSignInDiagramOverviewContent

      public void setShowMoreSignInDiagramOverviewContent(boolean showMoreSign)
      Set "more sign" visibility for overview content compartment
      Parameters:
      showMoreSign - new flag value
    • hasRefreshAction

      public boolean hasRefreshAction()
      Indicates if this diagram shape has refresh action.
      Returns:
      true if diagram has refresh action, false otherwise.
    • drawFrameBoundary

      protected void drawFrameBoundary(Graphics2D g2, Rectangle bounds)
      Overrides:
      drawFrameBoundary in class com.nomagic.magicdraw.uml.symbols.shapes.FrameView
    • drawFrameShadow

      protected void drawFrameShadow(Graphics2D g, Rectangle bounds)
      Overrides:
      drawFrameShadow in class com.nomagic.magicdraw.uml.symbols.shapes.FrameView
    • paintSelfBackground

      public void paintSelfBackground(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
      Overrides:
      paintSelfBackground in class com.nomagic.magicdraw.uml.symbols.shapes.FrameView
    • fill

      protected void fill(Graphics2D g, Rectangle bounds)
      Overrides:
      fill in class com.nomagic.magicdraw.uml.symbols.shapes.FrameView
    • selfSpecificHeaderShapeDraw

      protected void selfSpecificHeaderShapeDraw(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
      Overrides:
      selfSpecificHeaderShapeDraw in class com.nomagic.magicdraw.uml.symbols.shapes.FrameView
    • internalGetSelfManipulationPreferredSize

      protected UnmodifiableDimension internalGetSelfManipulationPreferredSize()
      Overrides:
      internalGetSelfManipulationPreferredSize in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Returns:
      size for manipulation which does not take into account the size of children on some specific conditions (for example, in case if wrapped text)
    • sSetAutosize

      public void sSetAutosize(boolean s)
      Description copied from class: ShapeElement
      Simple setter for autosize flag.
      Overrides:
      sSetAutosize in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      Parameters:
      s - value
    • getPreferredDimensionForAutosize

      public UnmodifiableDimension getPreferredDimensionForAutosize()
      Description copied from class: PresentationElement
      Returns preferable dimension of the element for autosize.This implementation simple returns preferred size.
      Overrides:
      getPreferredDimensionForAutosize in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Returns:
      preferred dimension
    • getDiagramOverviewCompartmentView

      public com.nomagic.magicdraw.uml.symbols.shapes.DiagramOverviewCompartmentView getDiagramOverviewCompartmentView()
      Gets diagram overview compartment.
      Returns:
      diagram overview compartment.
    • getDefaultDiagramOverviewSize

      public UnmodifiableDimension getDefaultDiagramOverviewSize()
      Gets default size of the diagram shape when diagram overview is turned on.
      Returns:
      default diagram shape size.
    • getFillColor

      public Color getFillColor()
      Description copied from class: PresentationElement
      Returns fill color
      Overrides:
      getFillColor in class PresentationElement
    • findOwnerForElement

      public com.dassault_systemes.modeler.foundation.model.ModelElement findOwnerForElement(PresentationElement newParent, com.dassault_systemes.modeler.foundation.model.ModelElementOwnershipContext ownershipContext)
      Overrides:
      findOwnerForElement in class PresentationElement
    • getDisplayedViews

      public Collection<PresentationElement> getDisplayedViews()
      Returns:
      collection of presentation elements that are currently visible inside the DiagramOverviewCompartmentView
    • clone

      public DiagramShape clone()
      Specified by:
      clone in interface BaseElement
      Overrides:
      clone in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView