Class ClassifierView

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
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:
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, com.nomagic.magicdraw.uml.symbols.shapes.TaggedValuesDisplayModeOwner
  • Field Details

    • ALL

      public static final String ALL
      Members display options - display all members.
      See Also:
    • ONLY_PUBLIC

      public static final String ONLY_PUBLIC
      Members display options - display only public members.
      See Also:
    • NOT_PRIVATE

      public static final String NOT_PRIVATE
      Members display options - not private members.
      See Also:
    • MEMBERS_DISPLAY_MODES

      public static final List MEMBERS_DISPLAY_MODES
      List of available members display options.
      See Also:
    • WITHOUT_ASSOCIATION

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

      public static final List ASSOCIATION_ENDS_DISPLAY_MODES
      List of available association ends display in attribute compartment mode.
      See Also:
    • DEFAULT_SIZE

      public static final UnmodifiableDimension DEFAULT_SIZE
  • Constructor Details

    • ClassifierView

      public ClassifierView()
    • ClassifierView

      public ClassifierView(@CheckForNull PresentationElement parent)
    • ClassifierView

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

    • getDefaultDimension

      public UnmodifiableDimension getDefaultDimension()
      Overrides:
      getDefaultDimension in class ShapeElement
    • 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()
      Specified by:
      clone in interface BaseElement
      Overrides:
      clone in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • preferredSizeIgnoringOrientation

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

      public void internalLayoutChildren(boolean calculatePrefSize)
      Overrides:
      internalLayoutChildren in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • getTemplateSignatureExtent

      @CheckForNull public Dimension getTemplateSignatureExtent(boolean calculatePrefSize)
    • getAdditionalHeaderHeightForPreferredBounds

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

      protected List<Object> createStateForUpdateOperation()
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      Create collection of any properties used to distinguish during shape update if movePathElements should be called
      Overrides:
      createStateForUpdateOperation in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Returns:
      state
    • internalSpecificUpdate

      protected void internalSpecificUpdate()
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      Specific to every shape and model element update operation. Must be overridden in subclasses if you need to do specific tasks. !!! Important - all resizing, paths moving and so on is done in updatePresentationElement and should not be done in specific update.
      Overrides:
      internalSpecificUpdate in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      See Also:
      • AbstractHeaderShapeView.internalUpdatePresentationElement()
    • 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.BaseHeaderShapeView
    • isSuppressAttributes

      public boolean isSuppressAttributes()
    • isSuppressMethods

      public boolean isSuppressMethods()
    • isSuppressed

      public boolean isSuppressed(Class modelElement)
    • isSuppressStructure

      public boolean isSuppressStructure()
    • 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 com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      Parameters:
      visitor - which visits this element.
      Throws:
      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.
      Overrides:
      initialize in class ShapeElement
    • canAddInstance

      public boolean canAddInstance(PresentationElement symbol)
      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 symbol)
      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.BaseHeaderShapeView
      Parameters:
      symbol - 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.BaseHeaderShapeView
      Parameters:
      path - path
      transformation - transformation
      Returns:
      shape
    • 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 com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Parameters:
      element - new PresentationElement object
      index - index to add at
      resize - resize parent
    • 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)
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      Removes object view from container.
      Overrides:
      removePresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Parameters:
      element - object to remove
      resizeParent - resize parent
    • 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(com.dassault_systemes.modeler.magic.diagram.styledelegates.PresentationElementStyleChanger changer)
      Description copied from class: PresentationElement
      Applies properties from given property manager
      Overrides:
      internalApplyProperties in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      Parameters:
      changer - 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(String mode)
      Specified by:
      sSetTaggedValuesDisplayMode in interface com.nomagic.magicdraw.uml.symbols.shapes.TaggedValuesDisplayModeOwner
    • setTaggedValuesDisplayMode

      public void setTaggedValuesDisplayMode(String mode)
      Specified by:
      setTaggedValuesDisplayMode in interface com.nomagic.magicdraw.uml.symbols.shapes.TaggedValuesDisplayModeOwner
    • 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 String getTaggedValuesDisplayMode()
      Specified by:
      getTaggedValuesDisplayMode in interface com.nomagic.magicdraw.uml.symbols.shapes.TaggedValuesDisplayModeOwner
    • getDrawComparator

      public Comparator<PresentationElement> getDrawComparator()
      Overrides:
      getDrawComparator in class PresentationElement
    • 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 a new path element, and recalculates its position.
      Overrides:
      addConnectedPathElement in class PathConnector
      Parameters:
      element - element to be added.
      Returns:
      true if an element was added
    • reshapeToPreferred

      protected void reshapeToPreferred()
    • removeConnectedPathElement

      public boolean removeConnectedPathElement(PathElement link)
      Description copied from class: PathConnector
      Removes path element.
      Overrides:
      removeConnectedPathElement in class PathConnector
      Parameters:
      link - element to remove.
      Returns:
      true if an 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(Class modelElement)
    • getStructureCompartmentHelper

      public com.nomagic.magicdraw.uml.symbols.shapes.StructureCompartmentHelper getStructureCompartmentHelper()
    • internalGetModelElementToConnectRelationship

      @CheckForNull public com.dassault_systemes.modeler.foundation.model.ModelElement internalGetModelElementToConnectRelationship(@CheckForNull com.dassault_systemes.modeler.foundation.model.ModelElement relationship, boolean asClient)
      Description copied from class: PresentationElement
      Returns element that should be used for given relationship connecting. All possible elements are returned by method PresentationElement.getModelElementsForRelationshipConnecting().
      Overrides:
      internalGetModelElementToConnectRelationship in class PresentationElement
      Returns:
      all possible elements
      See Also:
    • internalIsSuitableToConnectRelationship

      public boolean internalIsSuitableToConnectRelationship(com.dassault_systemes.modeler.foundation.model.RelationshipEnd<?> end)
      Overrides:
      internalIsSuitableToConnectRelationship in class PresentationElement
      Returns:
      true if given possible elements (end of relationship) is suitable to connect given relationship to this symbol
    • internalGetModelElementsForRelationshipConnecting

      public Collection<? extends com.dassault_systemes.modeler.foundation.model.ModelElement> internalGetModelElementsForRelationshipConnecting()
      Description copied from class: PresentationElement
      Returns all possible element that can be used for some relationship connecting.
      Overrides:
      internalGetModelElementsForRelationshipConnecting in class PresentationElement
      Returns:
      all possible elements
    • createSmartListenerConfig

      protected void createSmartListenerConfig(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.BaseHeaderShapeView
    • 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.BaseHeaderShapeView
    • getProxyPresentationElementsStream

      protected 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.BaseHeaderShapeView
      Returns:
      size for manipulation which does not take into account the size of children on some specific conditions (for example, in case if wrapped text)
    • 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 Rectangle getBoxBounds()
    • selfSpecificHeaderShapeDraw

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

      protected void drawShadow(Graphics g)
    • getMembersDisplayMode

      public String getMembersDisplayMode()
      Gets members display mode.
      Returns:
      mode
      See Also:
    • sSetMembersDisplayMode

      public void sSetMembersDisplayMode(String membersDisplayMode)
      Sets members display mode. Does not update classifier symbol.
      Parameters:
      membersDisplayMode - display mode
      See Also:
    • setMembersDisplayMode

      public void setMembersDisplayMode(String membersDisplayMode)
      Sets members display mode.
      Parameters:
      membersDisplayMode - display mode
      See Also:
    • 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 the bounds of child inside layoutChildren() method. Not "layoutable" children are just moved together with parents, but layoutChildren() do not control their location.
      Overrides:
      isChildLayoutable in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Parameters:
      child - child
      Returns:
      true, if given child is layed-out inside autosize method of this shape. False here
    • getElement

      public Classifier 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 PresentationElement
      Returns:
      model element of this presentation element.
    • getBaseMembersCompartmentViewStream

      protected 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.