Class PinView

  • 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 PinView
    extends com.nomagic.magicdraw.uml.symbols.shapes.TypedElementWithLabels
    • Field Detail

      • MIN_SIZE

        public static final java.awt.Dimension MIN_SIZE
      • TO_LEFT_EDGE_ICON

        public static final ResizableIcon TO_LEFT_EDGE_ICON
      • TO_RIGHT_EDGE_ICON

        public static final ResizableIcon TO_RIGHT_EDGE_ICON
      • TO_TOP_EDGE_ICON

        public static final ResizableIcon TO_TOP_EDGE_ICON
      • TO_BOTTOM_EDGE_ICON

        public static final ResizableIcon TO_BOTTOM_EDGE_ICON
      • VALUE_PIN_ICON

        private static final ResizableIcon VALUE_PIN_ICON
      • DECIDER_PIN_ICON

        private static final ResizableIcon DECIDER_PIN_ICON
    • Constructor Detail

      • PinView

        public PinView()
    • Method Detail

      • createLabels

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

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

        public Pin 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 com.nomagic.magicdraw.uml.symbols.LabelOwner
        Specified by:
        getElement in interface ModelElementProvider
        Overrides:
        getElement in class PresentationElement
        Returns:
        model element of this presentation element.
      • updateNameBox

        public void updateNameBox()
        Overrides:
        updateNameBox in class com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
      • 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.TypedElementWithLabels
        Parameters:
        man - new properties
      • 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.TypedElementWithLabels
      • setShowProperties

        public void setShowProperties​(boolean show)
      • sSetShowProperties

        public void sSetShowProperties​(boolean show)
      • isShowProperties

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

        protected boolean isSnapToGrid()
      • findParentForData

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

        public int getOnEdgeCornerDistance()
        Returns:
        inset from corner
      • getHumanType

        public java.lang.String getHumanType()
        Description copied from class: PresentationElement
        Returns human representation of the data type
        Specified by:
        getHumanType in interface BaseElement
        Returns:
        the name of the data
      • getHumanName

        public java.lang.String getHumanName()
        Description copied from class: PresentationElement
        Returns human representation of the data type
        Specified by:
        getHumanName in interface BaseElement
        Returns:
        the name of the data
      • getObjectFlowByDirection

        @CheckForNull
        private ObjectFlowView getObjectFlowByDirection()
        Looks for connected object flow which is compatible with pin type direction(input or output).
        Returns:
        object flow
      • setOnEdge

        public void setOnEdge​(int onEdge)
        Description copied from class: ShapeElement
        Sets on edge property.
        Parameters:
        onEdge - the edge constant
        See Also:
        ShapeElement.getOnEdge()
      • 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
      • removeConnectedPathElement

        public boolean removeConnectedPathElement​(PathElement element)
        Description copied from class: PathConnector
        Removes path element.
        Parameters:
        element - element to remove.
        Returns:
        true if element was removed
      • updateIcon

        protected void updateIcon()
        Overrides:
        updateIcon in class com.nomagic.magicdraw.uml.symbols.shapes.TypedElementWithLabels
      • isInputPin

        public boolean isInputPin()
      • isOutputPin

        public boolean isOutputPin()
      • isDeciderPin

        public boolean isDeciderPin()
      • isValuePin

        public boolean isValuePin()
      • createSmartListenerConfig

        protected void createSmartListenerConfig​(java.util.List<SmartListenerConfig> configurations)
        Overrides:
        createSmartListenerConfig in class com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
      • 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()
      • isDrawRectangle

        protected boolean isDrawRectangle()
        Overrides:
        isDrawRectangle in class com.nomagic.magicdraw.uml.symbols.shapes.TypedElementWithLabels
      • minimumSizeIgnoringOrientation

        protected void minimumSizeIgnoringOrientation​(java.awt.Dimension min)
        Overrides:
        minimumSizeIgnoringOrientation in class com.nomagic.magicdraw.uml.symbols.shapes.TypedElementWithLabels
      • preferredSizeIgnoringOrientation

        protected void preferredSizeIgnoringOrientation​(java.awt.Dimension pref,
                                                        int locationX,
                                                        int locationY)
        Overrides:
        preferredSizeIgnoringOrientation in class com.nomagic.magicdraw.uml.symbols.shapes.TypedElementWithLabels
      • 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.
      • 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.