Class ClassView

java.lang.Object
com.nomagic.magicdraw.uml.MDElementImpl
com.nomagic.magicdraw.uml.symbols.PresentationElement
com.nomagic.magicdraw.uml.symbols.paths.PathConnector
com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement
com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
com.nomagic.magicdraw.uml.symbols.shapes.ClassifierView
com.nomagic.magicdraw.uml.symbols.shapes.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.PropertyBasedPresentationElement, com.nomagic.magicdraw.uml.symbols.shapes.PortOwner, com.nomagic.magicdraw.uml.symbols.shapes.QualifiedNameLabelOwner, StereotypesDisplayModeOwner, com.nomagic.magicdraw.uml.symbols.shapes.TaggedValuesDisplayModeOwner, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider, com.nomagic.magicdraw.uml.symbols.Wrapable, NameOwner, PropertyChangeListener, Cloneable, Comparable, EventListener
Direct Known Subclasses:
ComponentView, NodeView

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

    • ACTIVE_BORDER_DISTANCE

      public static final int ACTIVE_BORDER_DISTANCE
      See Also:
  • Constructor Details

    • ClassView

      public ClassView()
    • ClassView

      public ClassView(@CheckForNull PresentationElement parent)
    • 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 Details

    • isShowRakeIcon

      public boolean isShowRakeIcon()
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      Indicated if an element should show Rake Icon
      Overrides:
      isShowRakeIcon in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      Returns:
      true in case should show, else false
    • accept

      public void accept(Visitor visitor) throws Exception
      Description copied from interface: MDElement
      Method accepts a visitor, and calls method "visit<class name>(this)" of a visitor. See "Visitor" pattern for more details.
      Specified by:
      accept in interface MDElement
      Overrides:
      accept in class ClassifierView
      Parameters:
      visitor - which visits this element.
      Throws:
      Exception
    • isShowElementTypeAsLabel

      public boolean isShowElementTypeAsLabel()
      Overrides:
      isShowElementTypeAsLabel in class PresentationElement
    • 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.
    • internalSilentApply

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

      public void internalApplyProperties(com.dassault_systemes.modeler.magic.diagram.styledelegates.PresentationElementStyleChanger changer)
      Description copied from class: PresentationElement
      Applies properties from given property manager
      Overrides:
      internalApplyProperties in class ClassifierView
      Parameters:
      changer - new properties
    • clone

      public ClassView clone()
      Specified by:
      clone in interface BaseElement
      Overrides:
      clone in class ClassifierView
    • createSmartListenerConfig

      protected void createSmartListenerConfig(List<SmartListenerConfig> configurations)
      Overrides:
      createSmartListenerConfig in class ClassifierView
    • sSetShowFullType

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

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

      public void sSetMembersDisplayMode(String membersDisplayMode)
      Description copied from class: ClassifierView
      Sets members display mode. Does not update classifier symbol.
      Overrides:
      sSetMembersDisplayMode in class ClassifierView
      Parameters:
      membersDisplayMode - display mode
      See Also:
    • 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.BaseHeaderShapeView
      Parameters:
      insetsLevel - describes the level of insets
      Returns:
      shape insets for children
    • checkElementOwnerOnChange

      public boolean checkElementOwnerOnChange(PresentationElement view)
      Overrides:
      checkElementOwnerOnChange in class PresentationElement
    • canAddInstance

      public boolean canAddInstance(PresentationElement symbol)
      Description copied from class: PresentationElement
      Object view has no children.
      Overrides:
      canAddInstance in class ClassifierView
    • addPresentationElement

      public void addPresentationElement(PresentationElement element, int index, boolean resize)
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      If a specified object not inserted in this container then adds a new object view to the container.
      Overrides:
      addPresentationElement in class ClassifierView
      Parameters:
      element - new PresentationElement object
      index - index to add at
      resize - resize parent
    • 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)
      Overrides:
      getHeaderInsetReduce in class ShapeElement
    • 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
      Overrides:
      getElement in class ClassifierView
      Returns:
      model element of this presentation element.
    • getHeaderView

      public com.nomagic.magicdraw.uml.symbols.shapes.ClassHeaderView getHeaderView()
      Overrides:
      getHeaderView in class ClassifierView