Class PathConnector
java.lang.Object
com.nomagic.magicdraw.uml.MDElementImpl
com.nomagic.magicdraw.uml.symbols.PresentationElement
com.nomagic.magicdraw.uml.symbols.paths.PathConnector
- All Implemented Interfaces:
BaseElement,MDElement,ModelElementProvider,NameOwner,PropertyChangeListener,Cloneable,Comparable,EventListener
- Direct Known Subclasses:
PathElement,ShapeElement
This class is base class for presentation elements connectible by some path element.
This means that instance of this class can have incoming or outgoing path elements.
-
Field Summary
FieldsFields 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 TypeMethodDescriptionvoidMethod accepts a visitor, and calls method "visit<class name>(this)" of a visitor.booleanaddConnectedPathElement(PathElement element) Adds a new path element, and recalculates its position.protected booleanvoidclone()protected voidcreateSmartListenerConfig(List<SmartListenerConfig> configurations) voiddispose()disposes ends of links when link is deletedprotected voidfindSymbolForEnd(Element element, Class<? extends PresentationElement> preferredEndType, boolean asClient) Find symbol for the Path end (client or supplier)protected PresentationElementfindSymbolForEnd(Stream<PresentationElement> elements, boolean asClient) getConnectedPathElement(com.dassault_systemes.modeler.foundation.model.ModelElement element) Return a connected path with a given model elementfinal intReturns number of connected path elements.final List<PathElement>Returns connected path elements.getConnectedPathElements(boolean incoming) Returns connected path elements by direction.getConnectedPathElements(boolean incoming, boolean excludeToSelf) Returns connected path elements by direction with an option to exclude paths to selfintfinal booleanfinal voidmovePathElement(PathElement path, boolean notify) Calculates position of a path element.protected abstract voidmovePathElement(PathElement element, PathConnector requestor) Calculates position of a path element.voidbooleanRemoves path element.booleansAddConnectedPathElement(PathElement element) Adds a new path element.protected List<PathElement>selectPathsForMoving(List<PresentationElement> subPresentationElements) Select paths to move with current symbol from deep structure.voidsetParent(PresentationElement parent) Sets parent for this view.voidsetVisibility(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility) Sets element visibility flag.booleansRemoveConnectedPathElement(PathElement element) Removes path element.voidsSetConnectedPathElements(List<PathElement> paths) Sets new path elements.voidsSetVisibility(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility) Sets element visibility flag.protected booleanMethods inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
addPresentationElement, addPresentationElement, addPresentationElementWithoutResize, addProperty, adjustBoundsBeforeChange, adjustChildBounds, adjustChildBoundsForMoving, alwaysShowTooltip, applyProperties, askDeleteDataConfirmation, atInsert, 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, coversPoint, createFillStrategy, createPresentationElementStyle, createPropertyChangeListener, disposeChildren, disposePropertyChangeListener, draw, drawBackground, drawSymbol, drawSymbolBackground, dynamicFillColor, dynamicLineColor, dynamicLineWidth, dynamicLineWidth, dynamicPaintShadow, dynamicStroke, dynamicStroke, dynamicStroke, dynamicStyleFillColor, dynamicStyleLineColor, dynamicStyleTextColor, dynamicStyleTransparency, dynamicStyleTransparency, dynamicStyleValue, dynamicTextAlignment, dynamicTextColor, editName, editName, findOwnerForChildElement, findOwnerForElement, findPresentationElement, firePropertyChange, generateID, getAbstractDiagramPresentationElement, getActualElement, getAdditionalRenderersToNotifyOnPropertiesChange, getAssignableModelElementsClasses, getBounds, getBoundsShape, getBoundsToRepaint, getBoundsWithChildrenOnEdge, getCenterlinePoint, getCenterlinePointX, getCenterlinePointY, getChildPresentationElementForContextMenu, getChildrenWithSymbolProperties, getConfiguration, getDiagramPresentationElement, getDiagramSurface, getDrawComparator, getDynamicConfigurations, getDynamicStyleOwner, getEffectiveStyleDelegate, getEffectiveStyleOwner, getElement, getElementsForRelationshipConnecting, getElementToConnectRelationship, getFillColor, getFont, getFontHeight, getFontRenderContext, getHumanName, getHumanType, getIntersection, getLineColor, getLineWidth, getManipulatedElementAt, getManipulatedElementAt, getManipulatedElementAt, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedParent, getManipulatedPresentationElements, getManipulationBounds, getManipulationPreferredDimension, getMiddlePoint, getMiddlePoint, getMiddlePointX, getMiddlePointX, getMiddlePointY, getMiddlePointY, getMinimumDimension, getModelElement, getModelElementsForRelationshipConnecting, getModelElementToConnectRelationship, getModelElementToMove, getNotCopyBounds, getNotZoomedTolerance, getObjectParent, getOwnStyleDelegate, 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, hasManipulator, hasSharedModelElement, initialize, initializeAndAutosize, internalApplyProperties, internalBeforeUpdate, internalCreatePropertyChangeListener, internalGetBoundsShape, internalGetModelElementsForRelationshipConnecting, internalGetModelElementsForRelationshipConnecting, internalGetModelElementToConnectRelationship, internalGetPresentationElementStroke, internalGetSpecificFont, internalGetSpecificTextColor, internalIsSuitableToConnectRelationship, internalIsSuitableToConnectRelationship, internalSilentApply, internalSnapToGrid, internalSnapToGrid, internalUpdatePresentationElement, intersects, intersects, invalidate, isCanChildrenChangeEdge, isChildVisible, isContentHidden, isCreateElementListener, isDetectable, isDisposed, isLayouting, isMovableByMoveManager, isNotNull, isParentOf, isParentOf, isPreserveProportionsWhenGrowing, isSelected, isShowElementTypeAsLabel, isSnapToGrid, isSortable, isSuitableToConnectRelationship, isTextEditable, isUseFillColor, isUseFillColorByProperty, isUseGradientForFill, isVisible, isVisibleInDiagram, isVisibleOrShrunken, movePathElementsRecursively, mustShowContextMenu, notifyCreated, notifyDiagramFrameSizeChange, notifyRepaintManager, onChildAdd, onChildRemove, onDiagramSurfaceSet, onFind, onFind, onFontChange, onParentChange, paintAdornments, paintAdornmentsBackground, paintChildren, paintChildrenAndAdornments, paintChildrenBackground, paintSelf, paintSelfBackground, preDisposeOnUpdate, prepareForLineDrawing, prepareForShadowDrawing, prepareForTextDrawing, propertyChange, recreateListeners, recursiveAutosize, registerInSortManager, rememberBounds, rememberBounds, removeFromSortManager, removeItSelfOnUpdate, removePresentationElement, resizeParent, sAddPresentationElement, sAddPresentationElement, selectChildrenForMoving, selectObjectsForMoving, setAllSelected, setBounds, 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, simpleSetBounds, snapToGrid, snapToGrid, snapViewToGrid, sortObjectsByX, sortObjectsByY, sRemovePresentationElement, sSetBounds, sSetBounds, sSetElement, sSetLocation, sSetLocation, sSetModelElement, sSetParent, 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.MDElement
getProject
-
Field Details
-
showsProxy
-
-
Constructor Details
-
PathConnector
public PathConnector() -
PathConnector
-
-
Method Details
-
clone
- Specified by:
clonein interfaceBaseElement- Overrides:
clonein classPresentationElement
-
getConnectedPathElements
Returns connected path elements. If element has no path elements returns empty list.- Returns:
- connected path elements. Collection is unmodifiable.
-
getConnectedPathElements
Returns connected path elements by direction.- Parameters:
incoming- true if incoming paths should be selected, false if outgoing.- Returns:
- connected path elements.
-
getConnectedPathElements
Returns connected path elements by direction with an option to exclude paths to self- Parameters:
incoming- true if incoming paths should be selected, false if outgoing.excludeToSelf- true if paths with a source equal to target should not be added to the list, false to include them- Returns:
- connected path elements.
-
getConnectedPathElementCount
@OpenApi public final int getConnectedPathElementCount()Returns number of connected path elements.- Returns:
- number of connected path elements.
-
sSetConnectedPathElements
Sets new path elements.- Parameters:
paths- list of path elements.
-
addConnectedPathElement
Adds a new path element, and recalculates its position.- Parameters:
element- element to be added.- Returns:
- true if an element was added
-
sAddConnectedPathElement
Adds a new path element.- Parameters:
element- element to be added.- Returns:
- true if an element was added
-
sRemoveConnectedPathElement
Removes path element.- Parameters:
element- element to remove.- Returns:
- true if an element was removed
-
removeConnectedPathElement
Removes path element.- Parameters:
link- element to remove.- Returns:
- true if an element was removed
-
movePathElements
public void movePathElements()- Overrides:
movePathElementsin classPresentationElement
-
movePathElement
Calculates position of a path element.- Parameters:
element- element which position will be calculated.requestor- the requestor of this path moving. Implementations may check to avoid endless loops.
-
movePathElement
Calculates position of a path element.- Parameters:
path- path element to calculate.notify- true if both ends of path element should be calculated.
-
dispose
public void dispose()Description copied from class:PresentationElementdisposes ends of links when link is deleted- Specified by:
disposein interfaceBaseElement- Overrides:
disposein classPresentationElement
-
disposeConnectedPaths
protected void disposeConnectedPaths() -
accept
Description copied from interface:MDElementMethod accepts a visitor, and calls method "visit<class name>(this)" of a visitor. See "Visitor" pattern for more details. -
sSetVisibility
public void sSetVisibility(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility) Description copied from class:PresentationElementSets element visibility flag.- Overrides:
sSetVisibilityin classPresentationElement- Parameters:
visibility- flag value
-
supportsVisibleConnectedPathElementsIfSelfInvisible
protected boolean supportsVisibleConnectedPathElementsIfSelfInvisible() -
setVisibility
public void setVisibility(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility) Description copied from class:PresentationElementSets element visibility flag.- Overrides:
setVisibilityin classPresentationElement- Parameters:
visibility- flag value
-
setParent
Description copied from class:PresentationElementSets parent for this view. For adding symbols to other symbols usePresentationElement.addPresentationElement(PresentationElement)orPresentationElement.sAddPresentationElement(PresentationElement)}- Overrides:
setParentin classPresentationElement- Parameters:
parent- parent view
-
getPreferredArrowLength
public int getPreferredArrowLength() -
selectPathsForMoving
Description copied from class:PresentationElementSelect 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:
selectPathsForMovingin classPresentationElement- Parameters:
subPresentationElements- sub children of this symbol- Returns:
- paths to move together with current symbol
-
getConnectedPathElement
@CheckForNull public PathElement getConnectedPathElement(com.dassault_systemes.modeler.foundation.model.ModelElement element) Return a connected path with a given model element- Parameters:
element- element- Returns:
- connected path element of given element
-
checkShowsProxy
protected boolean checkShowsProxy()- Overrides:
checkShowsProxyin classPresentationElement
-
isShowsProxy
public final boolean isShowsProxy()- Overrides:
isShowsProxyin classPresentationElement
-
clearShowsProxy
public void clearShowsProxy()- Overrides:
clearShowsProxyin classPresentationElement
-
findSymbolForEnd
@CheckForNull public PresentationElement findSymbolForEnd(Element element, Class<? extends PresentationElement> preferredEndType, boolean asClient) Find symbol for the Path end (client or supplier)- Parameters:
element- path end elementpreferredEndType- preferred end typeasClient- search for a client element if true- Returns:
- found symbol or null
-
findSymbolForEnd
@CheckForNull protected PresentationElement findSymbolForEnd(Stream<PresentationElement> elements, boolean asClient) -
createSmartListenerConfig
- Overrides:
createSmartListenerConfigin classPresentationElement
-