Class MessageView
- java.lang.Object
-
- com.nomagic.magicdraw.uml.MDElementImpl
-
- com.nomagic.magicdraw.uml.ElementImpl
-
- 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.ShapeWithLabels
-
- com.nomagic.magicdraw.uml.symbols.shapes.MessageView
-
- All Implemented Interfaces:
BaseElement,com.nomagic.magicdraw.uml.CompartmentSupport,MDElement,ModelElementProvider,com.nomagic.magicdraw.uml.symbols.LabelOwner,com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape,NumberedMessageView,com.nomagic.magicdraw.uml.symbols.paths.PathCustomDraw,StereotypesDisplayModeOwner,com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider,NameOwner,java.beans.PropertyChangeListener,java.lang.Cloneable,java.lang.Comparable,java.util.EventListener
@OpenApi public class MessageView extends com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels implements NumberedMessageView, com.nomagic.magicdraw.uml.symbols.paths.PathCustomDraw
TheMessageViewclass is used for displaying the message icon in Communication diagram of UML Drawing Tool. This class has the reference to the data class -MessageData.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classcom.nomagic.magicdraw.uml.symbols.shapes.MessageView.MessageLabelLayouterprivate static classcom.nomagic.magicdraw.uml.symbols.shapes.MessageView.MessageLabelOrientationChooser-
Nested classes/interfaces inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels.ShapeWithLabelsNameLabelWrapper
-
Nested classes/interfaces inherited from class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView.StereotypeDisplayData
-
Nested classes/interfaces inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement
com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement.OnEdgeBounds
-
Nested classes/interfaces inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
com.nomagic.magicdraw.uml.symbols.PresentationElement.SmartListenerConfigData, com.nomagic.magicdraw.uml.symbols.PresentationElement.StructureCache
-
-
Field Summary
Fields Modifier and Type Field Description private intdirectionDirection of message.private static intDISTANCEstatic intDISTANCE_FROM_LINKprivate intlengthThe length of the message shape.private com.nomagic.magicdraw.uml.symbols.MessageNumberManagernumberManagerprivate PresentationElementreceiverprivate PresentationElementsenderstatic intTO_LEFTstatic intTO_RIGHT-
Fields inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
CONTAINER_SHAPE_INSETS
-
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, SUSPEND_SHAPE_AUTO_RESIZE_FALSE, SUSPEND_SHAPE_AUTO_RESIZE_MODES, SUSPEND_SHAPE_AUTO_RESIZE_SAME_AS_DIAGRAM, SUSPEND_SHAPE_AUTO_RESIZE_TRUE, 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, SHADOW_WIDTH, SOLID_STROKE
-
Fields inherited from interface com.nomagic.magicdraw.uml.symbols.shapes.StereotypesDisplayModeOwner
DSL_STEREOTYPE_DISPLAY_MODE_ALL, DSL_STEREOTYPE_DISPLAY_MODE_LAST, DSL_STEREOTYPE_DISPLAY_MODE_NONE, DSL_STEREOTYPE_DISPLAY_MODES, STEREOTYPE_DISPLAY_MODE_DO_NOT_DISPLAY_STEREOTYPES, STEREOTYPE_DISPLAY_MODE_ICON, STEREOTYPE_DISPLAY_MODE_SHAPE_IMAGE, STEREOTYPE_DISPLAY_MODE_SHAPE_IMAGE_AND_TEXT, STEREOTYPE_DISPLAY_MODE_TEXT, STEREOTYPE_DISPLAY_MODE_TEXT_AND_ICON, STEREOTYPES_DISPLAY_MODES, STEREOTYPES_DISPLAY_MODES_SIMPLE
-
-
Constructor Summary
Constructors Constructor Description MessageView()MessageView(PresentationElement parent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(Visitor visitor)Method accepts visitor, and calls method visit<class name>(this) of visitor .voidaddPresentationElement(PresentationElement element, int index, boolean resize)voidautosize(boolean calculatePrefSize)Calculate preferred size and make this shape size at least as preferred(if size is smaller)voidautosizeByChildren(boolean calculatePrefSize)private java.awt.RectanglecalculateBounds(int x, int y)Calculates bounds according to the given point.booleancanAddInstance(PresentationElement obj)Object view has no children.booleancanChangeParent(java.util.Collection<? extends PresentationElement> movedTogether, BaseElement newParent, boolean changeElementParent)Returns true, if element can change parent.booleancanHavePaths()protected booleancheckShowsProxy()MessageViewclone()Returns a copy of theElement.booleancoversPoint(int x, int y)checks if object covers provided pointprotected voidcreateLabels()protected com.nomagic.magicdraw.uml.symbols.shapes.NameLabelWrappercreateNameLabelWrapper()protected voidcreateSmartListenerConfig(java.util.List<SmartListenerConfig> configurations)com.nomagic.magicdraw.ui.pathicon.PathIcondynamicPathIcon()com.nomagic.magicdraw.ui.pathicon.PathIcondynamicPathIcon(com.nomagic.magicdraw.ui.pathicon.PathIcon pathIcon)ElementfindParentForData(PresentationElement newParent, com.nomagic.uml2.ElementAddContext addContext)java.awt.RectanglegetBoundsToRepaint()Return bounds of the symbol that must be repainted.com.nomagic.ui.UnmodifiableInsetsgetChildrenInsets(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel)ConnectorViewgetConnector()intgetDirection()MessagegetElement()Returns model element of this presentation element.MessagegetMessage()Message represented by the view.com.nomagic.magicdraw.uml.symbols.shapes.MessageSignatureViewgetMessageSignatureLabelBox()Returns the signature view from the container of this message.com.nomagic.magicdraw.uml.symbols.shapes.MessageNameLabelWrappergetNameLabelWrapper()LinegetNearestLinkPart(int x, int y)Returns nearest link part to specified point.java.util.List<java.lang.String>getNumber()Returns number of the messagecom.nomagic.magicdraw.uml.symbols.MessageNumberManagergetNumberManager()com.nomagic.magicdraw.ui.pathicon.PathIcongetPathIcon()PresentationElementgetReceiver()PresentationElementgetSender()java.awt.BasicStrokegetStroke(boolean line)This method must be overridden, if you need to use DASHED_STROKE or another one.java.awt.BasicStrokegetStroke(boolean line, int lineStyle)This method must be overridden, if you need to use DASHED_STROKE or another one.booleanhasSharedData()Returns true if data of this object can be shared.voidinitialize()Initialize symbol and its children state.voidinternalApplyProperties(PropertyManager man)Applies properties from given property managervoidinternalSilentApply()Silently applies all properties after initializationbooleanintersects(int x, int y, int width, int height)checks whether object intersects with given rectanglebooleanisShowPredecessors()(package private) voidlayoutOperations(int dx, int dy, boolean useSimple)Translates data flows and operation location by dx, dy.protected voidminimumSizeIgnoringOrientation(java.awt.Dimension min)voidpaintSelf(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)protected voidprefDimensionByManipulatedChildren(java.awt.Dimension pref, int locationX, int locationY)protected voidpreferredSizeIgnoringOrientation(java.awt.Dimension pref, int locationX, int locationY)protected booleanprepareForLineDrawing(java.awt.Graphics2D g, boolean line)Prepares graphics for line drawing.voidpropertyChange(java.beans.PropertyChangeEvent e)Listens for property change it can be: data was edited text box was editedvoidrecursiveAutosize()Resize recursively all symbols.static voidresetMessagePositions(PathElement path)voidresizeParent()Method that initiates parent resize to accommodate children if some child's bounds are changed.voidsetDirection(int direction)voidsetNumberManager(com.nomagic.magicdraw.uml.symbols.MessageNumberManager numberManager)voidsetReceiver(PresentationElement receiver)voidsetSender(PresentationElement sender)voidsetShowPredecessors(boolean show)Sets show predecessors list.voidsimpleSetBounds(java.awt.Rectangle rect, boolean moveChildren, boolean calculatePrefSize)voidsSetShowPredecessors(boolean show)-
Methods inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
addLabel, canBeAutosized, createCompartmentElements, createConstraintLabelWrapper, createElementPropertiesLabelWrapper, createStereotypeLabelWrapper, createTaggedValueLabelWrapper, edgeChanged, editName, getCollections, getConstraintLabelBox, getConstraintLabelWrapper, getConstraintTextMode, getDSLStereotypesDisplayMode, getElementPropertiesLabelBox, getElementPropertiesLabelWrapper, getHeaderBoundsForPreferredBounds, getLabelHandler, getName, getNameLabelBox, getStereotypeLabelBox, getStereotypeLabelWrapper, getStereotypesDisplayMode, getTaggedValueLabelBox, getTaggedValueLabelWrapper, internalAppendChildRect, internalPostUpdatePresentationElement, isLabelWrapText, isShowConstraints, isShowElementProperties, isShowName, isShowNumberTagName, isShowTaggedValues, isShowText, isWordWrap, removeLabel, setCollections, setConstraintTextMode, setDSLStereotypesDisplayMode, setName, setNameResizeLabel, setShowConstraints, setShowElementProperties, setShowName, setShowTaggedValues, setStereotypesDisplayMode, setSuspendLabelAutoDisplayMode, setSuspendShapeAutoResizeMode, setTextEditable, setVisibleElements, setWordWrap, sSetConstraintTextMode, sSetDSLStereotypesDisplayMode, sSetElement, sSetElementNumberDisplayMode, sSetName, sSetShowConstraints, sSetShowElementProperties, sSetShowName, sSetShowNumberTagName, sSetShowTaggedValues, sSetStereotypesDisplayMode, sSetSuspendLabelAutoDisplayMode, sSetWordWrap, updateAfterLoad, updateNameBox
-
Methods inherited from class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
autosizeAndResizeParent, calculateMinY, calculateOvalShapePreferredSize, correctChildrenVector, createBoundsShape, createStateForUpdateOperation, doInternalLayoutChildren, getAdditionalHeaderHeightForPreferredBounds, getChildrenBoundsForPreferredBounds, getHeaderDistanceFromTopForOvalShape, getHeaderInsets, getHeaderMaxYForShrinkableShape, getHeaderObject, getHeaderVerticalPosition, getHeaderVerticalPositionForLayout, getNameLabel, getOvalShapeAvailableWidth, getPreferredBounds, getPresentationElementAt, getProxyPresentationElementsStream, getStereotypesToDisplay, internalGetHeaderBoundsForPreferredBounds, internalGetHeaderInsets, internalLayoutChildren, internalPostSpecificUpdate, internalPreSpecificUpdate, internalSpecificUpdate, internalUpdatePresentationElement, invalidate, isBorderVisible, isChildLayoutable, isContentHidden, isHeaderOrientationVertical, isOvalShape, isParentShowsProxy, minimumDimension, minimumDimensionForShrinking, minimumSizeForShrinkingIgnoringOrientation, paintChildren, preferredDimension, setHeaderObject, setHeaderVerticalPosition, sSetAutosize, sSetHeaderVerticalPosition, switchWidthHeightIfVerticalOrientation
-
Methods inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
addPresentationElement, addPresentationElementWithoutResize, adjustBoundsForMoving, adjustChildBoundsForMoving, calculateAutosizeDimension, calculateAutosizeDimension, canAddChild, canMoveChildOutside, childrenBoundsForReshape, clearShowsProxy, constructLayoutHelper, getChildrenBounds, getChildrenOnBorderBounds, getContainerBounds, getLayoutHelper, getLayoutHelperClone, getManipulatedElementAt, getManipulationPreferredDimension, getPresentationElementIndex, getPresentationElements, getRemovableChildren, hasManipulatedChildrenIncludingIndirect, hasManipulatedShapesNotOnEdge, hasManipulatedShapesOnEdge, hasManipulatedShapesOnEdge, internalAddIndirectManipulatedChildrenRect, internalGetChildAt, internalGetIndirectManipulatedChildrenRect, internalGetManipulatedChildrenRect, internalGetManipulatedChildrenRect, internalGetSelfManipulationPreferredSize, internalRecursiveAutosizeForChildren, internalSetChildren, isCanChildrenChangeEdge, isCanMoveChildren, isChildMovable, layoutChildren, moveChild, moveChildren, needAdjustToPreferred, paintChildrenBackground, removePresentationElement, removePresentationElement, sAddPresentationElement, setBounds, setBounds, setCanMoveChildren, setDummyResizeMode, setFillColor, setLayoutHelper, setPresentationElements, showPathElements, 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, clearOldRect, ensureDimension, ensurePreferredDimensionIfShrinkable, ensurePreferredDimensionIfShrinkable, findFreePlaceForShapeOnBorder, getBorderElementMargin, getBounds, getCenterlineableInnerParts, getDefaultDimension, 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, getSuspendShapeAutoResizeMode, hasManipulator, internalGetBoundsShape, isAutosized, isCenterlineInner, isHorizontalCenterlineProvider, isOnEdge, isShrinkable, isSnapShapesOnBorderToGrid, isSnapToGrid, isUseFixedConnectionPoints, isVerticalCenterlineProvider, layoutChildren, maximumDimension, minimumOrMinimumShrinkableDimension, moveLinksToSelf, movePathElement, movePathElements, needAdjustToMaximumDimension, onChildEdgeChange, prepareForShadowDrawing, providesHorizontalCenterline, providesVerticalCenterline, resetCalculatePreferredRegardingChildren, setAutosize, setBorderElementMargin, setCalculatePreferredRegardingChildren, setLoadedDimension, setMinimumDimension, setNeedAutosizeFlag, setOldRect, setOnEdge, setPreferredDimension, setReshapeMode, setSnapShapesOnBorderToGrid, setUseFixedConnectionPoints, shouldDrawShadow, simpleSetBounds, simpleSetBounds, snapsToCenterlines, sSetBorderElementMargin, sSetBounds, sSetSuspendShapeAutoResizeMode, sSetVisibility, toString, updateLater
-
Methods inherited from class com.nomagic.magicdraw.uml.symbols.paths.PathConnector
addConnectedPathElement, dispose, disposeConnectedPaths, findSymbolForEnd, findSymbolForEnd, getConnectedPathElement, getConnectedPathElementCount, getConnectedPathElements, getConnectedPathElements, getConnectedPathElements, getPreferredArrowLength, isShowsProxy, movePathElement, removeConnectedPathElement, sAddConnectedPathElement, selectPathsForMoving, setParent, setVisibility, sRemoveConnectedPathElement, sSetConnectedPathElements
-
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, canChangeElementParent, canChangeParent, canFill, changeProperties, changeProperty, changePropertyManager, checkElementParentOnAdd, checkProxyVisibility, childrenForMoving, clearAntialiasingState, collectSubManipulatedElements, collectSubPresentationElements, collectSubPresentationElements, collectSubShowingPresentationElements, constructChangePropertyCommand, createPropertyChangeListener, createPropertyManager, disposeChildren, disposeListener, draw, drawBackground, drawSymbol, drawSymbolBackground, dynamicFillColor, dynamicLineColor, dynamicLineWidth, dynamicLineWidth, dynamicPaintShadow, dynamicStroke, dynamicStroke, dynamicStroke, dynamicStyleFillColor, dynamicStyleFillPaint, dynamicStyleLineColor, dynamicStyleTextColor, dynamicStyleTransparency, dynamicStyleTransparency, dynamicStyleValue, dynamicTextAlignment, dynamicTextColor, editName, findPresentationElement, firePropertyChange, generateID, getActualElement, getActualProperty, getAdditionalRenderersToNotify, getAssignableModelElementsClasses, getBooleanPropertyValue, getBoundsShape, getBoundsWithChildrenOnEdge, getCenterlinePoint, getCenterlinePointX, getCenterlinePointY, getChildPresentationElementForContextMenu, getChildrenWithSymbolProperties, getConfiguration, getDiagramPresentationElement, getDiagramSurface, getDrawComparator, getDynamicConfigurations, getDynamicStyleOwner, getElementNumberDisplayMode, getElementsForLinkConnecting, getElementToConnectLink, getElementToMove, getExpectedDataParent, getFillColor, getFont, getFontHeight, getFontRenderContext, getHumanName, getHumanType, getLineColor, getLineWidth, getManipulatedElementAt, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedParent, getManipulatedPresentationElements, getManipulationBounds, getNotZoomedTolerance, getObjectParent, getParent, getParentSymbolPropertyOwner, getPreferredSize, getPresentationElementAt, getPresentationElementAt, getPresentationElementCount, getPresentationElementsAt, getPresentationElementsAt, getPresentationElementStroke, getPresentationElementStroke, getProjectImpl, getProperty, getPropertyManager, getPropertyManagerName, getRealPropertyManager, getRenderer, getSelected, getStereotypeColor, getStereotypeFont, getStringPropertyValue, getStroke, getStroke, getStroke, getStroke, getStroke, getStroke, getSymbolRenderer, getTextColor, getTolerance, getVisibility, getVisiblePresentationElements, handleModelDelete, hasDiagramSurface, hasManipulatedPresentationElements, initializeAndAutosize, internalBeforeUpdate, internalCreatePropertyChangeListener, internalGetElementsForLinkConnecting, internalGetElementToConnectLink, internalGetPresentationElementStroke, internalSnapToGrid, internalSnapToGrid, isChildVisible, isCreateElementListener, isDetectable, isDisposed, isLayouting, isMovableByMoveManager, isNotNull, isParentOf, isParentOf, isPreserveProportionsWhenGrowing, isSelected, isShowElementTypeAsLabel, isSortable, isTestUpdateFlag, isTextEditable, isUseFillColor, isUseFillColorByProperty, isUseGradientForFill, isVisible, isVisibleInDiagram, isVisibleOrShrunken, movePathElementsRecursively, mustShowContextMenu, notifyCreated, notifyDiagramFrameSizeChange, notifyRepaintManager, onFind, onFind, onFontChange, paintAdornments, paintAdornmentsBackground, paintChildrenAndAdornments, paintSelfBackground, preDisposeOnUpdate, prepareForFillDrawing, prepareForLineDrawing, prepareForTextDrawing, recreateListeners, registerInSortManager, rememberBounds, rememberBounds, removeFromSortManager, removeItSelfOnUpdate, sAddPresentationElement, selectChildrenForMoving, selectObjectsForMoving, setAllSelected, setBounds, setCreateElementListener, setDiagramSurface, setElement, setFont, setFontProperty, setLayouting, setLineColor, setLineWidth, setLoadedVisibility, setLocation, setLocation, setNeedRecreateListeners, setPropertyManager, setPropertyManagerName, setSelected, setSelected, setSize, setSize, setSize, setStereotypeColor, setStereotypeFont, setStrokeIfNotTheSame, setTestUpdateFlag, setTextColor, setTextColorProperty, setUseFillColor, setVisible, silentApply, silentApply, simpleSetBounds, snapToGrid, snapToGrid, snapViewToGrid, sortObjectsByX, sortObjectsByY, sSetBounds, sSetLineWidth, sSetLocation, sSetLocation, sSetParent, sSetParentForAll, sSetSize, sSetSize, sSetSize, sSetVisible, tryToDeleteModelElementUponRemoval, update, updateLabelsIgnoringSuspendableLater, updateModelByView, updateModelByViewInternal, updateViewAfterPropertyChange, useParentProperties
-
Methods inherited from class com.nomagic.magicdraw.uml.MDElementImpl
accept, addPropertyChangeListener, canAdd, canAdd, canAddChild, canBeDeleted, canDeleteChild, compareTo, createSortKeys, getClassType, getCommandForAppending, getID, getProject, getProjectProvider, getResourceID, getSortKeys, hasListeners, isEditable, removeAllChildren, removeAllParents, removeAllPropertyChangeListeners, removePropertyChangeListener, setID, setProjectProvider, 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.symbols.manipulators.centerlines.CenterlineableShape
getCenterlinePoint, getCenterlinePointX, getCenterlinePointY, getDiagramPresentationElement
-
-
-
-
Field Detail
-
length
private int length
The length of the message shape.
-
DISTANCE
private static final int DISTANCE
- See Also:
- Constant Field Values
-
numberManager
private com.nomagic.magicdraw.uml.symbols.MessageNumberManager numberManager
-
direction
private int direction
Direction of message.
-
TO_RIGHT
public static final int TO_RIGHT
- See Also:
- Constant Field Values
-
TO_LEFT
public static final int TO_LEFT
- See Also:
- Constant Field Values
-
DISTANCE_FROM_LINK
public static final int DISTANCE_FROM_LINK
- See Also:
- Constant Field Values
-
sender
private PresentationElement sender
-
receiver
private PresentationElement receiver
-
-
Constructor Detail
-
MessageView
public MessageView()
-
MessageView
public MessageView(@CheckForNull PresentationElement parent)
-
-
Method Detail
-
createNameLabelWrapper
protected com.nomagic.magicdraw.uml.symbols.shapes.NameLabelWrapper createNameLabelWrapper()
- Overrides:
createNameLabelWrapperin classcom.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
-
createLabels
protected void createLabels()
- Overrides:
createLabelsin classcom.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
-
getNameLabelWrapper
public com.nomagic.magicdraw.uml.symbols.shapes.MessageNameLabelWrapper getNameLabelWrapper()
- Overrides:
getNameLabelWrapperin classcom.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
-
getMessageSignatureLabelBox
public com.nomagic.magicdraw.uml.symbols.shapes.MessageSignatureView getMessageSignatureLabelBox()
Returns the signature view from the container of this message. Data flows are contained in it too.- Returns:
- the
MessageSignatureView
-
layoutOperations
void layoutOperations(int dx, int dy, boolean useSimple)Translates data flows and operation location by dx, dy. Calculates the angle for data flows.- Parameters:
dx- the x offset.dy- the y offset.
-
preferredSizeIgnoringOrientation
protected void preferredSizeIgnoringOrientation(java.awt.Dimension pref, int locationX, int locationY)- Overrides:
preferredSizeIgnoringOrientationin classcom.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
-
minimumSizeIgnoringOrientation
protected void minimumSizeIgnoringOrientation(java.awt.Dimension min)
- Overrides:
minimumSizeIgnoringOrientationin classcom.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
-
simpleSetBounds
public void simpleSetBounds(java.awt.Rectangle rect, boolean moveChildren, boolean calculatePrefSize)- Overrides:
simpleSetBoundsin classcom.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
-
getNearestLinkPart
public Line getNearestLinkPart(int x, int y)
Returns nearest link part to specified point.
-
addPresentationElement
public void addPresentationElement(PresentationElement element, int index, boolean resize)
- Overrides:
addPresentationElementin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
dynamicPathIcon
@CheckForNull public com.nomagic.magicdraw.ui.pathicon.PathIcon dynamicPathIcon()
-
dynamicPathIcon
public com.nomagic.magicdraw.ui.pathicon.PathIcon dynamicPathIcon(@CheckForNull com.nomagic.magicdraw.ui.pathicon.PathIcon pathIcon)
-
getPathIcon
@CheckForNull public com.nomagic.magicdraw.ui.pathicon.PathIcon getPathIcon()
- Specified by:
getPathIconin interfacecom.nomagic.magicdraw.uml.symbols.paths.PathCustomDraw
-
paintSelf
public void paintSelf(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
-
clone
public MessageView clone()
Description copied from class:ElementImplReturns a copy of theElement.- Specified by:
clonein interfaceBaseElement- Overrides:
clonein classcom.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels- Returns:
- the cloned object
-
canAddInstance
public boolean canAddInstance(PresentationElement obj)
Description copied from class:PresentationElementObject view has no children.- Overrides:
canAddInstancein classcom.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
-
canHavePaths
public boolean canHavePaths()
- Returns:
- true if symbol can have connected paths. Return false here.
-
coversPoint
public boolean coversPoint(int x, int y)Description copied from class:PresentationElementchecks if object covers provided point- Overrides:
coversPointin classcom.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView- Returns:
- true if object covers this point
-
accept
public void accept(Visitor visitor) throws java.lang.Exception
Description copied from interface:MDElementMethod accepts visitor, and calls method visit<class name>(this) of visitor . See Visitor pattern for more details.
-
hasSharedData
public boolean hasSharedData()
Description copied from class:PresentationElementReturns true if data of this object can be shared. If data is not shared data can be deleted with del key. Or it must be deleted with CRL+D- Returns:
- true if data of this object can be shared.
-
calculateBounds
private java.awt.Rectangle calculateBounds(int x, int y)Calculates bounds according to the given point. Sets minimum and preferred size for message.- Returns:
- the new bounds for MessageView according to its parent.
-
resizeParent
public void resizeParent()
Description copied from class:PresentationElementMethod that initiates parent resize to accommodate children if some child's bounds are changed.
-
prefDimensionByManipulatedChildren
protected void prefDimensionByManipulatedChildren(java.awt.Dimension pref, int locationX, int locationY)- Overrides:
prefDimensionByManipulatedChildrenin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
autosizeByChildren
public void autosizeByChildren(boolean calculatePrefSize)
- Overrides:
autosizeByChildrenin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
autosize
public void autosize(boolean calculatePrefSize)
Description copied from class:ShapeElementCalculate preferred size and make this shape size at least as preferred(if size is smaller)- Overrides:
autosizein classcom.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView- Parameters:
calculatePrefSize- calculate preferred size
-
initialize
public void initialize()
Description copied from class:PresentationElementInitialize symbol and its children state. Symbol must be initialized before doing any resize, painting and etc. These operations can lead to unpredictable results otherwise.
-
recursiveAutosize
public void recursiveAutosize()
Description copied from class:PresentationElementResize recursively all symbols. Method must be called if something is changed in symbol (for example minimum size) and you want to resize (autosize) all hierarchy- Overrides:
recursiveAutosizein classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
setDirection
public void setDirection(int direction)
-
getDirection
public int getDirection()
-
intersects
public boolean intersects(int x, int y, int width, int height)Description copied from class:PresentationElementchecks whether object intersects with given rectangle- Returns:
- true if object and rectangle intersects
-
getBoundsToRepaint
public java.awt.Rectangle getBoundsToRepaint() throws NoRectangleDefinedExceptionDescription copied from class:PresentationElementReturn bounds of the symbol that must be repainted. throws NoRectangleDefinedException- Overrides:
getBoundsToRepaintin classcom.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels- Returns:
- rectangle of bounds
- Throws:
NoRectangleDefinedException
-
internalApplyProperties
public void internalApplyProperties(PropertyManager man)
Description copied from class:PresentationElementApplies properties from given property manager- Overrides:
internalApplyPropertiesin classcom.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels- Parameters:
man- new properties
-
internalSilentApply
public void internalSilentApply()
Description copied from class:PresentationElementSilently applies all properties after initialization- Overrides:
internalSilentApplyin classcom.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
-
sSetShowPredecessors
public void sSetShowPredecessors(boolean show)
-
setShowPredecessors
public void setShowPredecessors(boolean show)
Sets show predecessors list.- Parameters:
show- show list
-
isShowPredecessors
public boolean isShowPredecessors()
- Returns:
- show predecessors property value.
-
canChangeParent
public boolean canChangeParent(java.util.Collection<? extends PresentationElement> movedTogether, @CheckForNull BaseElement newParent, boolean changeElementParent)
Description copied from class:PresentationElementReturns true, if element can change parent.- 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
-
resetMessagePositions
public static void resetMessagePositions(PathElement path)
-
getElement
public Message getElement()
Description copied from class:PresentationElementReturns model element of this presentation element. Some presentation elements (for example TextBoxes) do not have model elements.- Specified by:
getElementin interfacecom.nomagic.magicdraw.uml.symbols.LabelOwner- Specified by:
getElementin interfaceModelElementProvider- Overrides:
getElementin classPresentationElement- Returns:
- model element of this presentation element.
-
findParentForData
public Element findParentForData(PresentationElement newParent, com.nomagic.uml2.ElementAddContext addContext)
-
getMessage
public Message getMessage()
Description copied from interface:NumberedMessageViewMessage represented by the view.- Specified by:
getMessagein interfaceNumberedMessageView- Returns:
- message represented by the view
-
getNumber
public java.util.List<java.lang.String> getNumber()
Description copied from interface:NumberedMessageViewReturns number of the message- Specified by:
getNumberin interfaceNumberedMessageView- Returns:
- nested number of the message
-
getNumberManager
public com.nomagic.magicdraw.uml.symbols.MessageNumberManager getNumberManager()
-
setNumberManager
public void setNumberManager(com.nomagic.magicdraw.uml.symbols.MessageNumberManager numberManager)
-
getSender
public PresentationElement getSender()
-
getReceiver
public PresentationElement getReceiver()
-
setReceiver
public void setReceiver(PresentationElement receiver)
-
setSender
public void setSender(PresentationElement sender)
-
getConnector
public ConnectorView getConnector()
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
Description copied from class:PresentationElementListens for property change it can be: data was edited text box was edited- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
checkShowsProxy
protected boolean checkShowsProxy()
- Overrides:
checkShowsProxyin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
getChildrenInsets
public com.nomagic.ui.UnmodifiableInsets getChildrenInsets(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel)
- Overrides:
getChildrenInsetsin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView- Parameters:
insetsLevel- describes the level of insets- Returns:
- shape insets for children
-
getStroke
public java.awt.BasicStroke getStroke(boolean line, int lineStyle)This method must be overridden, if you need to use DASHED_STROKE or another one.- Returns:
- the stroke for line drawing ( by default SOLID_STROKE).
-
prepareForLineDrawing
protected boolean prepareForLineDrawing(java.awt.Graphics2D g, boolean line)Prepares graphics for line drawing. Calls super prepareForLineDrawing and sets stroke.
-
getStroke
public java.awt.BasicStroke getStroke(boolean line)
This method must be overridden, if you need to use DASHED_STROKE or another one.- Returns:
- the stroke for line drawing ( by default SOLID_STROKE).
-
createSmartListenerConfig
protected void createSmartListenerConfig(java.util.List<SmartListenerConfig> configurations)
- Overrides:
createSmartListenerConfigin classcom.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
-
-