Class ClassifierView

  • 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.PortOwner, 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
    Direct Known Subclasses:
    ActorView, ArtifactView, ClassView, DataTypeView, EnumerationView, InformationItemView, InterfaceView, PrimitiveTypeView, SignalView, StereotypeView

    @OpenApi
    public abstract class ClassifierView
    extends com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    implements com.nomagic.magicdraw.uml.symbols.shapes.PortOwner
    • Field Detail

      • TAGGED_VALUES_DISPLAY_MODES

        public static final java.util.List TAGGED_VALUES_DISPLAY_MODES
      • ALL

        public static final java.lang.String ALL
        Members display options - display all members.
        See Also:
        Constant Field Values
      • ONLY_PUBLIC

        public static final java.lang.String ONLY_PUBLIC
        Members display options - display only public members.
        See Also:
        Constant Field Values
      • NOT_PRIVATE

        public static final java.lang.String NOT_PRIVATE
        Members display options - not private members.
        See Also:
        Constant Field Values
      • MEMBERS_DISPLAY_MODES

        public static final java.util.List MEMBERS_DISPLAY_MODES
        List of available members display options.
        See Also:
        ALL, ONLY_PUBLIC, NOT_PRIVATE
      • WITHOUT_ASSOCIATION

        public static final java.lang.String WITHOUT_ASSOCIATION
        Association ends display options - display association end if association symbol is not drawn in the diagram.
        See Also:
        Constant Field Values
      • ASSOCIATION_ENDS_DISPLAY_MODES

        public static final java.util.List ASSOCIATION_ENDS_DISPLAY_MODES
        List of available association ends display in attribute compartment mode.
        See Also:
        ALL, WITHOUT_ASSOCIATION, DO_NOT_DISPLAY
      • DRAW_COMPARATOR

        private static final java.util.Comparator<PresentationElement> DRAW_COMPARATOR
      • COMPARTMENT_INSETS

        private static final com.nomagic.ui.UnmodifiableInsets COMPARTMENT_INSETS
      • paramClassOverlapRectHeight

        private int paramClassOverlapRectHeight
        Parameterized class box and parameters view overlap rectangle height.
      • DIFFERENCE_PERCENT

        static final float DIFFERENCE_PERCENT
        Parametrized class shape width and rectangle width difference length percent
        See Also:
        Constant Field Values
      • MIN_WIDTH_PERCENT

        static final float MIN_WIDTH_PERCENT
        Parametrized class rectangle width percent of whole class shape width
        See Also:
        Constant Field Values
      • attributesCompartmentHelper

        private com.nomagic.magicdraw.uml.symbols.shapes.AttributesCompartmentHelper attributesCompartmentHelper
      • operationsCompartmentHelper

        private com.nomagic.magicdraw.uml.symbols.shapes.OperationsCompartmentHelper operationsCompartmentHelper
      • structureCompartmentHelper

        private com.nomagic.magicdraw.uml.symbols.shapes.StructureCompartmentHelper structureCompartmentHelper
    • Constructor Detail

      • ClassifierView

        public ClassifierView()
      • ClassifierView

        protected ClassifierView​(@CheckForNull
                                 PresentationElement parent,
                                 com.nomagic.magicdraw.uml.symbols.shapes.ClassifierHeaderView header,
                                 boolean canDisplayStructure)
    • Method Detail

      • getTemplateSignatureView

        public com.nomagic.magicdraw.uml.symbols.shapes.TemplateSignatureView getTemplateSignatureView()
        Returns:
        TemplateSignatureView symbol
      • getStructureCompartmentView

        public com.nomagic.magicdraw.uml.symbols.shapes.StructureCompartmentView getStructureCompartmentView()
        Returns:
        StructureCompartment symbol
      • sSetShowFullType

        public void sSetShowFullType​(boolean show)
        Sets show full type for members
        Parameters:
        show - show full type
      • setShowFullType

        public void setShowFullType​(boolean show)
        Sets show full type for members
        Parameters:
        show - show full type
      • isShowFullType

        public boolean isShowFullType()
        Returns show full type
        Returns:
        show full type
      • sSetUseAdvancedColoring

        public void sSetUseAdvancedColoring​(boolean use)
        Sets use advanced coloring
        Parameters:
        use - use advanced coloring flag
      • setUseAdvancedColoring

        public void setUseAdvancedColoring​(boolean use)
        Sets use advanced coloring
        Parameters:
        use - use advanced coloring flag
      • isUseAdvancedColoring

        public boolean isUseAdvancedColoring()
        Returns use advanced coloring flag value
        Returns:
        advanced coloring value
      • clone

        public ClassifierView 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.HeaderShapeView
        Returns:
        the cloned object
      • preferredSizeIgnoringOrientation

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

        public void internalLayoutChildren​(boolean calculatePrefSize)
        Overrides:
        internalLayoutChildren in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • getTemplateSignatureWidth

        private static int getTemplateSignatureWidth​(int classifierWidth,
                                                     int signaturePrefWidth)
      • getTemplateSignatureExtent

        @CheckForNull
        public java.awt.Dimension getTemplateSignatureExtent​(boolean calculatePrefSize)
      • getAdditionalHeaderHeightForPreferredBounds

        protected int getAdditionalHeaderHeightForPreferredBounds​(@CheckForNull
                                                                  java.awt.Rectangle headerBounds)
        Overrides:
        getAdditionalHeaderHeightForPreferredBounds in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      • createStateForUpdateOperation

        protected java.util.List<java.lang.Object> createStateForUpdateOperation()
        Overrides:
        createStateForUpdateOperation in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • internalSpecificUpdate

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

        @CheckForNull
        private Element getTemplateBindingSupplier()
      • 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
      • dispose

        public void dispose()
        Description copied from class: PresentationElement
        disposes ends of links when link is deleted
        Specified by:
        dispose in interface BaseElement
        Overrides:
        dispose in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • updateChildrenVisibility

        public void updateChildrenVisibility()
        Overrides:
        updateChildrenVisibility in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • isSuppressAttributes

        public boolean isSuppressAttributes()
      • isSuppressMethods

        public boolean isSuppressMethods()
      • isSuppressed

        public boolean isSuppressed​(java.lang.Class modelElement)
      • isSuppressStructure

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

        public void initialize()
        Description copied from class: PresentationElement
        Initialize symbol and its children state. Symbol must be initialized before doing any resize, painting and etc. These operations can lead to unpredictable results otherwise.
      • 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
      • canAddChild

        public boolean canAddChild​(PresentationElement obj)
        Description copied from class: PresentationElement
        Check of given symbol can be added as child into this symbol.
        Overrides:
        canAddChild in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
        Parameters:
        obj - symbol
        Returns:
        true if symbol can be added
      • canStereotypeIconGrow

        public boolean canStereotypeIconGrow()
        Returns:
        true if stereotype icon forces shape growing into all directions on resize
      • createBoundsShape

        public ContainerShape createBoundsShape​(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.HeaderShapeView
        Parameters:
        path - path
        transformation - transformation
        Returns:
        shape
      • addPresentationElement

        public void addPresentationElement​(PresentationElement element,
                                           int index,
                                           boolean resize)
        Overrides:
        addPresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • 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
      • removePresentationElement

        public void removePresentationElement​(PresentationElement element,
                                              boolean resizeParent)
        Overrides:
        removePresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • 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
      • 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.HeaderShapeView
        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.HeaderShapeView
      • sSetTaggedValuesDisplayMode

        public void sSetTaggedValuesDisplayMode​(java.lang.String mode)
      • setTaggedValuesDisplayMode

        public void setTaggedValuesDisplayMode​(java.lang.String mode)
      • isShowTaggedValuesStereotypes

        public boolean isShowTaggedValuesStereotypes()
      • sSetShowTaggedValuesStereotypes

        public void sSetShowTaggedValuesStereotypes​(boolean show)
      • setShowTaggedValuesStereotypes

        public void setShowTaggedValuesStereotypes​(boolean show)
      • isShowQualifiedNameInTaggedValues

        public boolean isShowQualifiedNameInTaggedValues()
      • sSetShowQualifiedNameInTaggedValues

        public void sSetShowQualifiedNameInTaggedValues​(boolean show)
      • setShowQualifiedNameInTaggedValues

        public void setShowQualifiedNameInTaggedValues​(boolean show)
      • setCutMemberNames

        public void setCutMemberNames​(boolean cut)
      • sSetCutMemberNames

        public void sSetCutMemberNames​(boolean cut)
      • isCutMemberNames

        public boolean isCutMemberNames()
      • getTaggedValuesDisplayMode

        public java.lang.String getTaggedValuesDisplayMode()
      • sSetShowUML_2_0_Notation

        public void sSetShowUML_2_0_Notation​(boolean b)
      • isShowUML_2_0_Notation

        public boolean isShowUML_2_0_Notation()
      • 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
      • reshapeToPreferred

        protected void reshapeToPreferred()
      • removeConnectedPathElement

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

        public void setShowUML_2_0_Notation​(boolean show)
      • isTemplateSignatureVisible

        public boolean isTemplateSignatureVisible()
      • getAttributesCompartmentHelper

        public com.nomagic.magicdraw.uml.symbols.shapes.AttributesCompartmentHelper getAttributesCompartmentHelper()
      • getOperationsCompartmentHelper

        public com.nomagic.magicdraw.uml.symbols.shapes.OperationsCompartmentHelper getOperationsCompartmentHelper()
      • getCompartmentHelper

        public com.nomagic.magicdraw.uml.symbols.shapes.CompartmentHelper getCompartmentHelper​(java.lang.Class modelElement)
      • getStructureCompartmentHelper

        public com.nomagic.magicdraw.uml.symbols.shapes.StructureCompartmentHelper getStructureCompartmentHelper()
      • 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()
      • internalGetElementsForLinkConnecting

        public java.util.Collection<? extends Element> internalGetElementsForLinkConnecting()
        Description copied from class: PresentationElement
        Returns all possible element that can be used for some link connecting. One of these elements are return in method getElementToConnectLink() in specific situation. Usually this method should be overridden together with getElementsForLinkConnecting().
        Returns:
        all possible elements
        See Also:
        PresentationElement.getElementToConnectLink(Element, boolean)
      • createSmartListenerConfig

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

        protected com.nomagic.ui.UnmodifiableInsets internalGetHeaderInsets()
        Overrides:
        internalGetHeaderInsets in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • getAdditionalCompartmentInsets

        protected com.nomagic.ui.UnmodifiableInsets getAdditionalCompartmentInsets​(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel level)
        Overrides:
        getAdditionalCompartmentInsets in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • getProxyPresentationElementsStream

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

        protected UnmodifiableDimension internalGetSelfManipulationPreferredSize()
        Overrides:
        internalGetSelfManipulationPreferredSize in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • getEncapsulatedClassifier

        public EncapsulatedClassifier getEncapsulatedClassifier()
        Specified by:
        getEncapsulatedClassifier in interface com.nomagic.magicdraw.uml.symbols.shapes.PortOwner
      • getEncapsulatedClassifierProvider

        public TypedElement getEncapsulatedClassifierProvider()
        Specified by:
        getEncapsulatedClassifierProvider in interface com.nomagic.magicdraw.uml.symbols.shapes.PortOwner
      • getBoxBounds

        public java.awt.Rectangle getBoxBounds()
      • selfSpecificHeaderShapeDraw

        protected void selfSpecificHeaderShapeDraw​(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
        Overrides:
        selfSpecificHeaderShapeDraw in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • drawShadow

        protected void drawShadow​(java.awt.Graphics g)
      • sSetMembersDisplayMode

        public void sSetMembersDisplayMode​(java.lang.String membersDisplayMode)
        Sets members display mode. Does not update classifier symbol.
        Parameters:
        membersDisplayMode - display mode
        See Also:
        setMembersDisplayMode(String), ALL, NOT_PRIVATE, ONLY_PUBLIC
      • isShowInherited

        public boolean isShowInherited()
        Returns:
        true if inherited members are shown in compartments
      • sSetShowInherited

        public void sSetShowInherited​(boolean showInherited)
        Show inherited members in compartments
        Parameters:
        showInherited - show
      • setShowInherited

        public void setShowInherited​(boolean showInherited)
        Show inherited members in compartments
        Parameters:
        showInherited - show
      • isChildLayoutable

        public boolean isChildLayoutable​(PresentationElement child)
        Description copied from class: ShapeElement
        Check if given child is "layoutable" - it means this shape controls bounds of child inside layoutChildren() method. Not "layoutable" children are just moved together with parent, but layoutChildren() does not control their location.
        Overrides:
        isChildLayoutable in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
        Parameters:
        child - child
        Returns:
        true if given child is layed out inside autosize method of this shape. False here
      • createChangedCompartmentVisibilityProperty

        public Property createChangedCompartmentVisibilityProperty​(com.nomagic.magicdraw.uml.symbols.shapes.Compartment compartment,
                                                                   boolean showCompartment)
        Specified by:
        createChangedCompartmentVisibilityProperty in interface com.nomagic.magicdraw.uml.symbols.CompartmentOwner
        Overrides:
        createChangedCompartmentVisibilityProperty in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • getBaseMembersCompartmentViewStream

        protected java.util.stream.Stream<com.nomagic.magicdraw.uml.symbols.shapes.BaseMembersCompartmentView> getBaseMembersCompartmentViewStream()
      • getHeaderView

        public com.nomagic.magicdraw.uml.symbols.shapes.ClassifierHeaderView getHeaderView()
        Overrides:
        getHeaderView in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • getClassifierHeaderView

        @Deprecated
        public com.nomagic.magicdraw.uml.symbols.shapes.ClassifierHeaderView getClassifierHeaderView()
        Deprecated.