Class StateInvariantView

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.FragmentView
com.nomagic.magicdraw.uml.symbols.shapes.StateInvariantView
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.OwnerNameLabelOwner, 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 StateInvariantView extends com.nomagic.magicdraw.uml.symbols.shapes.FragmentView

Represents state invariant symbol in a sequence diagram.

State invariant is described as a runtime constraint on the participants of the interaction. It may be used to specify a variety of different kinds of constraints, such as values of attributes or variables, internal or external states, and so on.

State invariant has two presentation options. By default it is represented by rounded rectangle with state name in it (state notation). The other presentation option is curly brackets with constraint specification between them (constraint specification notation).

  • Constructor Details

    • StateInvariantView

      public StateInvariantView()
    • StateInvariantView

      public StateInvariantView(@CheckForNull PresentationElement parent)
  • Method Details

    • getDefaultDimension

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

      protected void movePathElement(PathElement link, @CheckForNull PathConnector requestor)
      Description copied from class: PathConnector
      Calculates position of a path element.
      Overrides:
      movePathElement in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
      Parameters:
      link - element which position will be calculated.
      requestor - the requestor of this path moving. Implementations may check to avoid endless loops.
    • 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.FragmentView
      Parameters:
      visitor - which visits this element.
      Throws:
      Exception
    • getStateInvariant

      @Deprecated public StateInvariant getStateInvariant()
      Deprecated.
      use #getElement
    • getElement

      public StateInvariant 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 com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
      Returns:
      model element of this presentation element.
    • getLineView

      @CheckForNull public LifeLineLineView getLineView()
      Gets lifeline line on which state invariant lies.
      Returns:
      lifeline line view on which this state invariant lies.
    • getSequenceLifelineView

      @CheckForNull public SequenceLifelineView getSequenceLifelineView()
      Returns sequence lifeline view on which this state invariant lies.
      Returns:
      sequence lifeline view or null if it is not found among parent views.
    • createStateForUpdateOperation

      protected List<Object> createStateForUpdateOperation()
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      Create collection of any properties used to distinguish during shape update if movePathElements should be called
      Overrides:
      createStateForUpdateOperation in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Returns:
      state
    • paintSelfBackground

      public void paintSelfBackground(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
      Overrides:
      paintSelfBackground 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.FragmentView
    • createBoundsShape

      public ContainerShape createBoundsShape(PathElement path, BoundsTransformation transformation)
      Description copied from class: ShapeElement
      Creates bounding shape for intersection calculation.
      Overrides:
      createBoundsShape in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Parameters:
      path - path
      transformation - transformation
      Returns:
      shape
    • 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.FragmentView
      See Also:
      • AbstractHeaderShapeView.internalUpdatePresentationElement()
    • dispose

      public final 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.FragmentView
    • getDisplayMode

      public com.nomagic.magicdraw.uml.symbols.shapes.StateInvariantView.DisplayMode getDisplayMode()
      Gets current state invariant display mode.
      Returns:
      state invariant display mode.
    • updateName

      protected void updateName()
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      Updates name and owner qualified name text in header view.
      Overrides:
      updateName in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
    • getCoveredLifeLineViews

      public Collection<LifeLineLineView> getCoveredLifeLineViews(boolean checkData, boolean useManipulationBounds)
      Overrides:
      getCoveredLifeLineViews in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
    • getCoveredLifelinesRectangle

      @CheckForNull protected Rectangle getCoveredLifelinesRectangle(Collection<PresentationElement> ignoreThese)
      Overrides:
      getCoveredLifelinesRectangle in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
    • correctCoveredLifelinesInformation

      public void correctCoveredLifelinesInformation()
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
      Updates covered lifelines symbol information according model.
      Overrides:
      correctCoveredLifelinesInformation in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
    • createSmartListenerConfig

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

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

      public boolean hasCoveredLifelinesAction()
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
      Indicates whether fragment symbol should have a covered lifelines action.
      Overrides:
      hasCoveredLifelinesAction in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
      Returns:
      true always here
    • hasSpecialOwnerDisplayMode

      protected boolean hasSpecialOwnerDisplayMode()
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
      Indicates if this fragment has its own special owner display mode.
      Overrides:
      hasSpecialOwnerDisplayMode in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
      Returns:
      true if this fragment has its own special owner display mode.
    • adjustBoundsBeforeChange

      public Rectangle adjustBoundsBeforeChange(Rectangle rectangle, 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.FragmentView
    • findOwnerForElement

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

      public boolean moveRelated()
      Overrides:
      moveRelated in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView