Class LifeLineLineView
- 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.LifeLineLineView
-
- All Implemented Interfaces:
BaseElement
,MDElement
,ModelElementProvider
,com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
,com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider
,NameOwner
,java.beans.PropertyChangeListener
,java.lang.Cloneable
,java.lang.Comparable
,java.util.EventListener
@OpenApi public class LifeLineLineView extends com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
Life line line in sequence diagram.
-
-
Nested Class Summary
-
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 static int
CROSS_DELTA
static int
CROSS_WIDTH
cross widthstatic int
DELTA_X
static int
DELTA_Y
constants for concurrent lifeline dimensionsprivate static int
MANIPULATION_EXTENSION_HEIGHT
Invisible extension of the lifeline line to which messages can be connected and objects can be added.private boolean
mConcurrent
is or isn't lifeline concurrentprivate boolean
mHidden
Life line for recursive message must be invisible.static int
MIN_EXTENSION
Minimal extension of lifeline line.static int
MIN_LENGTH
Minimal length of lifeline line.-
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
-
-
Constructor Summary
Constructors Constructor Description LifeLineLineView()
Creates a new life line view.LifeLineLineView(PresentationElement parent)
Creates and initializes a new life line view from specified parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor visitor)
Method accepts visitor, and calls method visit<class name>(this) of visitor .void
addPresentationElement(PresentationElement element, int index, boolean resize)
private void
addStateInvariantToModel(PresentationElement view)
If a state invariant symbol is added, makes necessary model modifications.void
adjustBounds(java.awt.Rectangle r)
Adjust bounds 1.java.awt.Rectangle
adjustBoundsForMoving(java.awt.Rectangle rec, java.util.Collection<PresentationElement> movedTogether)
validate bounds for movingvoid
atInsert()
Invalidates object at insertjava.awt.Rectangle
calculateActivationsBounds()
void
calculateAutosizeDimension(java.awt.Dimension size, int locationX, int locationY, int prefSizeWidth, int prefSizeHeight)
Calculates size of shape to be at least as preferred and fit all childrenjava.awt.Point
calculateDestroyTimePoint()
boolean
canAddChild(PresentationElement obj)
Check of given symbol can be added as child into this symbol.boolean
canAddInstance(PresentationElement obj)
Checks can this life line view add specified object or not.boolean
checkElementParentOnAdd(PresentationElement child)
LifeLineLineView
clone()
Clones this object.private void
correctInnerActivationBounds()
Adjust bounds of inner activations according bounds of this lifeline.void
correctInnerStateInvariantBounds()
Adjust bounds of inner state invariants according bounds of this lifeline.private void
correctInnerSymbolBounds()
Corrects bounds for inner symbols after bounds of this lifeline are changed.boolean
correctStateInvariantBounds(java.awt.Rectangle bounds)
Adjusts bounds of a given state invariant so that it lies correctly on this lifeline line.boolean
coversPoint(int x, int y)
checks if object covers provided pointContainerShape
createBoundsShape(PathElement path, BoundsTransformation transformation)
Creates bounding shape for intersection calculation.void
dispose()
disposes ends of links when link is deletedprotected void
disposeChildren()
Removes all children from itself.java.awt.BasicStroke
dynamicStroke(java.awt.BasicStroke stroke)
void
editName(java.awt.event.KeyEvent evt, java.util.Map<java.lang.String,java.lang.Boolean> textEditorOptions)
Does nothing -- prevent from editing name box, which is an attribute of container.boolean
ensureDestructionOccurrence(boolean destruct)
Ensures that a proper destruction occurrence is in the model on this lifeline.ActivationView
getActivationAt(int y)
Returns Activation at specified point.java.util.List<ActivationView>
getActivations()
Gets activations placed on this lifeline line.java.util.Iterator<ActivationView>
getActivationsIterator()
Element
getActualElement()
Because some views returns theirs parent model element, we do not know have they this member set or not.java.util.List<com.nomagic.magicdraw.uml.symbols.paths.SeqBaseMessageView>
getAllMessages()
java.awt.Rectangle
getBoundsToRepaint()
Return bounds of the symbol that must be repainted.com.nomagic.ui.UnmodifiableInsets
getChildrenInsets(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel)
ActivationView
getClosestActivationAt(int ptY)
Finds closest activation on this lifeline line at a given point.PresentationElement
getDynamicStyleOwner()
Lifeline
getElement()
returns parent datacom.nomagic.magicdraw.uml.symbols.paths.SeqBaseMessageView
getIncomingMessageWithType(MessageSort type)
ActivationView
getLastActivation()
Returns last activation.StateInvariantView
getLastStateInvariant()
Returns last state invariant.int
getLastStateInvariantPosition()
Calculates y coordinate of this lifeline line to cover the last state invariant lying on it.Lifeline
getLifeline()
java.awt.Rectangle
getManipulationBounds(java.awt.Point relativePoint)
Gets manipulation bounds of the symbol.int
getMiddlePointX()
int
getMiddlePointY(java.awt.Point relativePoint)
java.util.List<LifeLineLineView>
getNestedLines()
Returns nested lifeline lines.java.util.Iterator<LifeLineLineView>
getNestedLinesIterator()
protected int
getNotZoomedTolerance()
SequenceLifelineView
getObject()
PresentationElement
getParentSymbolPropertyOwner()
Returns parent symbol property manager to which this symbol delegates symbol property related functionality.PresentationElement
getPresentationElementAt(java.awt.Point point)
Searches and returns object that covers given point.com.nomagic.magicdraw.uml.symbols.SequenceObjectViewContainer
getSeqContainer()
java.util.List<ActivationView>
getSortedActivations()
java.util.List<StateInvariantView>
getStateInvariants()
Gets state invariants lying on this lifeline line.int
getUpperPointY()
boolean
hasStateInvariants()
Indicates if this life line has any state invariants on it.protected java.awt.Rectangle
internalGetManipulatedChildrenRect(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel)
java.awt.BasicStroke
internalGetPresentationElementStroke(int width)
Return a stroke used to paint symbol's main partvoid
internalLayoutChildren(boolean calculatePrefSize)
protected void
internalUpdatePresentationElement()
Internal symbol update method for subclassing.boolean
isConcurrent()
boolean
isDestroyed()
Gets destroyed value.boolean
isHidden()
boolean
isMovableByMoveManager()
Method indicates if object of this instance must be registered in move manager.boolean
isNested()
Indicates if this lifeline line is nested (not root).protected boolean
isSnapToGrid()
boolean
isUseEntireActivation()
void
moveChild(PresentationElement view, int dx, int dy)
protected void
movePathElement(PathElement lnk, PathConnector requestor)
Calculates position of path element.boolean
mustShowContextMenu()
protected boolean
needAdjustToPreferred()
Check if shape can be resized to a preferred size.void
paintChildren(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
void
paintSelf(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
protected void
preferredDimension(java.awt.Dimension pref, int locationX, int locationY)
void
rememberBounds()
Remember old boundsvoid
rememberBounds(java.awt.Rectangle bounds)
void
removePresentationElement(PresentationElement element, boolean resizeParent)
private void
removeStateInvariantFromModel(PresentationElement view)
If a state invariant symbol is removed, makes necessary model modifications.protected java.util.List<PathElement>
selectPathsForMoving(java.util.List<PresentationElement> subPresentationElements)
Select paths to move with current symbol from deep structure.void
setConcurrent(boolean concurrent)
void
setElement(Element el)
void
setHidden(boolean hidden)
void
setPosition()
Sets life line view position depending on this object parent position.void
simpleSetBounds(java.awt.Rectangle rct, boolean moveChildren, boolean calculatePrefSize)
void
sRemovePresentationElement(PresentationElement element)
Removes given childvoid
sSetElement(Element el)
boolean
useParentProperties()
Use parent font always-
Methods inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
addPresentationElement, addPresentationElementWithoutResize, adjustChildBoundsForMoving, autosize, autosizeByChildren, calculateAutosizeDimension, canMoveChildOutside, checkShowsProxy, childrenBoundsForReshape, clearShowsProxy, constructLayoutHelper, correctChildrenVector, getChildrenBounds, getChildrenOnBorderBounds, getContainerBounds, getLayoutHelper, getLayoutHelperClone, getManipulatedElementAt, getManipulationPreferredDimension, getPresentationElementIndex, getPresentationElements, getProxyPresentationElementsStream, getRemovableChildren, hasManipulatedChildrenIncludingIndirect, hasManipulatedShapesNotOnEdge, hasManipulatedShapesOnEdge, hasManipulatedShapesOnEdge, internalAddIndirectManipulatedChildrenRect, internalAppendChildRect, internalGetChildAt, internalGetIndirectManipulatedChildrenRect, internalGetManipulatedChildrenRect, internalGetSelfManipulationPreferredSize, internalRecursiveAutosizeForChildren, internalSetChildren, isCanChildrenChangeEdge, isCanMoveChildren, isChildMovable, layoutChildren, moveChildren, paintChildrenBackground, prefDimensionByManipulatedChildren, recursiveAutosize, removePresentationElement, sAddPresentationElement, setBounds, setBounds, setCanMoveChildren, setDummyResizeMode, setFillColor, setLayoutHelper, setPresentationElements, showPathElements, simpleSetBounds, sSetPresentationElements
-
Methods inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement
addBreakPoints, adjustOnEdge, adjustOnEdge, adjustOnEdgeChildren, autosize, autosizeAndResizeParent, calculateAdjustOnEdgeLocation, calculateAndGetMinimumShrinkingDimension, calculateAndGetPreferredDimension, calculateEdge, calculateMinimumDimension, calculateOnEdgeBounds, calculatePreferredDimension, calculatePreferredDimension, canBeAutosized, canHavePaths, clearOldRect, edgeChanged, ensureDimension, ensurePreferredDimensionIfShrinkable, ensurePreferredDimensionIfShrinkable, findFreePlaceForShapeOnBorder, getBorderElementMargin, getBounds, getCenterlineableInnerParts, getDefaultDimension, getDimensionForShrinking, getEdgeLine, getFixedConnectionPoints, getHeaderInsetReduce, getInsetsForOnEdgeShapes, getIntersection, getIntersection, getIntersection, getLoadedDimension, getMiddlePoint, getMiddlePoint, getMiddlePointX, getMiddlePointY, getMinimumDimension, getNearestEdge, getNearestEdge, getNeedAutosizeFlag, getNotCopyBounds, getOnEdge, getOnEdgeCornerDistance, getOnEdgePosition, getPreferredDimension, getPreferredDimensionForAutosize, getReshapeMode, getSuspendShapeAutoResizeMode, hasManipulator, initialize, internalApplyProperties, internalGetBoundsShape, internalSilentApply, intersects, isAutosized, isCenterlineInner, isChildLayoutable, isHorizontalCenterlineProvider, isOnEdge, isShrinkable, isSnapShapesOnBorderToGrid, isUseFixedConnectionPoints, isVerticalCenterlineProvider, layoutChildren, maximumDimension, minimumDimension, minimumDimensionForShrinking, minimumOrMinimumShrinkableDimension, moveLinksToSelf, movePathElements, needAdjustToMaximumDimension, onChildEdgeChange, prepareForShadowDrawing, providesHorizontalCenterline, providesVerticalCenterline, resetCalculatePreferredRegardingChildren, setAutosize, setBorderElementMargin, setCalculatePreferredRegardingChildren, setLoadedDimension, setMinimumDimension, setNeedAutosizeFlag, setOldRect, setOnEdge, setPreferredDimension, setReshapeMode, setSnapShapesOnBorderToGrid, setSuspendShapeAutoResizeMode, setUseFixedConnectionPoints, shouldDrawShadow, simpleSetBounds, simpleSetBounds, snapsToCenterlines, sSetAutosize, sSetBorderElementMargin, sSetBounds, sSetSuspendShapeAutoResizeMode, sSetVisibility, toString, updateLater
-
Methods inherited from class com.nomagic.magicdraw.uml.symbols.paths.PathConnector
addConnectedPathElement, createSmartListenerConfig, disposeConnectedPaths, findSymbolForEnd, findSymbolForEnd, getConnectedPathElement, getConnectedPathElementCount, getConnectedPathElements, getConnectedPathElements, getConnectedPathElements, getPreferredArrowLength, isShowsProxy, movePathElement, removeConnectedPathElement, sAddConnectedPathElement, setParent, setVisibility, sRemoveConnectedPathElement, sSetConnectedPathElements
-
Methods inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
addPresentationElement, addProperty, adjustChildBounds, alwaysShowTooltip, applyProperties, askDeleteDataConfirmation, atInsertChildren, autosizeAndResizeManipulatedParent, beforeDelete, boundsChanged, boundsChanged, canAddChild, canAddInstance, canBeDisposedOnUpdate, canChangeElementParent, canChangeParent, canChangeParent, canFill, changeProperties, changeProperty, changePropertyManager, checkProxyVisibility, childrenForMoving, clearAntialiasingState, collectSubManipulatedElements, collectSubPresentationElements, collectSubPresentationElements, collectSubShowingPresentationElements, constructChangePropertyCommand, createPropertyChangeListener, createPropertyManager, disposeListener, draw, drawBackground, drawSymbol, drawSymbolBackground, dynamicFillColor, dynamicLineColor, dynamicLineWidth, dynamicLineWidth, dynamicPaintShadow, dynamicStroke, dynamicStroke, dynamicStyleFillColor, dynamicStyleFillPaint, dynamicStyleLineColor, dynamicStyleTextColor, dynamicStyleTransparency, dynamicStyleTransparency, dynamicStyleValue, dynamicTextAlignment, dynamicTextColor, editName, findParentForData, findPresentationElement, firePropertyChange, generateID, getActualProperty, getAdditionalRenderersToNotify, getAssignableModelElementsClasses, getBooleanPropertyValue, getBoundsShape, getBoundsWithChildrenOnEdge, getCenterlinePoint, getCenterlinePointX, getCenterlinePointY, getChildPresentationElementForContextMenu, getChildrenWithSymbolProperties, getConfiguration, getDiagramPresentationElement, getDiagramSurface, getDrawComparator, getDynamicConfigurations, getElementNumberDisplayMode, getElementsForLinkConnecting, getElementToConnectLink, getElementToMove, getExpectedDataParent, getFillColor, getFont, getFontHeight, getFontRenderContext, getHumanName, getHumanType, getLineColor, getLineWidth, getManipulatedElementAt, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedParent, getManipulatedPresentationElements, getObjectParent, getParent, getPreferredBounds, 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, hasSharedData, initializeAndAutosize, internalBeforeUpdate, internalCreatePropertyChangeListener, internalGetElementsForLinkConnecting, internalGetElementToConnectLink, internalSnapToGrid, internalSnapToGrid, invalidate, isChildVisible, isContentHidden, isCreateElementListener, isDetectable, isDisposed, isLayouting, isNotNull, isParentOf, isParentOf, isPreserveProportionsWhenGrowing, isSelected, isShowElementTypeAsLabel, isSortable, isTestUpdateFlag, isTextEditable, isUseFillColor, isUseFillColorByProperty, isUseGradientForFill, isVisible, isVisibleInDiagram, isVisibleOrShrunken, movePathElementsRecursively, notifyCreated, notifyDiagramFrameSizeChange, notifyRepaintManager, onFind, onFind, onFontChange, paintAdornments, paintAdornmentsBackground, paintChildrenAndAdornments, paintSelfBackground, preDisposeOnUpdate, prepareForFillDrawing, prepareForLineDrawing, prepareForTextDrawing, propertyChange, recreateListeners, registerInSortManager, removeFromSortManager, removeItSelfOnUpdate, resizeParent, sAddPresentationElement, selectChildrenForMoving, selectObjectsForMoving, setAllSelected, setBounds, setCreateElementListener, setDiagramSurface, setFont, setFontProperty, setLayouting, setLineColor, setLineWidth, setLoadedVisibility, setLocation, setLocation, setNeedRecreateListeners, setPropertyManager, setPropertyManagerName, setSelected, setSelected, setSize, setSize, setSize, setStereotypeColor, setStereotypeFont, setStrokeIfNotTheSame, setTestUpdateFlag, setTextColor, setTextColorProperty, setTextEditable, setUseFillColor, setVisible, silentApply, silentApply, simpleSetBounds, snapToGrid, snapToGrid, snapViewToGrid, sortObjectsByX, sortObjectsByY, sSetBounds, sSetLineWidth, sSetLocation, sSetLocation, sSetParent, sSetParentForAll, sSetSize, sSetSize, sSetSize, sSetVisible, tryToDeleteModelElementUponRemoval, update, updateAfterLoad, updateLabelsIgnoringSuspendableLater, updateModelByView, updateModelByViewInternal, updateViewAfterPropertyChange
-
Methods inherited from class com.nomagic.magicdraw.uml.MDElementImpl
accept, addPropertyChangeListener, canAdd, canAdd, canAddChild, canBeDeleted, canDeleteChild, compareTo, createSortKeys, getClassType, getCommandForAppending, getID, getName, 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
-
-
-
-
Field Detail
-
MIN_EXTENSION
public static final int MIN_EXTENSION
Minimal extension of lifeline line.- See Also:
- Constant Field Values
-
MIN_LENGTH
public static final int MIN_LENGTH
Minimal length of lifeline line.- See Also:
- Constant Field Values
-
mHidden
private boolean mHidden
Life line for recursive message must be invisible. but if it is not visible (toolbarVisible)==false then all its children is not drawn.
-
mConcurrent
private boolean mConcurrent
is or isn't lifeline concurrent
-
CROSS_WIDTH
public static final int CROSS_WIDTH
cross width- See Also:
- Constant Field Values
-
CROSS_DELTA
public static final int CROSS_DELTA
- See Also:
- Constant Field Values
-
DELTA_Y
public static final int DELTA_Y
constants for concurrent lifeline dimensions- See Also:
- Constant Field Values
-
DELTA_X
public static final int DELTA_X
- See Also:
- Constant Field Values
-
MANIPULATION_EXTENSION_HEIGHT
private static final int MANIPULATION_EXTENSION_HEIGHT
Invisible extension of the lifeline line to which messages can be connected and objects can be added.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LifeLineLineView
public LifeLineLineView()
Creates a new life line view.
-
LifeLineLineView
public LifeLineLineView(@CheckForNull PresentationElement parent)
Creates and initializes a new life line view from specified parameter.- Parameters:
parent
- this life line view parent object.
-
-
Method Detail
-
getStateInvariants
public java.util.List<StateInvariantView> getStateInvariants()
Gets state invariants lying on this lifeline line.- Returns:
- a list of state invariants.
-
hasStateInvariants
public boolean hasStateInvariants()
Indicates if this life line has any state invariants on it.- Returns:
- true if this life line has any state invariants, false otherwise.
-
getLastStateInvariantPosition
public int getLastStateInvariantPosition()
Calculates y coordinate of this lifeline line to cover the last state invariant lying on it.- Returns:
- last state invariant y position.
-
paintSelf
public void paintSelf(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
-
paintChildren
public void paintChildren(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
- Overrides:
paintChildren
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
internalGetPresentationElementStroke
public java.awt.BasicStroke internalGetPresentationElementStroke(int width)
Description copied from class:PresentationElement
Return a stroke used to paint symbol's main part- Parameters:
width
- a custom stroke width. Other stroke parameters will be specific to symbol- Returns:
- a stroke used to paint symbol's main part
-
dynamicStroke
public java.awt.BasicStroke dynamicStroke(java.awt.BasicStroke stroke)
-
calculateDestroyTimePoint
public java.awt.Point calculateDestroyTimePoint()
-
getMiddlePointX
public int getMiddlePointX()
-
canAddInstance
public boolean canAddInstance(PresentationElement obj)
Checks can this life line view add specified object or not. LifeLineView can add Activation and SequenceBaseMessageView objects.- Overrides:
canAddInstance
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Parameters:
obj
- specified PresentationElement object.- Returns:
- true if this object can add specified object otherwise false
-
canAddChild
public boolean canAddChild(PresentationElement obj)
Description copied from class:PresentationElement
Check of given symbol can be added as child into this symbol.- Overrides:
canAddChild
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Parameters:
obj
- symbol- Returns:
- true if symbol can be added
-
selectPathsForMoving
protected java.util.List<PathElement> selectPathsForMoving(java.util.List<PresentationElement> subPresentationElements)
Description copied from class:PresentationElement
Select paths to move with current symbol from deep structure. Some paths can be connected to current symbol, but owned in some deep child of this symbol.- Parameters:
subPresentationElements
- sub children of this symbol- Returns:
- paths to move together with current symbol
-
setPosition
public void setPosition()
Sets life line view position depending on this object parent position. Moves all links and connection points.
-
moveChild
public void moveChild(PresentationElement view, int dx, int dy)
- Overrides:
moveChild
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
simpleSetBounds
public void simpleSetBounds(java.awt.Rectangle rct, boolean moveChildren, boolean calculatePrefSize)
- Overrides:
simpleSetBounds
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
getNotZoomedTolerance
protected int getNotZoomedTolerance()
-
coversPoint
public boolean coversPoint(int x, int y)
checks if object covers provided point- Returns:
- true if object covers this point
-
needAdjustToPreferred
protected boolean needAdjustToPreferred()
Description copied from class:ShapeElement
Check if shape can be resized to a preferred size. Usually it is true if shape is manipulated and isAutosize is true.- Overrides:
needAdjustToPreferred
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Returns:
- true if need adjustments
-
getManipulationBounds
public java.awt.Rectangle getManipulationBounds(@CheckForNull java.awt.Point relativePoint)
Description copied from class:PresentationElement
Gets manipulation bounds of the symbol. Manipulation bounds might differ from symbol bounds, they can be larger or smaller to help user manipulate the symbol.- Parameters:
relativePoint
- active user point to construct manipulation bounds.- Returns:
- symbol manipulation bounds.
-
getBoundsToRepaint
public java.awt.Rectangle getBoundsToRepaint()
Return bounds of the symbol that must be repainted. throws NoRectangleDefinedException- Returns:
- rectangle of bounds
-
movePathElement
protected void movePathElement(PathElement lnk, PathConnector requestor)
Description copied from class:PathConnector
Calculates position of path element.- Parameters:
lnk
- element which position will be calculated.requestor
- the requestor of this path moving. Implementations may check in order to avoid endless loops.
-
getPresentationElementAt
public PresentationElement getPresentationElementAt(java.awt.Point point)
Searches and returns object that covers given point.- Overrides:
getPresentationElementAt
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Parameters:
point
- given point- Returns:
- PresentationElement that covers specified point
-
getSortedActivations
public java.util.List<ActivationView> getSortedActivations()
- Returns:
- sorted activations by y ascending.
-
getMiddlePointY
public int getMiddlePointY(java.awt.Point relativePoint)
-
clone
public LifeLineLineView clone()
Clones this object.- Specified by:
clone
in interfaceBaseElement
- Overrides:
clone
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Returns:
- copy of this object.
-
getActivationsIterator
public java.util.Iterator<ActivationView> getActivationsIterator()
- Returns:
- all activations
-
getLastActivation
@CheckForNull public ActivationView getLastActivation()
Returns last activation.- Returns:
- Activation object.
-
getLastStateInvariant
@CheckForNull public StateInvariantView getLastStateInvariant()
Returns last state invariant.- Returns:
- state invariant symbol;
-
getActivationAt
@CheckForNull public ActivationView getActivationAt(int y)
Returns Activation at specified point.- Parameters:
y
- point y- Returns:
- activation what covers specified point
-
getClosestActivationAt
@CheckForNull public ActivationView getClosestActivationAt(int ptY)
Finds closest activation on this lifeline line at a given point.- Parameters:
ptY
- Y of point closest to which an activation should be found- Returns:
- closest activation at a given point
-
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.
-
atInsert
public void atInsert()
Description copied from class:PresentationElement
Invalidates object at insert- Specified by:
atInsert
in interfaceBaseElement
-
editName
public void editName(@CheckForNull java.awt.event.KeyEvent evt, @CheckForNull java.util.Map<java.lang.String,java.lang.Boolean> textEditorOptions)
Does nothing -- prevent from editing name box, which is an attribute of container.- Overrides:
editName
in classPresentationElement
- Parameters:
evt
- first key event or nulltextEditorOptions
- boolean options for text editor. Passed when creating text editor withTextEditorFactory
-
internalGetManipulatedChildrenRect
@CheckForNull protected java.awt.Rectangle internalGetManipulatedChildrenRect(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel)
- Overrides:
internalGetManipulatedChildrenRect
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
mustShowContextMenu
public boolean mustShowContextMenu()
-
dispose
public void dispose()
Description copied from class:PresentationElement
disposes ends of links when link is deleted- Specified by:
dispose
in interfaceBaseElement
-
disposeChildren
protected void disposeChildren()
Removes all children from itself. Such removing causes calling dispose for every child.
-
adjustBounds
public void adjustBounds(java.awt.Rectangle r)
Adjust bounds 1. if lifeline is not concurrent, y must be seq bottom 2. (Disabled) if lifeline is concurrent y must be below parent life line upper point disabled because adjust bounds for moving does it 3. if lifeline is concurrent. x must be same as parent x+parent.width- Parameters:
r
- bounds
-
setConcurrent
public void setConcurrent(boolean concurrent)
-
isConcurrent
public boolean isConcurrent()
-
correctInnerSymbolBounds
private void correctInnerSymbolBounds()
Corrects bounds for inner symbols after bounds of this lifeline are changed.
-
correctInnerStateInvariantBounds
public void correctInnerStateInvariantBounds()
Adjust bounds of inner state invariants according bounds of this lifeline.
-
correctStateInvariantBounds
public boolean correctStateInvariantBounds(java.awt.Rectangle bounds)
Adjusts bounds of a given state invariant so that it lies correctly on this lifeline line.- Parameters:
bounds
- bounds of state invariant to adjust.- Returns:
- true if bounds were adjusted, false otherwise.
-
correctInnerActivationBounds
private void correctInnerActivationBounds()
Adjust bounds of inner activations according bounds of this lifeline.
-
preferredDimension
protected void preferredDimension(java.awt.Dimension pref, int locationX, int locationY)
- Overrides:
preferredDimension
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
useParentProperties
public boolean useParentProperties()
Use parent font always- Overrides:
useParentProperties
in classPresentationElement
- Returns:
- true, if element does not have properties and uses parent's.
-
getParentSymbolPropertyOwner
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.
-
getDynamicStyleOwner
@CheckForNull public PresentationElement getDynamicStyleOwner()
-
getUpperPointY
public int getUpperPointY()
-
setHidden
public void setHidden(boolean hidden)
-
isHidden
public boolean isHidden()
-
calculateActivationsBounds
@CheckForNull public java.awt.Rectangle calculateActivationsBounds()
-
adjustBoundsForMoving
public java.awt.Rectangle adjustBoundsForMoving(java.awt.Rectangle rec, java.util.Collection<PresentationElement> movedTogether)
validate bounds for moving- Overrides:
adjustBoundsForMoving
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
calculateAutosizeDimension
public void calculateAutosizeDimension(java.awt.Dimension size, int locationX, int locationY, int prefSizeWidth, int prefSizeHeight)
Description copied from class:ShapeElement
Calculates size of shape to be at least as preferred and fit all children- Overrides:
calculateAutosizeDimension
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Parameters:
size
- sizelocationX
- x locationlocationY
- y locationprefSizeWidth
- preferred size widthprefSizeHeight
- preferred size height
-
getObject
public SequenceLifelineView getObject()
- Returns:
- owner - SequenceLifelineView
-
getAllMessages
public java.util.List<com.nomagic.magicdraw.uml.symbols.paths.SeqBaseMessageView> getAllMessages()
-
getIncomingMessageWithType
@CheckForNull public com.nomagic.magicdraw.uml.symbols.paths.SeqBaseMessageView getIncomingMessageWithType(MessageSort type)
- Parameters:
type
- message type- Returns:
- incoming message of give sort type
-
getElement
public Lifeline getElement()
returns parent data- Specified by:
getElement
in interfaceModelElementProvider
- Overrides:
getElement
in classPresentationElement
- Returns:
- model element of this presentation element.
-
getLifeline
public Lifeline getLifeline()
-
isSnapToGrid
protected boolean isSnapToGrid()
-
sSetElement
public void sSetElement(Element el)
-
setElement
public void setElement(Element el)
-
getActualElement
public Element getActualElement()
Description copied from class:PresentationElement
Because some views returns theirs parent model element, we do not know have they this member set or not.
-
isMovableByMoveManager
public boolean isMovableByMoveManager()
Description copied from class:PresentationElement
Method indicates if object of this instance must be registered in move manager.
-
isUseEntireActivation
public boolean isUseEntireActivation()
-
internalUpdatePresentationElement
protected void internalUpdatePresentationElement()
Description copied from class:PresentationElement
Internal symbol update method for subclassing. It is called from update as part of full update action.- Overrides:
internalUpdatePresentationElement
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- See Also:
PresentationElement.update()
-
getSeqContainer
public com.nomagic.magicdraw.uml.symbols.SequenceObjectViewContainer getSeqContainer()
-
rememberBounds
public void rememberBounds()
Description copied from class:PresentationElement
Remember old bounds
-
rememberBounds
public void rememberBounds(java.awt.Rectangle bounds)
-
removePresentationElement
public void removePresentationElement(PresentationElement element, boolean resizeParent)
- Overrides:
removePresentationElement
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
checkElementParentOnAdd
public boolean checkElementParentOnAdd(PresentationElement child)
-
getChildrenInsets
public com.nomagic.ui.UnmodifiableInsets getChildrenInsets(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel)
- Overrides:
getChildrenInsets
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Parameters:
insetsLevel
- describes the level of insets- Returns:
- shape insets for children
-
getNestedLines
public java.util.List<LifeLineLineView> getNestedLines()
Returns nested lifeline lines.- Returns:
- a list of nested lifeline list or empty list
-
getNestedLinesIterator
public java.util.Iterator<LifeLineLineView> getNestedLinesIterator()
- Returns:
- nested lifeline lines
-
getActivations
public java.util.List<ActivationView> getActivations()
Gets activations placed on this lifeline line.- Returns:
- a list of activations placed on this line.
-
isDestroyed
public boolean isDestroyed()
Gets destroyed value.- Returns:
- destroyed value
-
ensureDestructionOccurrence
public boolean ensureDestructionOccurrence(boolean destruct)
Ensures that a proper destruction occurrence is in the model on this lifeline.- Parameters:
destruct
- indicates whether lifeline is destructed or not.- Returns:
- true if destruction event was changed
-
isNested
public boolean isNested()
Indicates if this lifeline line is nested (not root).- Returns:
- true if this lifeline line is nested, false otherwise.
-
internalLayoutChildren
public void internalLayoutChildren(boolean calculatePrefSize)
- Overrides:
internalLayoutChildren
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
sRemovePresentationElement
public void sRemovePresentationElement(PresentationElement element)
Description copied from class:PresentationElement
Removes given child- Overrides:
sRemovePresentationElement
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Parameters:
element
- child
-
addPresentationElement
public void addPresentationElement(PresentationElement element, int index, boolean resize)
- Overrides:
addPresentationElement
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
addStateInvariantToModel
private void addStateInvariantToModel(PresentationElement view)
If a state invariant symbol is added, makes necessary model modifications.- Parameters:
view
- symbol which was added to this lifeline line.
-
removeStateInvariantFromModel
private void removeStateInvariantFromModel(PresentationElement view)
If a state invariant symbol is removed, makes necessary model modifications.- Parameters:
view
- symbol which was removed from this lifeline line.
-
createBoundsShape
public ContainerShape createBoundsShape(@CheckForNull PathElement path, BoundsTransformation transformation)
Description copied from class:ShapeElement
Creates bounding shape for intersection calculation.- Parameters:
path
- pathtransformation
- transformation- Returns:
- shape
-
-