Class TextBoxView

  • All Implemented Interfaces:
    BaseElement, MDElement, ModelElementProvider, com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape, com.nomagic.magicdraw.uml.symbols.shapes.PlainTextOrHTMLChangeable, 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
    Direct Known Subclasses:
    DiagramPropertiesShape

    @OpenApi
    public class TextBoxView
    extends com.nomagic.magicdraw.uml.symbols.shapes.TextShapeView
    TextBoxView represents - text box in UML diagrams
    • Field Detail

      • mLabelMode

        private boolean mLabelMode
        Is it some label or standalone TextBoxView
      • mStereotypeLabel

        private boolean mStereotypeLabel
      • mForcedToBeFillable

        private boolean mForcedToBeFillable
        If parent is shape element, than box can't be filled with color If this property is set to true - it becomes fillable
    • Constructor Detail

      • TextBoxView

        public TextBoxView()
      • TextBoxView

        public TextBoxView​(@CheckForNull
                           PresentationElement parent,
                           com.nomagic.magicdraw.uml.symbols.shapes.TextAreaView area)
    • Method Detail

      • isTextBoxLabelMode

        public static boolean isTextBoxLabelMode​(@CheckForNull
                                                 PresentationElement symbol)
        Checks if given symbol is label text box
        Parameters:
        symbol - given symbol
        Returns:
        true if symbol is TextBoxView with label mode
      • 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.TextShapeView
        Parameters:
        visitor - which visits this element.
        Throws:
        java.lang.Exception
      • setForcedToBeFillable

        public void setForcedToBeFillable​(boolean forcedToBeFillable)
      • resizeParent

        public void resizeParent()
        Description copied from class: PresentationElement
        Method that initiates parent resize to accommodate children if some child's bounds are changed.
      • setLabelMode

        public void setLabelMode​(boolean value)
      • isLabelMode

        public boolean isLabelMode()
      • canBeAutosized

        public boolean canBeAutosized()
      • canChangeParent

        public boolean canChangeParent​(java.util.Collection<? extends PresentationElement> movedTogether,
                                       @CheckForNull
                                       BaseElement newParent,
                                       boolean changeElementParent)
        Description copied from class: PresentationElement
        Returns true, if element can change parent.
        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
      • useParentProperties

        public boolean useParentProperties()
        Description copied from class: PresentationElement
        Does this element uses parent properties or has it own?
        Overrides:
        useParentProperties in class PresentationElement
        Returns:
        true, if element does not have properties and uses parent's.
      • getParentSymbolPropertyOwner

        @CheckForNull
        public PresentationElement getParentSymbolPropertyOwner()
        Description copied from class: PresentationElement
        Returns parent symbol property manager to which this symbol delegates symbol property related functionality.
        Returns:
        parent parent symbol to delegate or null if this symbol does not delegate.
      • 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.TextShapeView
        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.TextShapeView
      • internalGetHeaderInsets

        public com.nomagic.ui.UnmodifiableInsets internalGetHeaderInsets()
        Overrides:
        internalGetHeaderInsets in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      • setStereotypeLabel

        public void setStereotypeLabel​(boolean v)
      • isStereotypeLabel

        public boolean isStereotypeLabel()
      • paintSelf

        public void paintSelf​(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
        Overrides:
        paintSelf in class com.nomagic.magicdraw.uml.symbols.shapes.TextShapeView
      • getActualProperty

        public Property getActualProperty​(java.lang.String id)
        Description copied from class: PresentationElement
        Returns actual property. If use parent properties, returns property from parent else returns its own property
      • canDisplayHTMLText

        public boolean canDisplayHTMLText()
        Overrides:
        canDisplayHTMLText in class com.nomagic.magicdraw.uml.symbols.shapes.TextShapeView
      • mustShowContextMenu

        public boolean mustShowContextMenu()
      • canFill

        protected boolean canFill()
        Returns:
        true if symbol can be filled with some color
      • sSetVisibility

        public void sSetVisibility​(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility)
        Description copied from class: PresentationElement
        Sets element visibility flag.
        Parameters:
        visibility - flag value
      • setVisibility

        public void setVisibility​(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility)
        Description copied from class: PresentationElement
        Sets element visibility flag.
        Parameters:
        visibility - flag value
      • checkShowsProxy

        protected boolean checkShowsProxy()
        Overrides:
        checkShowsProxy in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      • providesVerticalCenterline

        public boolean providesVerticalCenterline()
        Specified by:
        providesVerticalCenterline in interface com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
      • providesHorizontalCenterline

        public boolean providesHorizontalCenterline()
        Specified by:
        providesHorizontalCenterline in interface com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
      • snapsToCenterlines

        public boolean snapsToCenterlines()
        Specified by:
        snapsToCenterlines in interface com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
      • draw

        public void draw​(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
        Description copied from class: PresentationElement
        Draw symbol using renderer or symbol specific draw if renderer is not available. Also draw adornments.
        Parameters:
        context - paint context
      • minimumSizeForShrinkingIgnoringOrientation

        public void minimumSizeForShrinkingIgnoringOrientation​(java.awt.Dimension size,
                                                               int locationX,
                                                               int locationY)
        Overrides:
        minimumSizeForShrinkingIgnoringOrientation in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      • needAdjustToMaximumDimension

        protected boolean needAdjustToMaximumDimension()
        Description copied from class: ShapeElement
        Check if shape should be resized to a maximum size.
        Returns:
        true if need adjustments
      • setHeaderOrientationVertical

        public void setHeaderOrientationVertical​(boolean value)
        Overrides:
        setHeaderOrientationVertical in class com.nomagic.magicdraw.uml.symbols.shapes.TextShapeView
      • rotateBoundsForHeaderOrientation

        protected void rotateBoundsForHeaderOrientation​(java.awt.Rectangle bounds)
        Overrides:
        rotateBoundsForHeaderOrientation in class com.nomagic.magicdraw.uml.symbols.shapes.TextShapeView