Class ClassView

  • 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:
    ComponentView, NodeView

    @OpenApi
    public class ClassView
    extends ClassifierView
    Class model element symbol representation.
    • Field Detail

      • mPortsCompartmentHelper

        private com.nomagic.magicdraw.uml.symbols.shapes.PortsCompartmentHelper mPortsCompartmentHelper
      • mBehaviorsCompartmentHelper

        private com.nomagic.magicdraw.uml.symbols.shapes.BehaviorsCompartmentHelper mBehaviorsCompartmentHelper
    • Constructor Detail

      • ClassView

        public ClassView()
      • ClassView

        public ClassView​(@CheckForNull
                         PresentationElement parent,
                         boolean canShowStructure)
      • ClassView

        public ClassView​(@CheckForNull
                         PresentationElement parent,
                         com.nomagic.magicdraw.uml.symbols.shapes.ClassHeaderView header)
      • ClassView

        public ClassView​(@CheckForNull
                         PresentationElement parent,
                         com.nomagic.magicdraw.uml.symbols.shapes.ClassHeaderView header,
                         boolean canShowStructure)
    • Method Detail

      • isShowRakeIcon

        public boolean isShowRakeIcon()
        Overrides:
        isShowRakeIcon in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • 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
        Parameters:
        visitor - which visits this element.
        Throws:
        java.lang.Exception
      • 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.
      • askDeleteDataConfirmation

        public boolean askDeleteDataConfirmation()
        Description copied from class: PresentationElement
        Declared as interface with default implementation for subclasses. If some subclasses upon delete may ask about delete data object as well, they have to redefine this method and return true. By default all objects are removed without asking
        Returns:
        confirmation status -- true if asking is necessary, false otherwise
      • canChangeParent

        public boolean canChangeParent​(java.util.Collection<? extends PresentationElement> movedTogether,
                                       @CheckForNull
                                       BaseElement newParent,
                                       boolean changeElementParent)
        Description copied from class: PresentationElement
        Returns true, if element can change parent.
        Parameters:
        movedTogether - collection of the elements, whose will change the parent together with this.
        newParent - new symbol parent
        changeElementParent - change element parent
        Returns:
        true if parent of symbol can be changed
      • isShowElementTypeAsLabel

        public boolean isShowElementTypeAsLabel()
      • getPortsCompartmentHelper

        public com.nomagic.magicdraw.uml.symbols.shapes.PortsCompartmentHelper getPortsCompartmentHelper()
      • getBehaviorsCompartmentHelper

        public com.nomagic.magicdraw.uml.symbols.shapes.BehaviorsCompartmentHelper getBehaviorsCompartmentHelper()
        Gets behaviors compartment helper.
        Returns:
        behaviors compartment helper.
      • isSuppressPorts

        public boolean isSuppressPorts()
      • internalSilentApply

        public void internalSilentApply()
        Description copied from class: PresentationElement
        Silently applies all properties after initialization
      • internalApplyProperties

        public void internalApplyProperties​(PropertyManager man)
        Description copied from class: PresentationElement
        Applies properties from given property manager
        Parameters:
        man - new properties
      • clone

        public ClassView clone()
        Description copied from class: ElementImpl
        Returns a copy of the Element.
        Specified by:
        clone in interface BaseElement
        Returns:
        the cloned object
      • createSmartListenerConfig

        protected void createSmartListenerConfig​(java.util.List<SmartListenerConfig> configurations)
      • sSetShowFullType

        public void sSetShowFullType​(boolean show)
        Description copied from class: ClassifierView
        Sets show full type for members
        Parameters:
        show - show full type
      • sSetUseAdvancedColoring

        public void sSetUseAdvancedColoring​(boolean use)
        Description copied from class: ClassifierView
        Sets use advanced coloring
        Parameters:
        use - use advanced coloring flag
      • setDummyResizeMode

        public boolean setDummyResizeMode​(boolean b)
        In dummy resize mode symbol may not resize according it children or move children on bounds changed and etc. This is more as hack for resize problems during load or diagram layout
        Overrides:
        setDummyResizeMode in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
        Parameters:
        b - value
        Returns:
        true if dummy mode was applied
      • getChildrenInsets

        public com.nomagic.ui.UnmodifiableInsets getChildrenInsets​(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel)
        Overrides:
        getChildrenInsets in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
        Parameters:
        insetsLevel - describes the level of insets
        Returns:
        shape insets for children
      • checkElementParentOnAdd

        public boolean checkElementParentOnAdd​(PresentationElement view)
      • addPresentationElement

        public void addPresentationElement​(PresentationElement element,
                                           int index,
                                           boolean resize)
      • addUseCaseSubject

        private void addUseCaseSubject​(@CheckForNull
                                       UseCase useCase)
      • removeUseCaseSubject

        public void removeUseCaseSubject​(UseCaseView useCaseView)
        If given parent is ClassView the information about subject is removed from given UseCase. If not, does nothing.
        Parameters:
        useCaseView - use case
      • getHeaderInsetReduce

        protected int getHeaderInsetReduce​(int edge,
                                           com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement.OnEdgeBounds bounds)
      • getHeaderInsetReduce

        public static int getHeaderInsetReduce​(int edge,
                                               com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement.OnEdgeBounds bounds,
                                               com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView headerShape)
      • getElement

        public Class 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 ModelElementProvider
        Returns:
        model element of this presentation element.
      • getHeaderView

        public com.nomagic.magicdraw.uml.symbols.shapes.ClassHeaderView getHeaderView()