Class LifeLineLineView
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.LifeLineLineView
- All Implemented Interfaces:
BaseElement
,MDElement
,ModelElementProvider
,com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
,com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider
,NameOwner
,PropertyChangeListener
,Cloneable
,Comparable
,EventListener
@OpenApi
public class LifeLineLineView
extends com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
Life line line in sequence diagram.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
cross widthstatic final int
static final int
constants for concurrent lifeline dimensionsstatic final int
Minimal extension of lifeline line.static final int
Minimal length of lifeline line.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
ConstructorsConstructorDescriptionCreates a new life line view.LifeLineLineView
(PresentationElement parent) Creates and initializes a new life line view from specified parameter. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Method accepts a visitor, and calls method "visit<class name>(this)" of a visitor.void
addPresentationElement
(PresentationElement element, int index, boolean resize) If a specified object not inserted in this container then adds a new object view to the container.void
Adjust bounds 1.adjustBoundsBeforeChange
(Rectangle rec, boolean autosizeOperation, Collection<PresentationElement> movedTogether) validate bounds for movingvoid
atInsert()
Invalidates object at insertvoid
calculateAutosizeDimension
(Dimension size, int locationX, int locationY, int prefSizeWidth, int prefSizeHeight) Calculates size of shape to be at least as preferred and fit all childrenboolean
canAddChild
(PresentationElement symbol) Check of given symbol can be added as child into this symbol.boolean
canAddInstance
(PresentationElement symbol) Checks can this life line view add specified object or not.boolean
clone()
Clones this object.void
Adjust bounds of inner state invariants according bounds of this lifeline.boolean
correctStateInvariantBounds
(Rectangle bounds) Adjusts bounds of a given state invariant so that it lies correctly on this lifeline line.boolean
coversPoint
(int x, int y, com.nomagic.magicdraw.uml.symbols.IntersectionKind kind) checks if object covers provided pointcreateBoundsShape
(PathElement path, BoundsTransformation transformation) Creates bounding shape for intersection calculation.void
dispose()
disposes ends of links when link is deletedprotected void
Removes all children from itself.dynamicStroke
(BasicStroke stroke) void
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.getActivationAt
(int y) Returns Activation at specified point.Gets activations placed on this lifeline line.Because some views returns theirs parent model element, we do not know have they this member set or not.List<com.nomagic.magicdraw.uml.symbols.paths.SeqBaseMessageView>
Return bounds of the symbol that must be repainted.com.nomagic.ui.UnmodifiableInsets
getChildrenInsets
(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel) getClosestActivationAt
(int ptY) Finds closest activation on this lifeline line at a given point.returns parent datacom.nomagic.magicdraw.uml.symbols.paths.SeqBaseMessageView
Returns last activation.Returns last state invariant.int
Calculates y coordinate of this lifeline line to cover the last state invariant lying on it.getManipulationBounds
(Point relativePoint) Gets manipulation bounds of the symbol.int
int
getMiddlePointY
(Point relativePoint) Returns nested lifeline lines.protected int
Returns parent to which this symbol delegates style attributes related functionality.getPresentationElementAt
(Point point, com.nomagic.magicdraw.uml.symbols.IntersectionKind kind) Searches and returns object that covers given point.com.nomagic.magicdraw.uml.symbols.SequenceObjectViewContainer
Gets state invariants lying on this lifeline line.int
boolean
Indicates if this life line has any state invariants on it.protected Rectangle
internalGetManipulatedChildrenRect
(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel) Calculate union area of owned manipulated children added not on a shape borderinternalGetPresentationElementStroke
(int width) Return a stroke used to paint symbol's main partvoid
internalLayoutChildren
(boolean calculatePrefSize) protected void
Internal symbol update method for subclassing.boolean
boolean
Gets destroyed value.boolean
isHidden()
boolean
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
boolean
void
moveChild
(PresentationElement view, int dx, int dy) protected void
movePathElement
(PathElement lnk, PathConnector requestor) Calculates position of a path element.boolean
protected boolean
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
(Dimension pref, int locationX, int locationY) void
Remember old boundsvoid
rememberBounds
(Rectangle bounds) void
removePresentationElement
(PresentationElement element, boolean resizeParent) Removes object view from container.protected List<PathElement>
selectPathsForMoving
(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
Sets life line view position depending on this object parent position.void
simpleSetBounds
(Rectangle rct, boolean moveChildren, boolean calculatePrefSize) Sets bounds for this container shape view and all its componentsvoid
Removes given childvoid
sSetElement
(Element el) boolean
Use parent font alwaysMethods 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, getDefaultChildrenInsets, getLayoutHelper, getLayoutHelperClone, getManipulatedElementAt, getManipulationPreferredDimension, getPresentationElementIndex, getPresentationElements, getProxyPresentationElementsStream, getRemovableChildren, hasManipulatedChildrenIncludingIndirect, hasManipulatedShapesNotOnEdge, hasManipulatedShapesOnEdge, hasManipulatedShapesOnEdge, internalAddIndirectManipulatedChildrenRect, internalAppendChildRect, internalGetChildAt, internalGetIndirectManipulatedChildrenRect, internalGetManipulatedChildrenRect, internalGetSelfManipulationPreferredSize, internalSetChildren, isCanChildrenChangeEdge, isCanMoveChildren, isChildMovable, layoutChildren, moveChildren, paintChildrenBackground, prefDimensionByManipulatedChildren, recursiveAutosize, removePresentationElement, sAddPresentationElement, setBounds, setBounds, setCanMoveChildren, setDummyResizeMode, setFillColor, setFillColorForChildren, 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, getSizeForDrawing, getSuspendShapeAutoResizeMode, hasManipulator, initialize, internalApplyProperties, internalGetBoundsShape, internalSilentApply, intersects, isAutosized, isCenterlineInner, isChildLayoutable, isHorizontalCenterlineProvider, isOnEdge, isShapeOnEdge, 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, supportsVisibleConnectedPathElementsIfSelfInvisible
Methods inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
addPresentationElement, addProperty, adjustChildBounds, alwaysShowTooltip, applyProperties, askDeleteDataConfirmation, atInsertChildren, autosizeAndResizeManipulatedParent, beforeDelete, boundsChanged, boundsChanged, canAddChild, canAddInstance, canBeDisposedOnUpdate, canChangeElementOwner, canChangeParent, canChangeParent, canFill, changeProperties, checkProxyVisibility, childrenForMoving, collectSubManipulatedElements, collectSubPresentationElements, collectSubPresentationElements, collectSubShowingPresentationElements, coversPoint, createFillStrategy, createPresentationElementStyle, createPropertyChangeListener, disposePropertyChangeListener, draw, drawBackground, drawSymbol, drawSymbolBackground, dynamicFillColor, dynamicLineColor, dynamicLineWidth, dynamicLineWidth, dynamicPaintShadow, dynamicStroke, dynamicStroke, dynamicStyleFillColor, dynamicStyleLineColor, dynamicStyleTextColor, dynamicStyleTransparency, dynamicStyleTransparency, dynamicStyleValue, dynamicTextAlignment, dynamicTextColor, editName, findOwnerForChildElement, findOwnerForElement, findPresentationElement, firePropertyChange, generateID, getAbstractDiagramPresentationElement, getAdditionalRenderersToNotifyOnPropertiesChange, getAssignableModelElementsClasses, getBoundsShape, getBoundsWithChildrenOnEdge, getCenterlinePoint, getCenterlinePointX, getCenterlinePointY, getChildPresentationElementForContextMenu, getChildrenWithSymbolProperties, getConfiguration, getDiagramPresentationElement, getDiagramSurface, getDrawComparator, getDynamicConfigurations, getEffectiveStyleDelegate, getEffectiveStyleOwner, getElementsForRelationshipConnecting, getElementToConnectRelationship, getFillColor, getFont, getFontHeight, getFontRenderContext, getHumanName, getHumanType, getLineColor, getLineWidth, getManipulatedElementAt, getManipulatedElementAt, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedParent, getManipulatedPresentationElements, getModelElement, getModelElementsForRelationshipConnecting, getModelElementToConnectRelationship, getModelElementToMove, getObjectParent, getOwnStyleDelegate, getParent, getPreferredBounds, 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, internalGetSpecificFont, internalGetSpecificTextColor, internalIsSuitableToConnectRelationship, internalIsSuitableToConnectRelationship, internalSnapToGrid, internalSnapToGrid, intersects, invalidate, isChildVisible, isContentHidden, isCreateElementListener, isDetectable, isDisposed, isLayouting, 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, removeFromSortManager, removeItSelfOnUpdate, resizeParent, sAddPresentationElement, selectChildrenForMoving, selectObjectsForMoving, setAllSelected, setBounds, setCreateElementListener, setFont, setLayouting, setLineColor, setLineWidth, setLoadedVisibility, setLocation, setLocation, setModelElement, setNeedRecreateListeners, setPropertyManagerName, setSelected, setSelected, setSize, setSize, setSize, setTextColor, setTextEditable, setUseFillColor, setVisible, silentApply, silentApply, simpleSetBounds, snapToGrid, snapToGrid, snapViewToGrid, sortObjectsByX, sortObjectsByY, sSetBounds, 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, getName, 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
-
Field Details
-
MIN_EXTENSION
public static final int MIN_EXTENSIONMinimal extension of lifeline line.- See Also:
-
MIN_LENGTH
public static final int MIN_LENGTHMinimal length of lifeline line.- See Also:
-
CROSS_WIDTH
public static final int CROSS_WIDTHcross width- See Also:
-
CROSS_DELTA
public static final int CROSS_DELTA- See Also:
-
DELTA_Y
public static final int DELTA_Yconstants for concurrent lifeline dimensions- See Also:
-
DELTA_X
public static final int DELTA_X- See Also:
-
-
Constructor Details
-
LifeLineLineView
public LifeLineLineView()Creates a new life line view. -
LifeLineLineView
Creates and initializes a new life line view from specified parameter.- Parameters:
parent
- this life line view parent object.
-
-
Method Details
-
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) - Specified by:
paintSelf
in classPresentationElement
-
paintChildren
public void paintChildren(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context) - Overrides:
paintChildren
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
internalGetPresentationElementStroke
Description copied from class:PresentationElement
Return a stroke used to paint symbol's main part- Overrides:
internalGetPresentationElementStroke
in classPresentationElement
- 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
- Overrides:
dynamicStroke
in classPresentationElement
-
calculateDestroyTimePoint
-
getMiddlePointX
public int getMiddlePointX()- Overrides:
getMiddlePointX
in classShapeElement
-
canAddInstance
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:
symbol
- specified PresentationElement object.- Returns:
- true if this object can add specified object otherwise false
-
canAddChild
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:
symbol
- symbol- Returns:
- true if symbol can be added
-
selectPathsForMoving
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.- Overrides:
selectPathsForMoving
in classPathConnector
- 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
- Overrides:
moveChild
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
simpleSetBounds
Description copied from class:com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
Sets bounds for this container shape view and all its components- Overrides:
simpleSetBounds
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Parameters:
rct
- container shape view bounding rectanglemoveChildren
- if moveChildren equals true then this method callscalculatePrefSize
- calculate preferred size
-
getNotZoomedTolerance
protected int getNotZoomedTolerance()- Overrides:
getNotZoomedTolerance
in classPresentationElement
-
coversPoint
public boolean coversPoint(int x, int y, com.nomagic.magicdraw.uml.symbols.IntersectionKind kind) checks if object covers provided point- Overrides:
coversPoint
in classShapeElement
- 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 adjustments are necessary
-
getManipulationBounds
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.- Overrides:
getManipulationBounds
in classPresentationElement
- Parameters:
relativePoint
- active user point to construct manipulation bounds.- Returns:
- symbol manipulation bounds.
-
getBoundsToRepaint
Return bounds of the symbol that must be repainted. throws NoRectangleDefinedException- Overrides:
getBoundsToRepaint
in classPresentationElement
- Returns:
- rectangle of bounds
-
movePathElement
Description copied from class:PathConnector
Calculates position of a path element.- Overrides:
movePathElement
in classShapeElement
- Parameters:
lnk
- element which position will be calculated.requestor
- the requestor of this path moving. Implementations may check to avoid endless loops.
-
getPresentationElementAt
public PresentationElement getPresentationElementAt(Point point, com.nomagic.magicdraw.uml.symbols.IntersectionKind kind) Searches and returns object that covers given point.- Overrides:
getPresentationElementAt
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Parameters:
point
- given pointkind
- intersection kind to check for- Returns:
- PresentationElement that covers specified point
-
getSortedActivations
- Returns:
- sorted activations by y ascending.
-
getMiddlePointY
- Overrides:
getMiddlePointY
in classShapeElement
-
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
- Returns:
- all activations
-
getLastActivation
Returns last activation.- Returns:
- Activation object.
-
getLastStateInvariant
Returns last state invariant.- Returns:
- state invariant symbol;
-
getActivationAt
Returns Activation at specified point.- Parameters:
y
- point y- Returns:
- activation what covers specified point
-
getClosestActivationAt
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
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. -
atInsert
public void atInsert()Description copied from class:PresentationElement
Invalidates object at insert- Specified by:
atInsert
in interfaceBaseElement
- Overrides:
atInsert
in classPresentationElement
-
editName
public void editName(@CheckForNull KeyEvent evt, @CheckForNull Map<String, 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 Rectangle internalGetManipulatedChildrenRect(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel) Description copied from class:com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
Calculate union area of owned manipulated children added not on a shape border- Overrides:
internalGetManipulatedChildrenRect
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Parameters:
insetsLevel
- include insets if shape has manipulated children- Returns:
- rectangle of children or null if there are no children
-
mustShowContextMenu
public boolean mustShowContextMenu()- Overrides:
mustShowContextMenu
in classPresentationElement
-
dispose
public void dispose()Description copied from class:PresentationElement
disposes ends of links when link is deleted- Specified by:
dispose
in interfaceBaseElement
- Overrides:
dispose
in classPathConnector
-
disposeChildren
protected void disposeChildren()Removes all children from itself. Such removing causes calling dispose for every child.- Overrides:
disposeChildren
in classPresentationElement
-
adjustBounds
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- Overrides:
adjustBounds
in classShapeElement
- Parameters:
r
- bounds
-
setConcurrent
public void setConcurrent(boolean concurrent) -
isConcurrent
public boolean isConcurrent() -
correctInnerStateInvariantBounds
public void correctInnerStateInvariantBounds()Adjust bounds of inner state invariants according bounds of this lifeline. -
correctStateInvariantBounds
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.
-
preferredDimension
- Overrides:
preferredDimension
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
useParentStyle
public boolean useParentStyle()Use parent font always- 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
-
getUpperPointY
public int getUpperPointY() -
setHidden
public void setHidden(boolean hidden) -
isHidden
public boolean isHidden() -
calculateActivationsBounds
-
adjustBoundsBeforeChange
public Rectangle adjustBoundsBeforeChange(Rectangle rec, boolean autosizeOperation, Collection<PresentationElement> movedTogether) validate bounds for moving- Overrides:
adjustBoundsBeforeChange
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
calculateAutosizeDimension
public void calculateAutosizeDimension(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
- Returns:
- owner - SequenceLifelineView
-
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
returns parent data- Specified by:
getElement
in interfaceModelElementProvider
- Overrides:
getElement
in classPresentationElement
- Returns:
- model element of this presentation element.
-
getLifeline
-
isSnapToGrid
protected boolean isSnapToGrid()- Overrides:
isSnapToGrid
in classShapeElement
-
sSetElement
- Overrides:
sSetElement
in classPresentationElement
-
setElement
- Overrides:
setElement
in classPresentationElement
-
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.- Overrides:
getActualElement
in classPresentationElement
-
isMovableByMoveManager
public boolean isMovableByMoveManager()Description copied from class:PresentationElement
Method indicates if object of this instance must be registered in move manager.- Overrides:
isMovableByMoveManager
in classPresentationElement
- See Also:
-
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:
-
getSeqContainer
public com.nomagic.magicdraw.uml.symbols.SequenceObjectViewContainer getSeqContainer() -
rememberBounds
public void rememberBounds()Description copied from class:PresentationElement
Remember old bounds- Overrides:
rememberBounds
in classPresentationElement
-
rememberBounds
- Overrides:
rememberBounds
in classPresentationElement
-
removePresentationElement
Description copied from class:com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
Removes object view from container.- Overrides:
removePresentationElement
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Parameters:
element
- object to removeresizeParent
- resize parent
-
checkElementOwnerOnChange
- Overrides:
checkElementOwnerOnChange
in classPresentationElement
-
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
Returns nested lifeline lines.- Returns:
- a list of nested lifeline list or empty list
-
getNestedLinesIterator
- Returns:
- nested lifeline lines
-
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
Description copied from class:PresentationElement
Removes given child- Overrides:
sRemovePresentationElement
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Parameters:
element
- child
-
addPresentationElement
Description copied from class:com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
If a specified object not inserted in this container then adds a new object view to the container.- Overrides:
addPresentationElement
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
- Parameters:
element
- new PresentationElement objectindex
- index to add atresize
- resize parent
-
createBoundsShape
public ContainerShape createBoundsShape(@CheckForNull PathElement path, BoundsTransformation transformation) Description copied from class:ShapeElement
Creates bounding shape for intersection calculation.- Overrides:
createBoundsShape
in classShapeElement
- Parameters:
path
- pathtransformation
- transformation- Returns:
- shape
-