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
-
Field Summary
Fields inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
CONTAINER_SHAPE_INSETS, SHAPE_DISTANCE_FROM_EDGE
Fields inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement
BORDER_ELEMENT_MARGIN_ALL, BORDER_ELEMENT_MARGIN_BOTTOM, BORDER_ELEMENT_MARGIN_LEFT, BORDER_ELEMENT_MARGIN_LEFT_RIGHT, BORDER_ELEMENT_MARGIN_MODES, BORDER_ELEMENT_MARGIN_NONE, BORDER_ELEMENT_MARGIN_RIGHT, BORDER_ELEMENT_MARGIN_TOP, BORDER_ELEMENT_MARGIN_TOP_BOTTOM, BOTTOM_EDGE, INSIDE_EDGE_POSITION, LEFT_EDGE, NEED_AUTOSIZE_FULL, NEED_AUTOSIZE_LAYOUT, NEED_AUTOSIZE_NONE, NO_EDGE, NULL_INSETS, ON_EDGE_POSITION, OUTSIDE_EDGE_POSITION, RIGHT_EDGE, SPACE, SPACE_INSETS, SPACE_INSETS_EMPTY_TOP_BOTTOM, TOP_EDGE
Fields inherited from class com.nomagic.magicdraw.uml.symbols.paths.PathConnector
showsProxy
Fields inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
DASHED_STROKE, DEFAULT_LINE_WIDTH, DOTTED_STROKE, HANDLE_SIZE, MAX_LINE_WIDTH, MIN_LINE_WIDTH, peStyle, SHADOW_WIDTH, SOLID_STROKE
-
Constructor Summary
ConstructorsConstructorDescriptionTextBoxView
(PresentationElement parent) TextBoxView
(PresentationElement parent, com.nomagic.magicdraw.uml.symbols.shapes.TextAreaView area) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Method accepts a visitor, and calls method "visit<class name>(this)" of a visitor.boolean
boolean
canChangeParent
(Collection<? extends PresentationElement> movedTogether, BaseElement newParent, boolean changeElementParent) Returns true, if element can change parent.boolean
protected boolean
canFill()
protected boolean
void
draw
(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context) Draw symbol using renderer or symbol specific draw if renderer is not available.protected UnmodifiableDimension
Returns parent to which this symbol delegates style attributes related functionality.void
internalApplyProperties
(com.dassault_systemes.modeler.magic.diagram.styledelegates.PresentationElementStyleChanger changer) Applies properties from given property managervoid
Silently applies all properties after initializationboolean
static boolean
Checks if given symbol is label text boxboolean
protected boolean
Check if shape should be resized to a maximum size.void
Method that initiates parent resize to accommodate children if some child's bounds are changed.void
void
setForcedToBeFillable
(boolean forcedToBeFillable) void
setHeaderOrientationVertical
(boolean value) void
setLabelMode
(boolean value) void
setVisibility
(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility) Sets element visibility flag.void
sSetVisibility
(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility) Sets element visibility flag.boolean
Does this element uses parent style or has it's own?Methods inherited from class com.nomagic.magicdraw.uml.symbols.shapes.AbstractTextBoxView
internalGetHeaderInsets, minimumSizeForShrinkingIgnoringOrientation, paintSelf, providesHorizontalCenterline, providesVerticalCenterline, snapsToCenterlines
Methods inherited from class com.nomagic.magicdraw.uml.symbols.shapes.TextShapeView
clone, createTextArea, editName, getHumanName, getName, getNameLabel, getTextObject, getUserText, hasText, internalGetSelfManipulationPreferredSize, isHeaderOrientationVertical, isHTMLText, isWrapEnabled, setAutosize, setHTMLText, setName, setTextObject, setWrapEnabled, sSetAutosize, sSetHeaderOrientationVertical, sSetHTMLText, sSetName, sSetTextObject, sSetWrapEnabled
Methods inherited from class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
addExtraChildrenPrefSizePadding, adjustBoundsBeforeChange, autosize, autosizeAndResizeParent, calculateMinY, calculateOvalShapePreferredSize, canAddInstance, correctChildrenVector, coversPoint, createBoundsShape, createStateForUpdateOperation, doInternalLayoutChildren, getAdditionalHeaderHeightForPreferredBounds, getChildrenBoundsForPreferredBounds, getHeaderBoundsForPreferredBounds, getHeaderDistanceFromTopForOvalShape, getHeaderInsets, getHeaderMaxYForShrinkableShape, getHeaderObject, getHeaderVerticalPosition, getHeaderVerticalPositionForLayout, getOvalShapeAvailableWidth, getPreferredBounds, getPresentationElementAt, getProxyPresentationElementsStream, getStereotypesToDisplay, internalGetHeaderBoundsForPreferredBounds, internalLayoutChildren, internalPostSpecificUpdate, internalPostUpdatePresentationElement, internalPreSpecificUpdate, internalSpecificUpdate, internalUpdatePresentationElement, invalidate, isBorderVisible, isChildLayoutable, isContentHidden, isOvalShape, isParentShowsProxy, minimumDimension, minimumDimensionForShrinking, minimumSizeIgnoringOrientation, paintChildren, preferredDimension, preferredSizeIgnoringOrientation, setHeaderObject, setHeaderVerticalPosition, setTextEditable, sSetHeaderVerticalPosition, switchWidthHeightIfVerticalOrientation
Methods inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
addPresentationElement, addPresentationElement, addPresentationElementWithoutResize, adjustChildBoundsForMoving, autosizeByChildren, calculateAutosizeDimension, calculateAutosizeDimension, canAddChild, canMoveChildOutside, childrenBoundsForReshape, clearShowsProxy, constructLayoutHelper, getChildrenBounds, getChildrenInsets, getChildrenOnBorderBounds, getContainerBounds, getDefaultChildrenInsets, getLayoutHelper, getLayoutHelperClone, getManipulatedElementAt, getManipulationPreferredDimension, getPresentationElementIndex, getPresentationElements, getRemovableChildren, hasManipulatedChildrenIncludingIndirect, hasManipulatedShapesNotOnEdge, hasManipulatedShapesOnEdge, hasManipulatedShapesOnEdge, internalAddIndirectManipulatedChildrenRect, internalAppendChildRect, internalGetChildAt, internalGetIndirectManipulatedChildrenRect, internalGetManipulatedChildrenRect, internalGetManipulatedChildrenRect, internalSetChildren, isCanChildrenChangeEdge, isCanMoveChildren, isChildMovable, layoutChildren, moveChild, moveChildren, needAdjustToPreferred, paintChildrenBackground, prefDimensionByManipulatedChildren, recursiveAutosize, removePresentationElement, removePresentationElement, sAddPresentationElement, setBounds, setBounds, setCanMoveChildren, setDummyResizeMode, setFillColor, setFillColorForChildren, setLayoutHelper, setPresentationElements, showPathElements, simpleSetBounds, simpleSetBounds, sRemovePresentationElement, sSetPresentationElements
Methods inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement
addBreakPoints, adjustBounds, adjustOnEdge, adjustOnEdge, adjustOnEdgeChildren, autosize, calculateAdjustOnEdgeLocation, calculateAndGetMinimumShrinkingDimension, calculateAndGetPreferredDimension, calculateEdge, calculateMinimumDimension, calculateOnEdgeBounds, calculatePreferredDimension, calculatePreferredDimension, canHavePaths, clearOldRect, edgeChanged, ensureDimension, ensurePreferredDimensionIfShrinkable, ensurePreferredDimensionIfShrinkable, findFreePlaceForShapeOnBorder, getBorderElementMargin, getBounds, getCenterlineableInnerParts, getDimensionForShrinking, getEdgeLine, getFixedConnectionPoints, getHeaderInsetReduce, getInsetsForOnEdgeShapes, getIntersection, getIntersection, getIntersection, getLoadedDimension, getMiddlePoint, getMiddlePoint, getMiddlePointX, getMiddlePointX, getMiddlePointY, getMiddlePointY, getMinimumDimension, getNearestEdge, getNearestEdge, getNeedAutosizeFlag, getNotCopyBounds, getOnEdge, getOnEdgeCornerDistance, getOnEdgePosition, getPreferredDimension, getPreferredDimensionForAutosize, getReshapeMode, getSizeForDrawing, getSuspendShapeAutoResizeMode, hasManipulator, initialize, internalGetBoundsShape, intersects, isAutosized, isCenterlineInner, isHorizontalCenterlineProvider, isOnEdge, isShapeOnEdge, isShrinkable, isSnapShapesOnBorderToGrid, isSnapToGrid, isUseFixedConnectionPoints, isVerticalCenterlineProvider, layoutChildren, maximumDimension, minimumOrMinimumShrinkableDimension, moveLinksToSelf, movePathElement, movePathElements, onChildEdgeChange, prepareForShadowDrawing, resetCalculatePreferredRegardingChildren, setBorderElementMargin, setCalculatePreferredRegardingChildren, setLoadedDimension, setMinimumDimension, setNeedAutosizeFlag, setOldRect, setOnEdge, setPreferredDimension, setReshapeMode, setSnapShapesOnBorderToGrid, setSuspendShapeAutoResizeMode, setUseFixedConnectionPoints, shouldDrawShadow, simpleSetBounds, simpleSetBounds, sSetBorderElementMargin, sSetBounds, sSetSuspendShapeAutoResizeMode, toString, updateLater
Methods inherited from class com.nomagic.magicdraw.uml.symbols.paths.PathConnector
addConnectedPathElement, createSmartListenerConfig, dispose, disposeConnectedPaths, findSymbolForEnd, findSymbolForEnd, getConnectedPathElement, getConnectedPathElementCount, getConnectedPathElements, getConnectedPathElements, getConnectedPathElements, getPreferredArrowLength, isShowsProxy, movePathElement, removeConnectedPathElement, sAddConnectedPathElement, selectPathsForMoving, setParent, sRemoveConnectedPathElement, sSetConnectedPathElements, supportsVisibleConnectedPathElementsIfSelfInvisible
Methods inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
addPresentationElement, addProperty, adjustChildBounds, alwaysShowTooltip, applyProperties, askDeleteDataConfirmation, atInsert, atInsertChildren, autosizeAndResizeManipulatedParent, beforeDelete, boundsChanged, boundsChanged, canAddChild, canAddInstance, canBeDisposedOnUpdate, canChangeElementOwner, canChangeParent, changeProperties, checkElementOwnerOnChange, checkProxyVisibility, childrenForMoving, collectSubManipulatedElements, collectSubPresentationElements, collectSubPresentationElements, collectSubShowingPresentationElements, coversPoint, createFillStrategy, createPresentationElementStyle, createPropertyChangeListener, disposeChildren, disposePropertyChangeListener, drawBackground, drawSymbol, drawSymbolBackground, dynamicFillColor, dynamicLineColor, dynamicLineWidth, dynamicLineWidth, dynamicPaintShadow, dynamicStroke, dynamicStroke, dynamicStroke, dynamicStyleFillColor, dynamicStyleLineColor, dynamicStyleTextColor, dynamicStyleTransparency, dynamicStyleTransparency, dynamicStyleValue, dynamicTextAlignment, dynamicTextColor, editName, findOwnerForChildElement, findOwnerForElement, findPresentationElement, firePropertyChange, generateID, getAbstractDiagramPresentationElement, getActualElement, getAdditionalRenderersToNotifyOnPropertiesChange, getAssignableModelElementsClasses, getBoundsShape, getBoundsToRepaint, getBoundsWithChildrenOnEdge, getCenterlinePoint, getCenterlinePointX, getCenterlinePointY, getChildPresentationElementForContextMenu, getChildrenWithSymbolProperties, getConfiguration, getDiagramPresentationElement, getDiagramSurface, getDrawComparator, getDynamicConfigurations, getEffectiveStyleDelegate, getEffectiveStyleOwner, getElement, getElementsForRelationshipConnecting, getElementToConnectRelationship, getFillColor, getFont, getFontHeight, getFontRenderContext, getHumanType, getLineColor, getLineWidth, getManipulatedElementAt, getManipulatedElementAt, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedParent, getManipulatedPresentationElements, getManipulationBounds, getModelElement, getModelElementsForRelationshipConnecting, getModelElementToConnectRelationship, getModelElementToMove, getNotZoomedTolerance, getObjectParent, getOwnStyleDelegate, getParent, getPreferredSize, getPresentationElementAt, getPresentationElementAt, getPresentationElementAt, getPresentationElementAt, getPresentationElementCount, getPresentationElementsAt, getPresentationElementsAt, getPresentationElementsAt, getPresentationElementsAt, getPresentationElementStroke, getPresentationElementStroke, getProjectImpl, getProperty, getPropertyManager, getPropertyManagerName, getRenderer, getSelected, getStroke, getStroke, getStroke, getStroke, getStroke, getStroke, getStyle, getSymbolRenderer, getTextColor, getTolerance, getVisibility, getVisiblePresentationElements, handleModelDelete, hasManipulatedPresentationElements, hasSharedModelElement, initializeAndAutosize, internalBeforeUpdate, internalCreatePropertyChangeListener, internalGetModelElementsForRelationshipConnecting, internalGetModelElementsForRelationshipConnecting, internalGetModelElementToConnectRelationship, internalGetPresentationElementStroke, internalGetSpecificFont, internalGetSpecificTextColor, internalIsSuitableToConnectRelationship, internalIsSuitableToConnectRelationship, internalSnapToGrid, internalSnapToGrid, intersects, isChildVisible, isCreateElementListener, isDetectable, isDisposed, isLayouting, isMovableByMoveManager, isNotNull, isParentOf, isParentOf, isPreserveProportionsWhenGrowing, isSelected, isShowElementTypeAsLabel, isSortable, isSuitableToConnectRelationship, isTextEditable, isUseFillColor, isUseFillColorByProperty, isUseGradientForFill, isVisible, isVisibleInDiagram, isVisibleOrShrunken, movePathElementsRecursively, notifyCreated, notifyDiagramFrameSizeChange, notifyRepaintManager, onChildAdd, onChildRemove, onDiagramSurfaceSet, onFind, onFind, onFontChange, onParentChange, paintAdornments, paintAdornmentsBackground, paintChildrenAndAdornments, paintSelfBackground, preDisposeOnUpdate, prepareForLineDrawing, prepareForTextDrawing, propertyChange, recreateListeners, registerInSortManager, rememberBounds, rememberBounds, removeFromSortManager, removeItSelfOnUpdate, sAddPresentationElement, selectChildrenForMoving, selectObjectsForMoving, setAllSelected, setBounds, setCreateElementListener, setElement, setFont, setLayouting, setLineColor, setLineWidth, setLoadedVisibility, setLocation, setLocation, setModelElement, setNeedRecreateListeners, setPropertyManagerName, setSelected, setSelected, setSize, setSize, setSize, setTextColor, setUseFillColor, setVisible, silentApply, silentApply, simpleSetBounds, snapToGrid, snapToGrid, snapViewToGrid, sortObjectsByX, sortObjectsByY, sSetBounds, sSetElement, sSetLocation, sSetLocation, sSetModelElement, sSetParent, sSetParentForAll, sSetSize, sSetSize, sSetSize, sSetVisible, tryToDeleteModelElementUponRemoval, update, updateAfterLoad, updateLabelsIgnoringSuspendableLater, updateModelByView, updateModelByViewInternal, updateViewAfterPropertyChange, useParentProperties
Methods inherited from class com.nomagic.magicdraw.uml.MDElementImpl
accept, addPropertyChangeListener, canAdd, canAddChild, canBeDeleted, canDeleteChild, compareTo, createSortKeys, getClassType, getID, getProjectProvider, getResourceID, getSortKeys, hasListeners, isEditable, removeAllParents, removeAllPropertyChangeListeners, removePropertyChangeListener, setID, setProjectProvider, setResourceIDProvider, sGetID
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.nomagic.magicdraw.uml.BaseElement
canAdd, isSelfChangeable
Methods inherited from interface com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
asPresentationElement, getAbstractDiagramPresentationElement, getCenterlinePoint, getCenterlinePointX, getCenterlinePointY
Methods inherited from interface com.nomagic.magicdraw.uml.MDElement
getProject
-
Constructor Details
-
TextBoxView
public TextBoxView() -
TextBoxView
-
TextBoxView
public TextBoxView(@CheckForNull PresentationElement parent, com.nomagic.magicdraw.uml.symbols.shapes.TextAreaView area)
-
-
Method Details
-
isTextBoxLabelMode
Checks if given symbol is label text box- Parameters:
symbol
- given symbol- Returns:
- true if symbol is TextBoxView with label mode
-
getDefaultDimension
- Overrides:
getDefaultDimension
in classcom.nomagic.magicdraw.uml.symbols.shapes.AbstractTextBoxView
-
accept
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. -
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 classPresentationElement
-
setLabelMode
public void setLabelMode(boolean value) -
isLabelMode
public boolean isLabelMode() -
canBeAutosized
public boolean canBeAutosized()- Overrides:
canBeAutosized
in classShapeElement
-
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 classPresentationElement
- Parameters:
movedTogether
- collection of the elements, whose will change the parent together with this.newParent
- new symbol parentchangeElementParent
- 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 classPresentationElement
- Returns:
- true, if element does not have style and uses parent's style.
-
getParentSymbolStyleOwner
Description copied from class:PresentationElement
Returns parent to which this symbol delegates style attributes related functionality.- Overrides:
getParentSymbolStyleOwner
in classPresentationElement
- Returns:
- parent symbol to delegate or null if this symbol does not delegate.
-
getDynamicStyleOwner
- Overrides:
getDynamicStyleOwner
in classPresentationElement
-
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 classcom.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 classcom.nomagic.magicdraw.uml.symbols.shapes.TextShapeView
-
canDisplayHTMLText
public boolean canDisplayHTMLText()- Specified by:
canDisplayHTMLText
in interfacecom.nomagic.magicdraw.uml.symbols.shapes.PlainTextOrHTMLChangeable
- Overrides:
canDisplayHTMLText
in classcom.nomagic.magicdraw.uml.symbols.shapes.AbstractTextBoxView
-
mustShowContextMenu
public boolean mustShowContextMenu()- Overrides:
mustShowContextMenu
in classPresentationElement
-
canFill
protected boolean canFill()- Overrides:
canFill
in classPresentationElement
- 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 classShapeElement
- 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 classPathConnector
- Parameters:
visibility
- flag value
-
checkShowsProxy
protected boolean checkShowsProxy()- Overrides:
checkShowsProxy
in classcom.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 classPresentationElement
- 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 classShapeElement
- Returns:
- true if adjustments are necessary
-
setHeaderOrientationVertical
public void setHeaderOrientationVertical(boolean value) - Overrides:
setHeaderOrientationVertical
in classcom.nomagic.magicdraw.uml.symbols.shapes.TextShapeView
-
rotateBoundsForHeaderOrientation
- Overrides:
rotateBoundsForHeaderOrientation
in classcom.nomagic.magicdraw.uml.symbols.shapes.TextShapeView
-