Class 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.shapes.OwnerNameLabelOwner, com.nomagic.magicdraw.uml.symbols.shapes.QualifiedNameLabelOwner, StereotypesDisplayModeOwner, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider, com.nomagic.magicdraw.uml.symbols.Wrapable, NameOwner, java.beans.PropertyChangeListener, java.lang.Cloneable, java.lang.Comparable, java.util.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 Detail

      • StateInvariantView

        public StateInvariantView()
    • Method Detail

      • 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 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 in order to avoid endless loops.
      • accept

        public void accept​(Visitor visitor)
                    throws java.lang.Exception
        Description copied from interface: MDElement
        Method accepts visitor, and calls method visit<class name>(this) of 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:
        java.lang.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 java.util.List<java.lang.Object> createStateForUpdateOperation()
        Overrides:
        createStateForUpdateOperation in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • 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.HeaderShapeView
        Parameters:
        path - path
        transformation - transformation
        Returns:
        shape
      • internalSpecificUpdate

        protected void internalSpecificUpdate()
        Overrides:
        internalSpecificUpdate in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
      • 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()
        Overrides:
        updateName in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
      • getCoveredLifeLineViews

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

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

        public void correctCoveredLifelinesInformation()
        Overrides:
        correctCoveredLifelinesInformation in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
      • createSmartListenerConfig

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

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

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

        protected boolean hasSpecialOwnerDisplayMode()
        Overrides:
        hasSpecialOwnerDisplayMode in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
      • adjustBoundsForMoving

        public java.awt.Rectangle adjustBoundsForMoving​(java.awt.Rectangle rectangle,
                                                        java.util.Collection<PresentationElement> movedTogether)
        Description copied from class: PresentationElement
        validate bounds for moving
        Overrides:
        adjustBoundsForMoving in class com.nomagic.magicdraw.uml.symbols.shapes.FragmentView
      • findParentForData

        public Element findParentForData​(PresentationElement parent,
                                         com.nomagic.uml2.ElementAddContext addContext)
      • moveRelated

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