Class PackageView

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.PackageView
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.QualifiedNameLabelOwner, StereotypesDisplayModeOwner, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider, com.nomagic.magicdraw.uml.symbols.Wrapable, NameOwner, PropertyChangeListener, Cloneable, Comparable, EventListener

@OpenApi public class PackageView extends com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
  • Field Details

  • Constructor Details

    • PackageView

      public PackageView()
    • PackageView

      public PackageView(@CheckForNull PresentationElement parent)
    • PackageView

      public PackageView(@CheckForNull PresentationElement parent, com.nomagic.magicdraw.uml.symbols.shapes.HeaderView header)
  • 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
    • getInnerElementsCompartment

      public com.nomagic.magicdraw.uml.symbols.shapes.InnerElementsCompartmentView getInnerElementsCompartment()
    • getAdditionalCompartmentToLayout

      @CheckForNull protected ShapeElement getAdditionalCompartmentToLayout()
      Overrides:
      getAdditionalCompartmentToLayout in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • getDefaultDimension

      protected UnmodifiableDimension getDefaultDimension()
      Overrides:
      getDefaultDimension in class ShapeElement
    • selfSpecificHeaderShapeDraw

      protected void selfSpecificHeaderShapeDraw(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
      Overrides:
      selfSpecificHeaderShapeDraw 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
    • getHeaderMaxYForShrinkableShape

      @CheckForNull protected Integer getHeaderMaxYForShrinkableShape()
      Overrides:
      getHeaderMaxYForShrinkableShape in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • getAdditionalHeaderHeightForPreferredBounds

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

      protected Rectangle getChildrenBoundsForPreferredBounds()
      Overrides:
      getChildrenBoundsForPreferredBounds in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • 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
    • getHeaderView

      public com.nomagic.magicdraw.uml.symbols.shapes.PackageHeaderView getHeaderView()
      Overrides:
      getHeaderView in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • 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
    • sSetHeaderPosition

      public void sSetHeaderPosition(String position)
      Sets header position. Sets only header's position
      Parameters:
      position - header's position constant.
    • setHeaderPosition

      public void setHeaderPosition(String position)
      Sets header position.
      Parameters:
      position - position
    • getHeaderPosition

      public String getHeaderPosition()
      Gets header's position.
      Returns:
      constant representing header's position
    • getMiddlePointY

      public int getMiddlePointY()
      Overrides:
      getMiddlePointY in class ShapeElement
    • 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
    • getTabSize

      public UnmodifiableDimension getTabSize()
    • getPackageHeaderView

      public com.nomagic.magicdraw.uml.symbols.shapes.PackageHeaderView getPackageHeaderView()
      Gets package header.
      Returns:
      package header.
    • 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()
    • isShowElementsList

      public boolean isShowElementsList()
      Returns show elements list.
      Returns:
      show elements list.
    • sSetInnerElementsSortMode

      public void sSetInnerElementsSortMode(com.nomagic.magicdraw.uml.symbols.shapes.PackageView.InnerElementsSortMode mode)
    • setInnerElementsSortMode

      public void setInnerElementsSortMode(com.nomagic.magicdraw.uml.symbols.shapes.PackageView.InnerElementsSortMode mode)
    • getInnerElementsSortMode

      public com.nomagic.magicdraw.uml.symbols.shapes.PackageView.InnerElementsSortMode getInnerElementsSortMode()
    • sSetShowUri

      public void sSetShowUri(boolean show)
      Sets show uri label
      Parameters:
      show - show uri
    • setShowUri

      public void setShowUri(boolean show)
      Sets show uri label
      Parameters:
      show - show uri
    • isShowUri

      public boolean isShowUri()
      Returns:
      show uri flag
    • 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
    • createSmartListenerConfig

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

      protected List<SmartListenerConfig> getDynamicConfigurations()
      Description copied from class: PresentationElement
      Gets non-cacheable smart listener configurations. Default symbol smart listeners are cacheable and reused in all instances of a symbol. Dynamic parts of symbols (e.g. added via renderers and decorators) should use dynamic configurations.
      Overrides:
      getDynamicConfigurations in class PresentationElement
      Returns:
      a list of dynamic smart listener configurations.
    • 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:
    • 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
    • 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
    • isContentHidden

      public boolean isContentHidden()
      Overrides:
      isContentHidden in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
    • getElement

      public Package 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.