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, RECTILINEARFields inherited from class com.nomagic.magicdraw.uml.symbols.paths.PathConnector
showsProxyFields 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 TypeMethodDescriptionvoidaccept method for Visitorcom.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShapevoiddispose()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.BaseTreeShapeinternalGetPresentationElementStroke(boolean line, int width) This method must be overridden, if you need to use DASHED_STROKE or another one.booleanbooleanisSimple()voidpaintChildren(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context) protected booleanValidate symbol against model and try to fix it before actual symbol update.voidListens for property change it can be: data was edited text box was editedvoidretrieveDataFromTreeView(com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape tree) voidsetChildElement(NamedElement newChild) Change child element of this containment link.voidSets client for this link.voidsetSimple(boolean simple) voidsetSupplier(PresentationElement shape) Sets supplier end for link.voidsetTreeShape(com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape tree) Sets new tree view.voidsSetSimple(boolean simple) voidsSetTreeShape(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, useOtherExistingElementMethods 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, supportsVisibleConnectedPathElementsIfSelfInvisibleMethods 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, useParentStyleMethods 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, toStringMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.nomagic.magicdraw.uml.BaseElement
canAdd, isSelfChangeableMethods inherited from interface com.nomagic.magicdraw.uml.symbols.LineJumpDrawer
getLineWidthMethods inherited from interface com.nomagic.magicdraw.uml.MDElement
getProjectMethods 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:
asPathElementin interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
createTreeShape
public com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape createTreeShape()- Specified by:
createTreeShapein interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
paintChildren
public void paintChildren(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context) - Specified by:
paintChildrenin classPresentationElement
-
getActualClientDrawPoint
Description copied from class:PathElementReturns actual client side draw point.- Overrides:
getActualClientDrawPointin classPathElement- Returns:
- actual client draw point.
-
getActualSupplierDrawPoint
Description copied from class:PathElementReturns actual supplier side draw point.- Overrides:
getActualSupplierDrawPointin 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:
drawAnchorin interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
accept
accept method for Visitor- Specified by:
acceptin interfaceMDElement- Overrides:
acceptin classPathElement- Parameters:
visitor- - the Visitor- Throws:
Exception
-
setSupplier
Description copied from class:PathElementSets 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:
setSupplierin classPathElement- Parameters:
shape- new supplier.
-
setClient
Description copied from class:PathElementSets client for this link. Changes parent object to the parent of client. Client's parent will always contain incoming links.- Overrides:
setClientin 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:PresentationElementListens for property change it can be: data was edited text box was edited- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classPresentationElement
-
preDisposeOnUpdate
protected boolean preDisposeOnUpdate()Description copied from class:PresentationElementValidate 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:
preDisposeOnUpdatein classPathElement- Returns:
- true if symbol must be disposed
-
isRectilinear
public boolean isRectilinear()- Overrides:
isRectilinearin classPathElement- Returns:
- true if link path style is rectilinear.
-
setSimple
public void setSimple(boolean simple) - Specified by:
setSimplein interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
sSetSimple
public void sSetSimple(boolean simple) - Specified by:
sSetSimplein interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
isSimple
public boolean isSimple()- Specified by:
isSimplein 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:
setTreeShapein 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:
sSetTreeShapein 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:
getTreeShapein interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
dispose
public void dispose()Description copied from class:PathElementDisconnect this link from shapes.- Specified by:
disposein interfaceBaseElement- Overrides:
disposein classPathElement
-
retrieveDataFromTreeView
public void retrieveDataFromTreeView(com.nomagic.magicdraw.uml.symbols.shapes.BaseTreeShape tree) - Specified by:
retrieveDataFromTreeViewin interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-
internalGetPresentationElementStroke
Description copied from class:PathElementThis method must be overridden, if you need to use DASHED_STROKE or another one.- Overrides:
internalGetPresentationElementStrokein 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:
getInternalStrokein interfacecom.nomagic.magicdraw.uml.symbols.paths.TreeShapeConnector
-