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

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

      • INNER_ELEMENTS_SORT_MODES

        public static final java.util.List INNER_ELEMENTS_SORT_MODES
      • HEADER_POSITION

        public static final java.util.List HEADER_POSITION
      • TAB_WIDTH_PERCENT

        private static final float TAB_WIDTH_PERCENT
        Tab width percent of whole package view width
        See Also:
        Constant Field Values
      • TAB_HEIGHT

        private static final int TAB_HEIGHT
        Package view tab height constant
        See Also:
        Constant Field Values
      • MINIMUM_PACKAGE_AND_TAB_DIF

        private static final int MINIMUM_PACKAGE_AND_TAB_DIF
        package width and tab width minimum difference
        See Also:
        Constant Field Values
      • NUMBER_OF_POINTS

        private static final int NUMBER_OF_POINTS
        Represents the number - how many points make the note view figure
        See Also:
        Constant Field Values
    • Constructor Detail

      • PackageView

        public PackageView()
      • PackageView

        public PackageView​(@CheckForNull
                           PresentationElement parent,
                           com.nomagic.magicdraw.uml.symbols.shapes.HeaderView header)
    • Method Detail

      • isShowRakeIcon

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

        protected void selfSpecificHeaderShapeDraw​(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
        Overrides:
        selfSpecificHeaderShapeDraw in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • preferredSizeIgnoringOrientation

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

        public void internalLayoutChildren​(boolean calculatePrefSize)
        Overrides:
        internalLayoutChildren in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • getHeaderMaxYForShrinkableShape

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

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

        protected java.awt.Rectangle getChildrenBoundsForPreferredBounds()
        Overrides:
        getChildrenBoundsForPreferredBounds 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
        Overrides:
        accept in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
        Parameters:
        visitor - which visits this element.
        Throws:
        java.lang.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 obj)
        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​(java.lang.String position)
        Sets header position. Sets only header's position
        Parameters:
        position - header's position constant.
      • setHeaderPosition

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

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

        public int getMiddlePointY()
      • 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.HeaderShapeView
        Parameters:
        path - path
        transformation - transformation
        Returns:
        shape
      • isUseCaseModel

        private boolean isUseCaseModel()
        Returns:
        true, if element represents use case model
      • mustHeaderBeInTab

        protected boolean mustHeaderBeInTab()
      • getPackageHeaderView

        public com.nomagic.magicdraw.uml.symbols.shapes.PackageHeaderView getPackageHeaderView()
        Gets package header.
        Returns:
        package header.
      • internalSpecificUpdate

        protected void internalSpecificUpdate()
        Overrides:
        internalSpecificUpdate in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • constructURIText

        private java.lang.String constructURIText()
        Constructs package URI text.
        Returns:
        package URI text.
      • sSetShowElementsList

        public void sSetShowElementsList​(boolean show)
        Sets show inner elements list.
        Parameters:
        show - - show list.
      • setShowElementsList

        public void setShowElementsList​(boolean show)
        Sets show inner elements list.
        Parameters:
        show - - show list.
      • 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​(PropertyManager man)
        Description copied from class: PresentationElement
        Applies properties from given property manager
        Overrides:
        internalApplyProperties in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
        Parameters:
        man - 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​(java.util.List<SmartListenerConfig> configurations)
        Overrides:
        createSmartListenerConfig in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      • getDynamicConfigurations

        protected java.util.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.
        Returns:
        a list of dynamic smart listener configurations.
      • internalGetElementToConnectLink

        public Element internalGetElementToConnectLink​(@CheckForNull
                                                       Element path,
                                                       boolean asClient)
        Description copied from class: PresentationElement
        Returns element that should be used for given link connecting. All possible elements are return by method getElementsForLinkConnecting. Usually this method should be overridden together with getElementsForLinkConnecting().
        Returns:
        all possible elements
        See Also:
        PresentationElement.getElementsForLinkConnecting()
      • internalGetElementsForLinkConnecting

        public java.util.Collection<? extends Element> internalGetElementsForLinkConnecting()
        Description copied from class: PresentationElement
        Returns all possible element that can be used for some link connecting. One of these elements are return in method getElementToConnectLink() in specific situation. Usually this method should be overridden together with getElementsForLinkConnecting().
        Returns:
        all possible elements
        See Also:
        PresentationElement.getElementToConnectLink(Element, boolean)
      • 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
      • isContentHidden

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