Class PathElement
java.lang.Object
com.nomagic.magicdraw.uml.core.impl.MDElementImpl
com.nomagic.magicdraw.uml.symbols.PresentationElement
com.nomagic.magicdraw.uml.symbols.paths.PathConnector
com.nomagic.magicdraw.uml.symbols.paths.PathElement
- All Implemented Interfaces:
com.dassault_systemes.modeler.foundation.diagram.symbols.LineJumpDrawer,com.dassault_systemes.modeler.foundation.diagram.symbols.shapes.SuspendShapeAutoResizeModeProvider,com.dassault_systemes.modeler.foundation.project.ModelElementProjectProvider,BaseElement,MDElement,ModelElementProvider,NameOwner,PropertyChangeListener,Cloneable,Comparable,EventListener
- Direct Known Subclasses:
com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView,ContainmentLinkView,LinkAttributeView,NoteAnchorView
@OpenApi
public abstract class PathElement
extends PathConnector
implements com.dassault_systemes.modeler.foundation.diagram.symbols.LineJumpDrawer, com.dassault_systemes.modeler.foundation.diagram.symbols.shapes.SuspendShapeAutoResizeModeProvider
Base class for all path kinds of symbols.
Path is a symbol that connects two other symbols as a graphical path.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringBezier path line style.All possible path line styles.static final StringOblique path line style.static final StringPath line style with rectilinear (90 degrees) breakpoint corners.Fields inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
DASHED_STROKE, DOTTED_STROKE, SOLID_STROKE -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(BasePresentationElementVisitor visitor) Returns a break points list with added supplier and client end point in the list as well.Returns break points of the path.Returns client of the path.final PointReturns point where path connects client end's element.getPointOnPath(Point supplierPoint, Point clientPoint, List<Point> breakpoints, double coefficient) Returns supplier of the path.final PointReturns point where path connects supplier end's element.final booleanisConnectable(PresentationElement supplier, PresentationElement client) Checks if this path can connect given two elements.Methods inherited from class com.nomagic.magicdraw.uml.symbols.paths.PathConnector
getConnectedPathElementCount, getConnectedPathElements, getConnectedPathElements, getConnectedPathElementsMethods inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
collectSubManipulatedElements, editName, editName, getBoundsShape, getElement, getManipulatedParent, getManipulatedPresentationElements, getObjectParent, getParent, getPreferredDimension, getPresentationElements, getPresentationElementStroke, getPresentationElementStroke, getSelected, getStroke, getStroke, getStroke, getStroke, getStroke, getStroke, hasManipulatedPresentationElements, isSelected, onFind, onFind, setAllSelected, setSelected, setSelected, useParentStyleMethods inherited from class com.nomagic.magicdraw.uml.core.impl.MDElementImpl
addPropertyChangeListener, canAdd, canAddChild, canBeDeleted, canDeleteChild, compareTo, createSortKeys, getClassType, getID, getName, getResourceID, getSortKeys, hasListeners, isEditable, removeAllParents, removeAllPropertyChangeListeners, removePropertyChangeListener, setID, 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.dassault_systemes.modeler.foundation.diagram.symbols.LineJumpDrawer
getLineWidth
-
Field Details
-
RECTILINEAR
Path line style with rectilinear (90 degrees) breakpoint corners.- See Also:
-
OBLIQUE
Oblique path line style.- See Also:
-
BEZIER
Bezier path line style.- See Also:
-
LINE_STYLE
All possible path line styles.
-
-
Method Details
-
getBreakPoints
Returns break points of the path. The order of break points is from supplier to the client path's end. Use PresentationElementsManager to change the break points for the path.- Returns:
- break points list.Points in the list are not cloned, so do not modify them directly. The List is unmodifiable.
-
getAllBreakPoints
Returns a break points list with added supplier and client end point in the list as well. Use PresentationElementsManager to change the break points for the path.- Returns:
- supplier point + break points + client point. Points in the list are not cloned, so do not modify them directly. The List is modifiable.
-
getSupplierPoint
Returns point where path connects supplier end's element.- Returns:
- supplier connection point. This method returns not cloned point, so do not modify it directly.
-
getClientPoint
Returns point where path connects client end's element.- Returns:
- client point. This method returns not cloned point, so do not modify it directly.
-
getClient
Returns client of the path.- Returns:
- client element.
-
getSupplier
Returns supplier of the path.- Returns:
- supplier end element.
-
isConnectable
@OpenApi public final boolean isConnectable(@CheckForNull PresentationElement supplier, @CheckForNull PresentationElement client) Checks if this path can connect given two elements.- Parameters:
supplier- candidate for path's supplier.client- candidate for path's client.- Returns:
- true, if path can connect given elements.
-
getPointOnPath
@OpenApi public Point getPointOnPath(Point supplierPoint, Point clientPoint, List<Point> breakpoints, double coefficient) - Parameters:
supplierPoint- supplier end pointclientPoint- client end pointbreakpoints- list of breakpoints between supplier and client in that ordercoefficient- ratio between 0 and 1 describing position relative to the path length. Provide 0.5 for middle point.- Returns:
- point on path
-
accept
- Overrides:
acceptin classPathConnector- Throws:
Exception
-