Class DecisionView

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

    @OpenApi
    public class DecisionView
    extends com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
    Creates decision view object in activity or state diagram.
    • Field Detail

      • INNER_POLYGON_GAP

        public static final int INNER_POLYGON_GAP
        Distance from outer to inner polygon
        See Also:
        Constant Field Values
      • mResetSize

        private boolean mResetSize
    • Constructor Detail

      • DecisionView

        public DecisionView()
        Creates a new decision view.
      • DecisionView

        public DecisionView​(@CheckForNull
                            PresentationElement parent)
        Creates and initializes a new decision view from specified parameter.
        Parameters:
        parent - this decision view parent object.
    • Method Detail

      • preferredSizeIgnoringOrientation

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

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

        private boolean isSeparateDecisionMergeNotation()
      • 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.ShapeWithLabels
        Parameters:
        visitor - which visits this element.
        Throws:
        java.lang.Exception
      • createBoundsShape

        public ContainerShape createBoundsShape​(@CheckForNull
                                                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.AbstractHeaderShapeView
        Parameters:
        path - path
        transformation - transformation
        Returns:
        shape
      • createPolygon

        private java.awt.Polygon createPolygon​(int grow)
      • findParentForData

        public Element findParentForData​(PresentationElement parent,
                                         com.nomagic.uml2.ext.jmi.helpers.ElementAddContext addContext)
      • isDecisionOrMergeNode

        public boolean isDecisionOrMergeNode()
      • isMergeNode

        private boolean isMergeNode()
      • isDecisionNode

        private boolean isDecisionNode()
      • isJunction

        public boolean isJunction()
      • isChoice

        public boolean isChoice()
      • internalPostUpdatePresentationElement

        protected void internalPostUpdatePresentationElement()
        Overrides:
        internalPostUpdatePresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
      • createSmartListenerConfig

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

        public void propertyChange​(java.beans.PropertyChangeEvent e)
        Description copied from class: PresentationElement
        Listens for property change it can be: data was edited text box was edited
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • addConnectedPathElement

        public boolean addConnectedPathElement​(PathElement element)
        Description copied from class: PathConnector
        Adds new path element, and recalculates its position.
        Parameters:
        element - element to be added.
        Returns:
        true if element was added
      • 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.