Class DiagramFrameView

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.DiagramFrameView
All Implemented Interfaces:
com.dassault_systemes.modeler.magic.diagram.DiagramFrameShape, 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.PortOwner, 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 DiagramFrameView extends com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView implements com.nomagic.magicdraw.uml.symbols.shapes.PortOwner, com.dassault_systemes.modeler.magic.diagram.DiagramFrameShape
  • Field Details

    • DIAGRAM_TYPES_FOR_PORTS_ON_FRAME

      public static final List<String> DIAGRAM_TYPES_FOR_PORTS_ON_FRAME
  • Constructor Details

    • DiagramFrameView

      public DiagramFrameView()
    • DiagramFrameView

      public DiagramFrameView(@CheckForNull PresentationElement parent)
  • Method Details

    • 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.HeaderShapeView
      Parameters:
      visitor - which visits this element.
      Throws:
      Exception
    • selfSpecificHeaderShapeDraw

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

      protected boolean canFill()
      Overrides:
      canFill in class PresentationElement
      Returns:
      true if symbol can be filled with some color
    • getFillColor

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

      public int getCornerArcSize()
    • getResourceID

      public String getResourceID()
      Specified by:
      getResourceID in interface MDElement
      Overrides:
      getResourceID in class com.nomagic.magicdraw.uml.MDElementImpl
    • useParentStyle

      public boolean useParentStyle()
      Description copied from class: PresentationElement
      Does this element uses parent style or has it's own?
      Overrides:
      useParentStyle in class PresentationElement
      Returns:
      true, if element does not have style and uses parent's style.
    • getParentSymbolStyleOwner

      public PresentationElement getParentSymbolStyleOwner()
      Description copied from class: PresentationElement
      Returns parent to which this symbol delegates style attributes related functionality.
      Overrides:
      getParentSymbolStyleOwner in class PresentationElement
      Returns:
      parent symbol to delegate or null if this symbol does not delegate.
    • mustShowContextMenu

      public boolean mustShowContextMenu()
      Overrides:
      mustShowContextMenu in class PresentationElement
    • intersects

      public boolean intersects(int x, int y, int width, int height, com.nomagic.magicdraw.uml.symbols.IntersectionKind kind)
      Description copied from class: PresentationElement
      checks whether object intersects with given rectangle
      Overrides:
      intersects in class ShapeElement
      Returns:
      true if object and rectangle intersects
    • coversPoint

      public boolean coversPoint(int x, int y, com.nomagic.magicdraw.uml.symbols.IntersectionKind kind)
      Description copied from class: PresentationElement
      checks if object covers provided point
      Overrides:
      coversPoint in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      Returns:
      true if object covers this point
    • adjustBoundsBeforeChange

      public Rectangle adjustBoundsBeforeChange(Rectangle rec, boolean autosizeOperation, Collection<PresentationElement> movedTogether)
      Description copied from class: PresentationElement
      Validate bounds before bounds change operation
      Overrides:
      adjustBoundsBeforeChange in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
    • canAddInstance

      public boolean canAddInstance(PresentationElement symbol)
      Description copied from class: PresentationElement
      Object view has no children.
      Overrides:
      canAddInstance in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
    • getEncapsulatedClassifier

      public EncapsulatedClassifier getEncapsulatedClassifier()
      Specified by:
      getEncapsulatedClassifier in interface com.nomagic.magicdraw.uml.symbols.shapes.PortOwner
    • getEncapsulatedClassifierProvider

      public TypedElement getEncapsulatedClassifierProvider()
      Specified by:
      getEncapsulatedClassifierProvider in interface com.nomagic.magicdraw.uml.symbols.shapes.PortOwner
    • createSmartListenerConfig

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

      protected UnmodifiableDimension getDefaultDimension()
      Overrides:
      getDefaultDimension in class ShapeElement
    • preferredSizeIgnoringOrientation

      protected void preferredSizeIgnoringOrientation(Dimension pref, int locationX, int locationY)
      Overrides:
      preferredSizeIgnoringOrientation in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • minimumOrMinimumShrinkableDimension

      protected void minimumOrMinimumShrinkableDimension(Dimension size)
      Overrides:
      minimumOrMinimumShrinkableDimension in class ShapeElement
    • minimumSizeForShrinkingIgnoringOrientation

      public void minimumSizeForShrinkingIgnoringOrientation(Dimension size, int locationX, int locationY)
      Overrides:
      minimumSizeForShrinkingIgnoringOrientation in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
    • canMoveChildOutside

      protected boolean canMoveChildOutside(PresentationElement element)
      Overrides:
      canMoveChildOutside in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
    • internalLayoutChildren

      public void internalLayoutChildren(boolean calculatePrefSize)
      Overrides:
      internalLayoutChildren in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • providesVerticalCenterline

      public boolean providesVerticalCenterline()
      Description copied from interface: com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
      Indicates if this shape can provide a vertical centerline for other shapes to snap.
      Specified by:
      providesVerticalCenterline in interface com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
      Overrides:
      providesVerticalCenterline in class ShapeElement
      Returns:
      true if this shape provides vertical centerline, false otherwise.
    • providesHorizontalCenterline

      public boolean providesHorizontalCenterline()
      Description copied from interface: com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
      Indicates if this shape can provide a horizontal centerline for other shapes to snap.
      Specified by:
      providesHorizontalCenterline in interface com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
      Overrides:
      providesHorizontalCenterline in class ShapeElement
      Returns:
      true if this shape provides horizontal centerline, false otherwise.
    • isHorizontalCenterlineProvider

      public boolean isHorizontalCenterlineProvider()
      Description copied from class: ShapeElement
      Indicates whether this shape provides horizontal center-lines to other shapes.
      Overrides:
      isHorizontalCenterlineProvider in class ShapeElement
      Returns:
      true if this shape provides horizontal center-lines, false otherwise.
    • isVerticalCenterlineProvider

      public boolean isVerticalCenterlineProvider()
      Description copied from class: ShapeElement
      Indicates whether this shape provides vertical center-lines to other shapes.
      Overrides:
      isVerticalCenterlineProvider in class ShapeElement
      Returns:
      true if this shape provides vertical center lines, false otherwise.
    • movePathElement

      protected void movePathElement(PathElement link, @CheckForNull PathConnector requestor)
      Description copied from class: PathConnector
      Calculates position of a path element.
      Overrides:
      movePathElement in class ShapeElement
      Parameters:
      link - element which position will be calculated.
      requestor - the requestor of this path moving. Implementations may check to avoid endless loops.
    • 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
    • sSetParent

      public void sSetParent(PresentationElement parent)
      Description copied from class: PresentationElement
      Overrides:
      sSetParent in class PresentationElement
      Parameters:
      parent - parent view
    • 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()
    • snapsToCenterlines

      public boolean snapsToCenterlines()
      Description copied from interface: com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
      Indicates if this shape can be snapped to centerlines.
      Specified by:
      snapsToCenterlines in interface com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
      Overrides:
      snapsToCenterlines in class ShapeElement
      Returns:
      true if this shape can be snapped to centerlines, false otherwise.
    • getFrameElementBounds

      public Rectangle getFrameElementBounds()
    • calculateFrameElementBounds

      public void calculateFrameElementBounds()
    • hasBoundaryDetails

      public boolean hasBoundaryDetails()
      Returns true if frame carries details on its border. If the frame is plain, false is returned.
      Returns:
      true if frame carries details on border, false otherwise.
    • layoutFrameIfSet

      public void layoutFrameIfSet()
      Specified by:
      layoutFrameIfSet in interface com.dassault_systemes.modeler.magic.diagram.DiagramFrameShape
    • layoutFrame

      public void layoutFrame()
    • getHumanType

      public String getHumanType()
      Description copied from class: PresentationElement
      Returns human representation of the data type
      Specified by:
      getHumanType in interface BaseElement
      Overrides:
      getHumanType in class PresentationElement
      Returns:
      the name of the data
    • getHumanName

      public String getHumanName()
      Description copied from class: PresentationElement
      Returns human representation of the data type
      Specified by:
      getHumanName in interface BaseElement
      Overrides:
      getHumanName in class PresentationElement
      Returns:
      the name of the data
    • internalPostUpdatePresentationElement

      protected void internalPostUpdatePresentationElement()
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      Subclasses may override this method and do some actions after specific update and resizing are executed. Implementation is empty here.
      Overrides:
      internalPostUpdatePresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      See Also:
      • AbstractHeaderShapeView.internalUpdatePresentationElement()
    • 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.
    • getHeaderView

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

      public boolean isSetAsDiagramFrame()
      Specified by:
      isSetAsDiagramFrame in interface com.dassault_systemes.modeler.magic.diagram.DiagramFrameShape
    • isOwningMode

      public boolean isOwningMode()
      Specified by:
      isOwningMode in interface com.dassault_systemes.modeler.magic.diagram.DiagramFrameShape