Class GeneralizationView

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

    @OpenApi
    public class GeneralizationView
    extends com.nomagic.magicdraw.uml.symbols.paths.LinkWithStereotype
    implements com.nomagic.magicdraw.uml.symbols.paths.TreeViewConnector
    • Field Detail

      • mSimple

        private boolean mSimple
        Flag indicates that generalization is connected to generalization tree.
      • mTree

        private TreeView mTree
        Tree of this view
    • Constructor Detail

      • GeneralizationView

        public GeneralizationView()
    • Method Detail

      • createLabels

        protected void createLabels()
        Overrides:
        createLabels in class com.nomagic.magicdraw.uml.symbols.paths.LinkWithStereotype
      • getActualClientDrawPoint

        public java.awt.Point getActualClientDrawPoint()
        Description copied from class: PathElement
        Returns actual client side draw point.
        Returns:
        actual client draw point.
      • getActualSupplierDrawPoint

        public java.awt.Point getActualSupplierDrawPoint()
        Description copied from class: PathElement
        Returns actual supplier side draw point.
        Returns:
        actual supplier draw point.
      • drawAnchor

        public java.awt.Point drawAnchor​(java.awt.Graphics2D g,
                                         int x1,
                                         int y1,
                                         int x2,
                                         int y2,
                                         int size,
                                         boolean fill,
                                         java.awt.Color fillColor)
        Specified by:
        drawAnchor in interface com.nomagic.magicdraw.uml.symbols.paths.TreeViewConnector
      • setTreeView

        public void setTreeView​(TreeView tree)
        Specified by:
        setTreeView in interface com.nomagic.magicdraw.uml.symbols.paths.TreeViewConnector
      • sSetTreeView

        public void sSetTreeView​(TreeView tree)
        Specified by:
        sSetTreeView in interface com.nomagic.magicdraw.uml.symbols.paths.TreeViewConnector
      • retrieveDataFromTreeView

        public void retrieveDataFromTreeView​(TreeView tree)
        Specified by:
        retrieveDataFromTreeView in interface com.nomagic.magicdraw.uml.symbols.paths.TreeViewConnector
      • getElement

        public Generalization 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.
      • getGeneralization

        @CheckForNull
        public Generalization getGeneralization()
      • getTreeView

        @CheckForNull
        public TreeView getTreeView()
        Specified by:
        getTreeView in interface com.nomagic.magicdraw.uml.symbols.paths.TreeViewConnector
      • getInternalStroke

        public java.awt.BasicStroke getInternalStroke​(boolean line,
                                                      int width)
        Specified by:
        getInternalStroke in interface com.nomagic.magicdraw.uml.symbols.paths.TreeViewConnector
      • 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.paths.LinkWithStereotype
        Parameters:
        visitor - which visits this element.
        Throws:
        java.lang.Exception
      • sSetSimple

        public void sSetSimple​(boolean simple)
        Specified by:
        sSetSimple in interface com.nomagic.magicdraw.uml.symbols.paths.TreeViewConnector
      • setSimple

        public void setSimple​(boolean simple)
        Specified by:
        setSimple in interface com.nomagic.magicdraw.uml.symbols.paths.TreeViewConnector
      • isSimple

        public boolean isSimple()
        Specified by:
        isSimple in interface com.nomagic.magicdraw.uml.symbols.paths.TreeViewConnector
      • findOtherExistingElement

        public Element findOtherExistingElement()
        Description copied from class: PathElement
        Finds and returns model element which meaning is the same as this link model element. This method should be used for Generalization and (maybe)other links. Default behavior is to return model element of this link. This method should be overridden in generalization and (maybe) other links. Make sure that ends are set before calling this method.
        Returns:
        element
      • canHavePaths

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

        public Element internalGetElementToConnectLink​(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()
      • getGeneralizationSetLabelBox

        @CheckForNull
        public GeneralizationSetView getGeneralizationSetLabelBox()
      • getGeneralizationSetLabelWrapper

        public com.nomagic.magicdraw.uml.symbols.shapes.GeneralizationSetLabelWrapper getGeneralizationSetLabelWrapper()
      • createSmartListenerConfig

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

        public boolean isShowGeneralizationSet()
      • sSetShowGeneralizationSet

        public void sSetShowGeneralizationSet​(boolean show)
      • setShowGeneralizationSet

        public void setShowGeneralizationSet​(boolean show)