Class SwimlaneCellView

  • All Implemented Interfaces:
    BaseElement, MDElement, ModelElementProvider, com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider, NameOwner, java.beans.PropertyChangeListener, java.lang.Cloneable, java.lang.Comparable, java.util.EventListener

    @OpenApi
    public class SwimlaneCellView
    extends com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
    • Field Detail

      • mIgnoreAdjustChildBounds

        private boolean mIgnoreAdjustChildBounds
      • mVerticalHeader

        private com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView mVerticalHeader
      • mHorizontalHeader

        private com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView mHorizontalHeader
    • Constructor Detail

      • SwimlaneCellView

        public SwimlaneCellView()
    • Method Detail

      • getPartitionsRecursively

        public java.util.Set<ActivityPartition> getPartitionsRecursively()
      • getHorizontalHeader

        public com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView getHorizontalHeader()
      • getVerticalHeader

        public com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView getVerticalHeader()
      • getHeader

        public com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView getHeader​(boolean vertical)
      • setHeader

        public void setHeader​(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
      • paintSelf

        public void paintSelf​(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
      • internalGetPresentationElementStroke

        public java.awt.BasicStroke internalGetPresentationElementStroke​(int width)
        Description copied from class: PresentationElement
        Return a stroke used to paint symbol's main part
        Parameters:
        width - a custom stroke width. Other stroke parameters will be specific to symbol
        Returns:
        a stroke used to paint symbol's main part
      • isHeaderInner

        public boolean isHeaderInner()
      • 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.ContainerShapeView
        Parameters:
        visitor - which visits this element.
        Throws:
        java.lang.Exception
      • internalGetElementToConnectLink

        public Element internalGetElementToConnectLink​(@CheckForNull
                                                       Element path,
                                                       boolean asClient)
        Description copied from class: PresentationElement
        Returns element that should be used for given link connecting. All possible elements are return by method getElementsForLinkConnecting. Usually this method should be overridden together with getElementsForLinkConnecting().
        Returns:
        all possible elements
        See Also:
        PresentationElement.getElementsForLinkConnecting()
      • 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.ContainerShapeView
      • canAddChild

        public boolean canAddChild()
        Description copied from interface: BaseElement
        Checks if new elements can be added to this element
        Specified by:
        canAddChild in interface BaseElement
        Overrides:
        canAddChild in class com.nomagic.magicdraw.uml.MDElementImpl
        Returns:
        true, if new sub elements can be added.
      • canBeDeleted

        public boolean canBeDeleted()
        Description copied from interface: BaseElement
        Checks if element can be deleted from project. Element cannot be deleted if it is not isEditable(), parent is not set or parent does not allow to remove this element.
        Specified by:
        canBeDeleted in interface BaseElement
        Overrides:
        canBeDeleted in class com.nomagic.magicdraw.uml.MDElementImpl
        Returns:
        true, if element can be deleted from project.
        See Also:
        BaseElement.isEditable()
      • isSortable

        public boolean isSortable()
        Description copied from class: PresentationElement
        If OV is sortable (must be added to sort manager for sorting) method must return true;
      • getActivityPartitionContainer

        @CheckForNull
        private static java.util.Collection<Element> getActivityPartitionContainer​(@CheckForNull
                                                                                   Element element,
                                                                                   ActivityPartition partition)
      • removeHeader

        public void removeHeader​(boolean vertical)
      • sAddPresentationElement

        public void sAddPresentationElement​(PresentationElement element,
                                            int index)
        Description copied from class: PresentationElement
        Add given child to this symbol at given index
        Overrides:
        sAddPresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
        Parameters:
        element - child to add
        index - index to add at. Can be -1
      • sRemovePresentationElement

        public void sRemovePresentationElement​(PresentationElement element)
        Description copied from class: PresentationElement
        Removes given child
        Overrides:
        sRemovePresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
        Parameters:
        element - child
      • addPresentationElement

        public void addPresentationElement​(PresentationElement element,
                                           int index,
                                           boolean resize)
        Overrides:
        addPresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      • mustShowContextMenu

        public boolean mustShowContextMenu()
      • sSetElement

        public void sSetElement​(Element element)
      • moveChildren

        protected void moveChildren​(int dx,
                                    int dy,
                                    java.util.function.Predicate<PresentationElement> filter)
        Overrides:
        moveChildren in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      • adjustChildBounds

        public void adjustChildBounds​(java.awt.Rectangle bounds,
                                      PresentationElement element)
        Description copied from class: PresentationElement
        For adjusting child bounds when child type is not known but bounds should be corrected.
      • useParentProperties

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

        public boolean isMovableByMoveManager()
        Description copied from class: PresentationElement
        Method indicates if object of this instance must be registered in move manager.
      • clone

        public SwimlaneCellView clone()
        Clones this object.
        Specified by:
        clone in interface BaseElement
        Overrides:
        clone in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
        Returns:
        the cloned object
      • getProxyPresentationElementsStream

        protected java.util.stream.Stream<PresentationElement> getProxyPresentationElementsStream()
        Overrides:
        getProxyPresentationElementsStream in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      • isVerticalCenterlineProvider

        public boolean isVerticalCenterlineProvider()
        Description copied from class: ShapeElement
        Indicates whether this shape provides vertical centerlines to other shapes.
        Returns:
        true if this shape provides vertical centerlines, false otherwise.
      • isHorizontalCenterlineProvider

        public boolean isHorizontalCenterlineProvider()
        Description copied from class: ShapeElement
        Indicates whether this shape provides horizontal centerlines to other shapes.
        Returns:
        true if this shape provides horizontal centerlines, false otherwise.
      • removeHeaderFromCell

        public void removeHeaderFromCell​(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
        Removes header from cell data structures.
        Parameters:
        header - which has to be removed.
      • internalUpdatePresentationElement

        protected void internalUpdatePresentationElement()
        Description copied from class: PresentationElement
        Internal symbol update method for subclassing. It is called from update as part of full update action.
        Overrides:
        internalUpdatePresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
        See Also:
        PresentationElement.update()
      • snapsToCenterlines

        public boolean snapsToCenterlines()
        Specified by:
        snapsToCenterlines in interface com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
      • removeFromPartition

        public static void removeFromPartition​(PresentationElement parent,
                                               PresentationElement toRemove)
        If given parent is ActivityPartition (SwimlaneCellView), the information about inPartition is removed from Element of given toRemove symbol. If not, does nothing.
        Parameters:
        parent - possible ActivityPartition symbol
        toRemove - element to remove from partition
      • hasManipulator

        public boolean hasManipulator()
        Description copied from class: PresentationElement
        Returns true, if view has manipulator (is selectable)