Class ContainmentLinkView
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.paths.PathElement
com.nomagic.magicdraw.uml.symbols.paths.ContainmentLinkView
- All Implemented Interfaces:
BaseElement
,MDElement
,ModelElementProvider
,com.nomagic.magicdraw.uml.symbols.LineJumpDrawer
,com.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
,com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider
,NameOwner
,PropertyChangeListener
,Cloneable
,Comparable
,EventListener
@OpenApi
public class ContainmentLinkView
extends PathElement
implements com.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
Containment relationship symbol
-
Field Summary
Fields inherited from class com.nomagic.magicdraw.uml.symbols.paths.PathElement
BEZIER, LINE_STYLE, OBLIQUE, RECTILINEAR
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept method for Visitorcom.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape
void
dispose()
Disconnect this link from shapes.drawAnchor
(Graphics2D g, int ix1, int iy1, int ix2, int iy2, int size, boolean fill, Color fillColor) Returns actual client side draw point.Returns actual supplier side draw point.getInternalStroke
(boolean line, int width) com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape
internalGetPresentationElementStroke
(boolean line, int width) This method must be overridden, if you need to use DASHED_STROKE or another one.boolean
boolean
isSimple()
void
paintChildren
(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context) protected boolean
Validate symbol against model and try to fix it before actual symbol update.void
Listens for property change it can be: data was edited text box was editedvoid
retrieveDataFromTreeView
(com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape tree) void
setChildElement
(NamedElement newChild) Change child element of this containment link.void
Sets client for this link.void
setSimple
(boolean simple) void
setSupplier
(PresentationElement shape) Sets supplier end for link.void
setTreeShape
(com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape tree) Sets new tree view.void
sSetSimple
(boolean simple) void
sSetTreeShape
(com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape tree) Sets new tree view.Methods inherited from class com.nomagic.magicdraw.uml.symbols.paths.PathElement
addConnectedPathElement, addLineJumps, applyStrokeForLineDrawing, askDeleteDataConfirmation, atInsert, breakPointsChanged, cacheActualDrawPoints, cacheValues, calculatePathBounds, canChangeClient, canChangeLineStyle, canChangeSupplier, canClearBreakPoints, clearClientTranslation, clearRegisteredLineJumpInfos, clearSupplierTranslation, clone, connectModelElement, coversPoint, createFillStrategy, createSmartListenerConfig, draw, draw, dynamicPathIcon, dynamicPathIcon, findOwnerForElement, findOwnerForElement, getAllBreakPoints, getBezierPath, getBezierPath, getBounds, getBoundsToRepaint, getBreakPoint, getBreakPointCount, getBreakPoints, getCachedActualClientDrawPoint, getCachedActualSupplierDrawPoint, getClient, getClientConnectionType, getClientDrawPoint, getClientPoint, getCustomClientPoint, getCustomStereotypeIcon, getCustomSupplierPoint, getDefaultParentForData, getIndexOfCoveredPath, getIndexOfCoveredPathInternal, getIntersection, getLineJumpStartAngle, getLinkLineStyle, getMiddlePoint, getNearestLinkPart, getNearestPoint, getNewBreakPointIndex, getNewPointByTheLink, getNextEnd, getNextPoint, getNotCopyBounds, getOwnStyleDelegate, getPathIcon, getPathPainter, getPaths, getPointOnPath, getPreviousPoint, getSupplier, getSupplierConnectionType, getSupplierDrawPoint, getSupplierPoint, getSuspendShapeAutoResizeMode, handleRemoveBreaksAction, hasClientPoint, hasManipulator, hasSharedModelElement, hasSupplierPoint, internalApplyProperties, internalGetBoundsShape, internalGetPresentationElementStroke, internalGetPresentationElementStroke, internalMovedAsToSelf, internalSilentApply, internalSnapToGrid, intersects, intersectsInternal, isAlwaysToSelf, isBezier, isBezierIntersects, isBreakable, isConnectable, isConnectable, isDrawLineJumps, isFixed, isLinkLineStyleDefined, isOblique, isRounded, isSmartLayoutNeeded, isSnapToGrid, isToSelf, isUseFlowLayoutLogic, isVertical, makeRectilinear, makeRectilinear, moveLinkToClientParent, movePathElement, needsToMoveOtherEnd, nextStyle, notifyBreakPointsChanged, notifyRepaintManager, notifyRepaintManager, optimizeLoops, paintSelf, prepareForLineDrawing, registerLineJumpInfos, registerLineJumpStartAngle, removeBreakPoints, removeBreaks, removeRedundantBreakPoints, removeUnnecessaryBreakPoints, resetCache, resizeParent, sAddBreakPoint, sClearBreakPoints, setBounds, setBreakable, setBreakPoints, setCachedPathBounds, setClientPoint, setCustomClientPoint, setCustomSupplierPoint, setLineJumpPlace, setLinkLineStyle, setPathPainter, setRectilinear, setRounded, setSmartLayoutNeeded, setSupplierPoint, setSuspendShapeAutoResizeMode, simpleSetBounds, sSetBounds, sSetBreakable, sSetBreakPoint, sSetBreakPoints, sSetClient, sSetClientPoint, sSetLinkLineStyle, sSetParent, sSetRounded, sSetSupplier, sSetSupplierPoint, sSetSuspendShapeAutoResizeMode, swapEnds, translateClientPoint, translateSupplierPoint, useOtherExistingElement
Methods inherited from class com.nomagic.magicdraw.uml.symbols.paths.PathConnector
checkShowsProxy, clearShowsProxy, disposeConnectedPaths, findSymbolForEnd, findSymbolForEnd, getConnectedPathElement, getConnectedPathElementCount, getConnectedPathElements, getConnectedPathElements, getConnectedPathElements, getPreferredArrowLength, isShowsProxy, movePathElement, movePathElements, removeConnectedPathElement, sAddConnectedPathElement, selectPathsForMoving, setParent, setVisibility, sRemoveConnectedPathElement, sSetConnectedPathElements, sSetVisibility, supportsVisibleConnectedPathElementsIfSelfInvisible
Methods inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
addPresentationElement, addPresentationElement, addPresentationElementWithoutResize, addProperty, adjustBoundsBeforeChange, adjustChildBounds, adjustChildBoundsForMoving, alwaysShowTooltip, applyProperties, atInsertChildren, autosizeAndResizeManipulatedParent, autosizeAndResizeParent, beforeDelete, boundsChanged, boundsChanged, canAddChild, canAddChild, canAddInstance, canAddInstance, canBeDisposedOnUpdate, canChangeElementOwner, canChangeParent, canChangeParent, canFill, canHavePaths, changeProperties, checkElementOwnerOnChange, checkProxyVisibility, childrenForMoving, collectSubManipulatedElements, collectSubPresentationElements, collectSubPresentationElements, collectSubShowingPresentationElements, coversPoint, createPresentationElementStyle, createPropertyChangeListener, disposeChildren, disposePropertyChangeListener, drawBackground, drawSymbol, drawSymbolBackground, dynamicFillColor, dynamicLineColor, dynamicLineWidth, dynamicLineWidth, dynamicPaintShadow, dynamicStroke, dynamicStroke, dynamicStroke, dynamicStyleFillColor, dynamicStyleLineColor, dynamicStyleTextColor, dynamicStyleTransparency, dynamicStyleTransparency, dynamicStyleValue, dynamicTextAlignment, dynamicTextColor, editName, editName, findOwnerForChildElement, findPresentationElement, firePropertyChange, generateID, getAbstractDiagramPresentationElement, getActualElement, getAdditionalRenderersToNotifyOnPropertiesChange, getAssignableModelElementsClasses, getBoundsShape, getBoundsWithChildrenOnEdge, getCenterlinePoint, getCenterlinePointX, getCenterlinePointY, getChildPresentationElementForContextMenu, getChildrenWithSymbolProperties, getConfiguration, getDiagramPresentationElement, getDiagramSurface, getDrawComparator, getDynamicConfigurations, getDynamicStyleOwner, getEffectiveStyleDelegate, getEffectiveStyleOwner, getElement, getElementsForRelationshipConnecting, getElementToConnectRelationship, getFillColor, getFont, getFontHeight, getFontRenderContext, getHumanName, getHumanType, getLineColor, getLineWidth, getManipulatedElementAt, getManipulatedElementAt, getManipulatedElementAt, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedParent, getManipulatedPresentationElements, getManipulationBounds, getManipulationPreferredDimension, getMiddlePoint, getMiddlePointX, getMiddlePointX, getMiddlePointY, getMiddlePointY, getMinimumDimension, getModelElement, getModelElementsForRelationshipConnecting, getModelElementToConnectRelationship, getModelElementToMove, getNotZoomedTolerance, getObjectParent, getParent, getParentSymbolStyleOwner, getPreferredBounds, getPreferredDimension, getPreferredDimensionForAutosize, getPreferredSize, getPresentationElementAt, getPresentationElementAt, getPresentationElementAt, getPresentationElementAt, getPresentationElementAt, getPresentationElementCount, getPresentationElementIndex, getPresentationElements, 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, initialize, initializeAndAutosize, internalBeforeUpdate, internalCreatePropertyChangeListener, internalGetModelElementsForRelationshipConnecting, internalGetModelElementsForRelationshipConnecting, internalGetModelElementToConnectRelationship, internalGetSpecificFont, internalGetSpecificTextColor, internalIsSuitableToConnectRelationship, internalIsSuitableToConnectRelationship, internalSnapToGrid, internalUpdatePresentationElement, intersects, invalidate, isCanChildrenChangeEdge, isChildVisible, isContentHidden, isCreateElementListener, isDetectable, isDisposed, isLayouting, isMovableByMoveManager, isNotNull, isParentOf, isParentOf, isPreserveProportionsWhenGrowing, isSelected, isShowElementTypeAsLabel, isSortable, isSuitableToConnectRelationship, isTextEditable, isUseFillColor, isUseFillColorByProperty, isUseGradientForFill, isVisible, isVisibleInDiagram, isVisibleOrShrunken, movePathElementsRecursively, mustShowContextMenu, notifyCreated, notifyDiagramFrameSizeChange, onChildAdd, onChildRemove, onDiagramSurfaceSet, onFind, onFind, onFontChange, onParentChange, paintAdornments, paintAdornmentsBackground, paintChildrenAndAdornments, paintChildrenBackground, paintSelfBackground, prepareForLineDrawing, prepareForShadowDrawing, prepareForTextDrawing, recreateListeners, recursiveAutosize, registerInSortManager, rememberBounds, rememberBounds, removeFromSortManager, removeItSelfOnUpdate, removePresentationElement, sAddPresentationElement, sAddPresentationElement, selectChildrenForMoving, selectObjectsForMoving, setAllSelected, setBounds, setCreateElementListener, setDummyResizeMode, setElement, setFillColor, setFont, setLayouting, setLineColor, setLineWidth, setLoadedVisibility, setLocation, setLocation, setModelElement, setNeedRecreateListeners, setPresentationElements, setPropertyManagerName, setSelected, setSelected, setSize, setSize, setSize, setTextColor, setTextEditable, setUseFillColor, setVisible, silentApply, silentApply, simpleSetBounds, snapToGrid, snapToGrid, snapViewToGrid, sortObjectsByX, sortObjectsByY, sRemovePresentationElement, sSetBounds, sSetElement, sSetLocation, sSetLocation, sSetModelElement, sSetParentForAll, sSetPresentationElements, sSetSize, sSetSize, sSetSize, sSetVisible, tryToDeleteModelElementUponRemoval, update, updateAfterLoad, updateLabelsIgnoringSuspendableLater, updateLater, updateModelByView, updateModelByViewInternal, updateViewAfterPropertyChange, useParentProperties, useParentStyle
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, toString
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.LineJumpDrawer
getLineWidth
Methods inherited from interface com.nomagic.magicdraw.uml.MDElement
getProject
Methods inherited from interface com.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
getClassType, getID, prepareForLineDrawing, updateTreeShapeByTreeShapeConnector
-
Constructor Details
-
ContainmentLinkView
-
ContainmentLinkView
public ContainmentLinkView()
-
-
Method Details
-
asPathElement
- Specified by:
asPathElement
in interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
createTreeShape
public com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape createTreeShape()- Specified by:
createTreeShape
in interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
paintChildren
public void paintChildren(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context) - Specified by:
paintChildren
in classPresentationElement
-
getActualClientDrawPoint
Description copied from class:PathElement
Returns actual client side draw point.- Overrides:
getActualClientDrawPoint
in classPathElement
- Returns:
- actual client draw point.
-
getActualSupplierDrawPoint
Description copied from class:PathElement
Returns actual supplier side draw point.- Overrides:
getActualSupplierDrawPoint
in classPathElement
- Returns:
- actual supplier draw point.
-
drawAnchor
public Point drawAnchor(Graphics2D g, int ix1, int iy1, int ix2, int iy2, int size, boolean fill, Color fillColor) - Specified by:
drawAnchor
in interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
accept
accept method for Visitor- Specified by:
accept
in interfaceMDElement
- Overrides:
accept
in classPathElement
- Parameters:
visitor
- - the Visitor- Throws:
Exception
-
setSupplier
Description copied from class:PathElement
Sets supplier end for link. Removes this link from old shape. Inserts this link to new shape. Method also sets supplier point to the middle point of shape.- Overrides:
setSupplier
in classPathElement
- Parameters:
shape
- new supplier.
-
setClient
Description copied from class:PathElement
Sets client for this link. Changes parent object to the parent of client. Client's parent will always contain incoming links.- Overrides:
setClient
in classPathElement
- Parameters:
obj
- shape to check
-
setChildElement
Change child element of this containment link. Registers listener to a new child (removes listener from the old one)- Parameters:
newChild
- child
-
propertyChange
Description copied from class:PresentationElement
Listens for property change it can be: data was edited text box was edited- Specified by:
propertyChange
in interfacePropertyChangeListener
- Overrides:
propertyChange
in classPresentationElement
-
preDisposeOnUpdate
protected boolean preDisposeOnUpdate()Description copied from class:PresentationElement
Validate symbol against model and try to fix it before actual symbol update. If symbol is not valid and can not be fixed, request symbol dispose by returning true. Check if symbol should be disposed, because model does not correspond to symbol. This may happen for example if path supplier or client in model is changed, but path still is connected to symbols of old ends.Method also can fix symbol if possible - for example reconnect path to other symbols in diagram and etc.
- Overrides:
preDisposeOnUpdate
in classPathElement
- Returns:
- true if symbol must be disposed
-
isRectilinear
public boolean isRectilinear()- Overrides:
isRectilinear
in classPathElement
- Returns:
- true if link path style is rectilinear.
-
setSimple
public void setSimple(boolean simple) - Specified by:
setSimple
in interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
sSetSimple
public void sSetSimple(boolean simple) - Specified by:
sSetSimple
in interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
isSimple
public boolean isSimple()- Specified by:
isSimple
in interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
setTreeShape
public void setTreeShape(com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape tree) Sets new tree view.- Specified by:
setTreeShape
in interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
- Parameters:
tree
- new tree of this link.
-
sSetTreeShape
public void sSetTreeShape(com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape tree) Sets new tree view.- Specified by:
sSetTreeShape
in interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
- Parameters:
tree
- new tree of this link.
-
getTreeShape
@CheckForNull public com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape getTreeShape()- Specified by:
getTreeShape
in interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
dispose
public void dispose()Description copied from class:PathElement
Disconnect this link from shapes.- Specified by:
dispose
in interfaceBaseElement
- Overrides:
dispose
in classPathElement
-
retrieveDataFromTreeView
public void retrieveDataFromTreeView(com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape tree) - Specified by:
retrieveDataFromTreeView
in interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
internalGetPresentationElementStroke
Description copied from class:PathElement
This method must be overridden, if you need to use DASHED_STROKE or another one.- Overrides:
internalGetPresentationElementStroke
in classPathElement
- Parameters:
line
- true if for line, false if for adornments alsowidth
- width- Returns:
- the stroke for line drawing ( by default SOLID_STROKE).
-
getInternalStroke
- Specified by:
getInternalStroke
in interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-