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.TypedElementView
com.nomagic.magicdraw.uml.symbols.shapes.PartView
All Implemented Interfaces:
BaseElement, CompartmentElement, 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

@OpenApi public class PartView extends com.nomagic.magicdraw.uml.symbols.shapes.TypedElementView implements CompartmentElement, com.nomagic.magicdraw.uml.symbols.shapes.PortOwner, com.nomagic.magicdraw.uml.symbols.shapes.TaggedValuesDisplayModeOwner
  • Constructor Details

    • PartView

      public PartView()
    • PartView

      public PartView(@CheckForNull PresentationElement parent)
  • Method Details

    • getStructureCompartment

      public com.nomagic.magicdraw.uml.symbols.shapes.StructureCompartmentView getStructureCompartment()
    • getClassifier

      public Classifier getClassifier()
      Specified by:
      getClassifier in class com.nomagic.magicdraw.uml.symbols.shapes.TypedElementView
    • sSetClassifiers

      public void sSetClassifiers(List<Classifier> type)
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.TypedElementView
      Sets one classifier.
      Specified by:
      sSetClassifiers in class com.nomagic.magicdraw.uml.symbols.shapes.TypedElementView
      Parameters:
      type - a collection of classifiers to set as type of this typed element
    • getMetaClassifiersQPropertyName

      public String getMetaClassifiersQPropertyName()
      Specified by:
      getMetaClassifiersQPropertyName in class com.nomagic.magicdraw.uml.symbols.shapes.TypedElementView
    • internalGetHeaderInsets

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

      public Property 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.
    • getProperty

      @Deprecated public Property getProperty()
      Deprecated.
      use #getElement
    • accept

      public void accept(Visitor o) 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.TypedElementView
      Parameters:
      o - which visits this element.
      Throws:
      Exception
    • createSmartListenerConfig

      protected void createSmartListenerConfig(List<SmartListenerConfig> configurations)
      Overrides:
      createSmartListenerConfig in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • 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
    • internalGetPresentationElementStroke

      public BasicStroke internalGetPresentationElementStroke(int width)
      Description copied from class: PresentationElement
      Return a stroke used to paint symbol's main part
      Overrides:
      internalGetPresentationElementStroke in class PresentationElement
      Parameters:
      width - a custom stroke width. Other stroke parameters will be specific to symbol
      Returns:
      a stroke used to paint symbol's main part
    • findOwnerForElement

      @CheckForNull public com.dassault_systemes.modeler.foundation.model.ModelElement findOwnerForElement(PresentationElement newParent, com.dassault_systemes.modeler.foundation.model.ModelElementOwnershipContext ownershipContext)
      Overrides:
      findOwnerForElement in class PresentationElement
    • getModelElementToMove

      @CheckForNull public com.dassault_systemes.modeler.foundation.model.ModelElement getModelElementToMove()
      Description copied from class: PresentationElement
      Returns element that should be used for during "move" operation. In most cases this is the same as getElement(), but some symbols maybe override and return some other related element.
      Overrides:
      getModelElementToMove in class PresentationElement
      Returns:
      element to move
      See Also:
    • getCompartmentElementID

      public String getCompartmentElementID()
      Specified by:
      getCompartmentElementID in interface CompartmentElement
    • getCompartmentText

      public String getCompartmentText()
      Specified by:
      getCompartmentText in interface CompartmentElement
    • 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()
    • isValid

      public boolean isValid(PresentationElement parent, boolean changeElementParent)
      Checks if part is valid by symbol ownership in it's current context.
      Parameters:
      parent - the owner of part
      changeElementParent - check if valid for a move operation
      Returns:
      true if part ownership is valid
    • getElementFromParentSymbol

      @CheckForNull public Element getElementFromParentSymbol()
    • getElementFromParentSymbol

      @CheckForNull public Element getElementFromParentSymbol(PresentationElement parent)
    • isDrawSeparator

      protected boolean isDrawSeparator()
      Overrides:
      isDrawSeparator in class com.nomagic.magicdraw.uml.symbols.shapes.TypedElementView
    • getTaggedValuesDisplayMode

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

      public String getShowSlotTypeMode()
      Gets value of slot showing property. Default is NONE
      Returns:
      mode
      See Also:
      • SlotView.SHOW_TYPE_MODE_NONE
      • SlotView.SHOW_TYPE_MODE_NAME
      • SlotView.SHOW_TYPE_MODE_QUALIFIED_NAME
    • sSetShowSlotTypeMode

      public void sSetShowSlotTypeMode(String mode)
      Sets value of slot showing property. Just changes property, but no update is done
      Parameters:
      mode - mode
      See Also:
      • SlotView.SHOW_TYPE_MODE_NONE
      • SlotView.SHOW_TYPE_MODE_NAME
      • SlotView.SHOW_TYPE_MODE_QUALIFIED_NAME
    • setShowSlotTypeMode

      public void setShowSlotTypeMode(String mode)
      Sets value of slot showing property. Calls view update
      Parameters:
      mode - mode
      See Also:
      • SlotView.SHOW_TYPE_MODE_NONE
      • SlotView.SHOW_TYPE_MODE_NAME
      • SlotView.SHOW_TYPE_MODE_QUALIFIED_NAME
    • isShowInheritedSign

      public boolean isShowInheritedSign()
      Returns:
      true if inherited sign is shown
    • sSetShowInheritedSign

      public void sSetShowInheritedSign(boolean showInheritedSign)
      Show inherited sign
      Parameters:
      showInheritedSign - show
    • setShowInheritedSign

      public void setShowInheritedSign(boolean showInheritedSign)
      Show inherited members sign in compartment
      Parameters:
      showInheritedSign - show
    • isShowMultiplicity

      public boolean isShowMultiplicity()
    • setShowMultiplicity

      public void setShowMultiplicity(boolean showMultiplicity)
    • sSetShowMultiplicity

      public void sSetShowMultiplicity(boolean showMultiplicity)
    • isShowDefaultValueCompartmentName

      public boolean isShowDefaultValueCompartmentName()
      Indicates if default value compartment name should be displayed.
      Returns:
      true if default value compartment name should be displayed, false otherwise.
    • sSetShowDefaultValueCompartmentName

      public void sSetShowDefaultValueCompartmentName(boolean show)
      Simple sets show default value compartment name flag value.
      Parameters:
      show - value to set.
    • setShowDefaultValueCompartmentName

      public void setShowDefaultValueCompartmentName(boolean show)
      Sets show default value compartment name flag value.
      Parameters:
      show - value to set.
    • 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.TypedElementView
      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.TypedElementView
    • isSuppressStructureCompartment

      public boolean isSuppressStructureCompartment()
    • 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)
    • isShowDefaultValue

      public boolean isShowDefaultValue()
      Returns show default value flag. Default value can be shown in separate compartment if it is InstanceValue or after = sign in signature.
      Returns:
      flag value
    • sSetShowDefaultValue

      public void sSetShowDefaultValue(boolean show)
      Set show default value flag. Default value can be shown in separate compartment if it is InstanceValue or after = sign in signature.
      Parameters:
      show - new value
    • setShowDefaultValue

      public void setShowDefaultValue(boolean show)
      Set show default value flag. Default value can be shown in separate compartment if it is InstanceValue or after = sign in signature.
      Parameters:
      show - new value
    • isInOtherPart

      public boolean isInOtherPart()
    • getNestedPath

      @CheckForNull public List<Property> getNestedPath()
    • setNestedPath

      public void setNestedPath(@CheckForNull List<Property> nestedPath)
    • sSetNestedPath

      public void sSetNestedPath(@CheckForNull List<Property> nestedPart, boolean disposeOldListeners)
    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Description copied from class: PresentationElement
      Listens for property change it can be: data was edited text box was edited
      Specified by:
      propertyChange in interface PropertyChangeListener
      Overrides:
      propertyChange in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • clone

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

      public boolean setDummyResizeMode(boolean b)
      Description copied from class: PresentationElement
      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 - new value
    • 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
    • canChangeParent

      public boolean canChangeParent(Collection<? extends PresentationElement> movedTogether, @CheckForNull BaseElement newParent, boolean changeElementParent)
      Description copied from class: PresentationElement
      Returns true, if element can change parent.
      Overrides:
      canChangeParent in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      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
    • findOwnerForChildElement

      @CheckForNull public com.dassault_systemes.modeler.foundation.model.ModelElement findOwnerForChildElement(PresentationElement child)
      Description copied from class: PresentationElement
      Returns element owner for given child.
      Overrides:
      findOwnerForChildElement in class PresentationElement
      Returns:
      most suitable owner for given child's element
    • findPresentationElement

      @CheckForNull public static PresentationElement findPresentationElement(List<PresentationElement> elements, Element element, @CheckForNull List<Property> nestedPath)
      Finds existing symbol among the given ones with a given Element and given nestedPath
      Parameters:
      elements - symbols
      element - element
      nestedPath - nested path of the Part
      Returns:
      found presentation element or null
    • setParent

      public void setParent(PresentationElement parent)
      Description copied from class: PresentationElement
      Overrides:
      setParent in class PathConnector
      Parameters:
      parent - parent view
    • getOnEdgePosition

      public int getOnEdgePosition()
      Description copied from class: ShapeElement
      Returns position on edge.
      Overrides:
      getOnEdgePosition in class ShapeElement
      Returns:
      position on edge.
      See Also:
    • isPartPort

      public boolean isPartPort()
      Returns:
      true if PartView represents Port.
    • isPart

      public static boolean isPart(@CheckForNull PresentationElement obj)
      Parameters:
      obj - symbol
      Returns:
      true if given symbol is pure Part, does not represent Port
    • isPartPort

      public static boolean isPartPort(PresentationElement obj)
      Parameters:
      obj - symbol
      Returns:
      true if given symbol is Part, but it represents Port
    • getHeaderInsetReduce

      protected int getHeaderInsetReduce(int edge, com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement.OnEdgeBounds bounds)
      Overrides:
      getHeaderInsetReduce in class ShapeElement
    • getHeaderView

      public com.nomagic.magicdraw.uml.symbols.shapes.PartHeaderView getHeaderView()
      Overrides:
      getHeaderView in class com.nomagic.magicdraw.uml.symbols.shapes.TypedElementView