Class SequenceLifelineView

  • 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 SequenceLifelineView
    extends com.nomagic.magicdraw.uml.symbols.shapes.BaseLifelineView
    Creates lifeline "head" in sequence diagram.
    • Field Detail

      • mLifelinesCollector

        private com.nomagic.magicdraw.uml.symbols.SequenceObjectViewContainer.LifelineCollector mLifelinesCollector
      • mCreated

        private boolean mCreated
        true , if object was created by message
      • TOP_Y

        public static final int TOP_Y
        Sequence objects top left corner y coordinate.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SequenceLifelineView

        public SequenceLifelineView()
      • SequenceLifelineView

        public SequenceLifelineView​(@CheckForNull
                                    PresentationElement parent)
    • Method Detail

      • getMainLifeLine

        @CheckForNull
        public LifeLineLineView getMainLifeLine()
        Returns:
        main lifeline
      • sSetShowEntireActivation

        public void sSetShowEntireActivation​(boolean show)
      • isShowEntireActivation

        public boolean isShowEntireActivation()
      • isShowSelector

        public boolean isShowSelector()
      • 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.BaseLifelineView
      • setShowEntireActivation

        public void setShowEntireActivation​(boolean show)
      • internalApplyProperties

        public void internalApplyProperties​(PropertyManager man)
        Description copied from class: PresentationElement
        Applies properties from given property manager
        Overrides:
        internalApplyProperties in class com.nomagic.magicdraw.uml.symbols.shapes.BaseLifelineView
        Parameters:
        man - new properties
      • canHavePaths

        public boolean canHavePaths()
        Returns:
        true if symbol can have connected paths. Return false here.
      • internalSpecificUpdate

        protected void internalSpecificUpdate()
        Overrides:
        internalSpecificUpdate in class com.nomagic.magicdraw.uml.symbols.shapes.BaseLifelineView
      • clone

        public SequenceLifelineView clone()
        Description copied from class: ElementImpl
        Returns a copy of the Element.
        Specified by:
        clone in interface BaseElement
        Overrides:
        clone in class com.nomagic.magicdraw.uml.symbols.shapes.BaseLifelineView
        Returns:
        the cloned object
      • canAddInstance

        public boolean canAddInstance​(PresentationElement obj)
        Description copied from class: PresentationElement
        Object view has no children.
        Overrides:
        canAddInstance in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      • 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.BaseLifelineView
        Parameters:
        visitor - which visits this element.
        Throws:
        java.lang.Exception
      • resizeParent

        public void resizeParent()
        Description copied from class: PresentationElement
        Method that initiates parent resize to accommodate children if some child's bounds are changed.
      • prefDimensionByManipulatedChildren

        protected void prefDimensionByManipulatedChildren​(java.awt.Dimension pref,
                                                          int locationX,
                                                          int locationY)
        Overrides:
        prefDimensionByManipulatedChildren in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      • autosizeByChildren

        public void autosizeByChildren​(boolean calculatePrefSize)
        Overrides:
        autosizeByChildren in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      • internalGetManipulatedChildrenRect

        @CheckForNull
        protected java.awt.Rectangle internalGetManipulatedChildrenRect​(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel)
        Overrides:
        internalGetManipulatedChildrenRect in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      • adjustBounds

        public void adjustBounds​(java.awt.Rectangle bounds)
        Description copied from class: ShapeElement
        Validates bounds
        Parameters:
        bounds - bounds
      • internalSnapToGrid

        protected void internalSnapToGrid​(java.awt.Point p,
                                          float step)
      • setCreated

        public void setCreated​(boolean created)
      • isCreated

        public boolean isCreated()
      • getAllMessages

        public java.util.List<com.nomagic.magicdraw.uml.symbols.paths.SeqBaseMessageView> getAllMessages()
      • moveObjectToXY

        @CheckForNull
        public java.awt.Rectangle moveObjectToXY​(int newX,
                                                 int newY)
      • movePathElement

        public 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.TypedElementView
        Parameters:
        link - element which position will be calculated.
        requestor - the requestor of this path moving. Implementations may check in order to avoid endless loops.
      • getCreateMessage

        @CheckForNull
        public com.nomagic.magicdraw.uml.symbols.paths.SeqBaseMessageView getCreateMessage()
        Returns:
        if object is created by message, returns that message
      • getDeleteMessage

        @CheckForNull
        public com.nomagic.magicdraw.uml.symbols.paths.SeqBaseMessageView getDeleteMessage()
        Gets delete message destroying this lifeline.
        Returns:
        delete message is this lifeline is destroyed, null otherwise.
      • adjustBoundsForMoving

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

        public int getMinimalDistanceFromTop()
      • findParentForData

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

        protected boolean internalAppendChildRect​(PresentationElement view)
        Overrides:
        internalAppendChildRect in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      • canSuppressContent

        public boolean canSuppressContent()
        Overrides:
        canSuppressContent in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • getSeqContainer

        public com.nomagic.magicdraw.uml.symbols.SequenceObjectViewContainer getSeqContainer()
      • autosize

        public void autosize​(boolean calculatePrefSize)
        Description copied from class: ShapeElement
        Calculate preferred size and make this shape size at least as preferred(if size is smaller)
        Overrides:
        autosize in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
        Parameters:
        calculatePrefSize - calculate preferred size
      • canUseEntireActivation

        public boolean canUseEntireActivation()
      • isUseEntireActivation

        public boolean isUseEntireActivation()
      • 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
      • rememberBounds

        public void rememberBounds()
        Description copied from class: PresentationElement
        Remember old bounds
      • rememberBounds

        public void rememberBounds​(java.awt.Rectangle bounds)
      • getLifelinesCollector

        public com.nomagic.magicdraw.uml.symbols.SequenceObjectViewContainer.LifelineCollector getLifelinesCollector()
      • isDrawSeparator

        protected boolean isDrawSeparator()
        Overrides:
        isDrawSeparator in class com.nomagic.magicdraw.uml.symbols.shapes.TypedElementView
      • canChangeParent

        public boolean canChangeParent​(java.util.Collection<? extends PresentationElement> movedTogether,
                                       @CheckForNull
                                       BaseElement newParent,
                                       boolean changeElementParent)
        Description copied from class: PresentationElement
        Returns true, if element can change parent.
        Parameters:
        movedTogether - collection of the elements, whose will change the parent together with this.
        newParent - new symbol parent
        changeElementParent - change element parent
        Returns:
        true if parent of symbol can be changed
      • hasSharedData

        public boolean hasSharedData()
        Description copied from class: PresentationElement
        Returns true if data of this object can be shared. If data is not shared data can be deleted with del key. Or it must be deleted with CRL+D
        Returns:
        true if data of this object can be shared.
      • createSmartListenerConfig

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

        public com.nomagic.magicdraw.uml.symbols.shapes.SequenceLifelineHeaderView getHeaderView()
        Overrides:
        getHeaderView in class com.nomagic.magicdraw.uml.symbols.shapes.BaseLifelineView