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 TypeMethodDescriptionvoid
Method accepts a visitor, and calls method "visit<class name>(this)" of a visitor.boolean
addConnectedPathElement
(PathElement element) Adds a new path element, and recalculates its position.protected boolean
void
clone()
protected void
createSmartListenerConfig
(List<SmartListenerConfig> configurations) void
dispose()
disposes ends of links when link is deletedprotected void
findSymbolForEnd
(Element element, Class<? extends PresentationElement> preferredEndType, boolean asClient) Find symbol for the Path end (client or supplier)protected PresentationElement
findSymbolForEnd
(Stream<PresentationElement> elements, boolean asClient) getConnectedPathElement
(com.dassault_systemes.modeler.foundation.model.ModelElement element) Return a connected path with a given model elementfinal int
Returns 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 selfint
final boolean
final void
movePathElement
(PathElement path, boolean notify) Calculates position of a path element.protected abstract void
movePathElement
(PathElement element, PathConnector requestor) Calculates position of a path element.void
boolean
Removes path element.boolean
sAddConnectedPathElement
(PathElement element) Adds a new path element.protected List<PathElement>
selectPathsForMoving
(List<PresentationElement> subPresentationElements) Select paths to move with current symbol from deep structure.void
setParent
(PresentationElement parent) Sets parent for this view.void
setVisibility
(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility) Sets element visibility flag.boolean
sRemoveConnectedPathElement
(PathElement element) Removes path element.void
sSetConnectedPathElements
(List<PathElement> paths) Sets new path elements.void
sSetVisibility
(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility) Sets element visibility flag.protected boolean
Methods 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, 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.MDElement
getProject
-
Field Details
-
showsProxy
-
-
Constructor Details
-
PathConnector
public PathConnector() -
PathConnector
-
-
Method Details
-
clone
- Specified by:
clone
in interfaceBaseElement
- Overrides:
clone
in 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:
movePathElements
in 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:PresentationElement
disposes ends of links when link is deleted- Specified by:
dispose
in interfaceBaseElement
- Overrides:
dispose
in classPresentationElement
-
disposeConnectedPaths
protected void disposeConnectedPaths() -
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. -
sSetVisibility
public void sSetVisibility(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility) Description copied from class:PresentationElement
Sets element visibility flag.- Overrides:
sSetVisibility
in classPresentationElement
- Parameters:
visibility
- flag value
-
supportsVisibleConnectedPathElementsIfSelfInvisible
protected boolean supportsVisibleConnectedPathElementsIfSelfInvisible() -
setVisibility
public void setVisibility(com.nomagic.magicdraw.uml.symbols.PresentationElementVisibility visibility) Description copied from class:PresentationElement
Sets element visibility flag.- Overrides:
setVisibility
in classPresentationElement
- Parameters:
visibility
- flag value
-
setParent
Description copied from class:PresentationElement
Sets parent for this view. For adding symbols to other symbols usePresentationElement.addPresentationElement(PresentationElement)
orPresentationElement.sAddPresentationElement(PresentationElement)
}- Overrides:
setParent
in classPresentationElement
- Parameters:
parent
- parent view
-
getPreferredArrowLength
public int getPreferredArrowLength() -
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 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:
checkShowsProxy
in classPresentationElement
-
isShowsProxy
public final boolean isShowsProxy()- Overrides:
isShowsProxy
in classPresentationElement
-
clearShowsProxy
public void clearShowsProxy()- Overrides:
clearShowsProxy
in 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:
createSmartListenerConfig
in classPresentationElement
-