Class TextBoxView

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.TextShapeView
com.nomagic.magicdraw.uml.symbols.shapes.AbstractTextBoxView
com.nomagic.magicdraw.uml.symbols.shapes.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, PropertyChangeListener, Cloneable, Comparable, EventListener
Direct Known Subclasses:
DiagramPropertiesShape

@OpenApi public class TextBoxView extends com.nomagic.magicdraw.uml.symbols.shapes.AbstractTextBoxView
TextBoxView represents - text box in UML diagrams
  • Constructor Details

    • TextBoxView

      public TextBoxView()
    • TextBoxView

      public TextBoxView(@CheckForNull PresentationElement parent)
    • TextBoxView

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

    • 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
    • getDefaultDimension

      protected UnmodifiableDimension getDefaultDimension()
      Overrides:
      getDefaultDimension in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractTextBoxView
    • 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.AbstractTextBoxView
      Parameters:
      visitor - which visits this element.
      Throws:
      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.
      Overrides:
      resizeParent in class PresentationElement
    • setLabelMode

      public void setLabelMode(boolean value)
    • isLabelMode

      public boolean isLabelMode()
    • canBeAutosized

      public boolean canBeAutosized()
      Overrides:
      canBeAutosized in class ShapeElement
    • 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 PresentationElement
      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
    • useParentStyle

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

      @CheckForNull public PresentationElement getParentSymbolStyleOwner()
      Description copied from class: PresentationElement
      Returns parent to which this symbol delegates style attributes related functionality.
      Overrides:
      getParentSymbolStyleOwner in class PresentationElement
      Returns:
      parent symbol to delegate or null if this symbol does not delegate.
    • getDynamicStyleOwner

      public PresentationElement getDynamicStyleOwner()
      Overrides:
      getDynamicStyleOwner in class PresentationElement
    • 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.TextShapeView
      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.TextShapeView
    • canDisplayHTMLText

      public boolean canDisplayHTMLText()
      Specified by:
      canDisplayHTMLText in interface com.nomagic.magicdraw.uml.symbols.shapes.PlainTextOrHTMLChangeable
      Overrides:
      canDisplayHTMLText in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractTextBoxView
    • mustShowContextMenu

      public boolean mustShowContextMenu()
      Overrides:
      mustShowContextMenu in class PresentationElement
    • canFill

      protected boolean canFill()
      Overrides:
      canFill in class PresentationElement
      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.
      Overrides:
      sSetVisibility in class ShapeElement
      Parameters:
      visibility - flag value
    • setVisibility

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

      protected boolean checkShowsProxy()
      Overrides:
      checkShowsProxy in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
    • 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.
      Overrides:
      draw in class PresentationElement
      Parameters:
      context - paint context
    • needAdjustToMaximumDimension

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

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

      public void rotateBoundsForHeaderOrientation(Rectangle bounds)
      Overrides:
      rotateBoundsForHeaderOrientation in class com.nomagic.magicdraw.uml.symbols.shapes.TextShapeView