Class PathElement
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
- All Implemented Interfaces:
BaseElement
,MDElement
,ModelElementProvider
,com.nomagic.magicdraw.uml.symbols.LineJumpDrawer
,com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider
,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.nomagic.magicdraw.uml.symbols.LineJumpDrawer, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider
Base class for all paths. Path is representation element which connects two other elements.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Bezier path line style.All possible path line styles.static final String
Polyline path line style.static final String
Path 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 TypeMethodDescriptionvoid
Method accepts visitor, and calls method visit<class name>(this) of visitor .Returns breaks 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 Point
Returns point where path connects client end's element.getPointOnPath
(Point supplierPoint, Point clientPoint, List<Point> breakpoints, double coefficient) Returns supplier of the path.final Point
Returns point where path connects supplier end's element.final boolean
isConnectable
(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, getConnectedPathElements
Methods inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
addProperty, collectSubManipulatedElements, editName, editName, getBoundsShape, getDiagramPresentationElement, getDiagramSurface, getElement, getManipulatedParent, getManipulatedPresentationElements, getObjectParent, getParent, getPreferredDimension, getPreferredSize, getPresentationElements, getPresentationElementStroke, getPresentationElementStroke, getProperty, getPropertyManager, getSelected, getStroke, getStroke, getStroke, getStroke, getStroke, getStroke, hasManipulatedPresentationElements, isSelected, onFind, onFind, setAllSelected, setSelected, setSelected, useParentProperties
Methods inherited from class com.nomagic.magicdraw.uml.MDElementImpl
accept, addPropertyChangeListener, canAdd, canAddChild, canBeDeleted, canDeleteChild, compareTo, createSortKeys, getClassType, getCommandForAppending, getID, getName, getProject, getProjectProvider, getResourceID, getSortKeys, hasListeners, isEditable, removeAllParents, removeAllPropertyChangeListeners, removePropertyChangeListener, setID, setProjectProvider, 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
Methods inherited from interface com.nomagic.magicdraw.uml.symbols.LineJumpDrawer
getLineWidth
-
Field Details
-
RECTILINEAR
Path line style with rectilinear (90 degrees) breakpoint corners.- See Also:
-
OBLIQUE
Polyline 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. List is unmodifiable.
- See Also:
-
getAllBreakPoints
Returns breaks 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. List is modifiable.
- See Also:
-
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
Description copied from interface:MDElement
Method accepts visitor, and calls method visit<class name>(this) of visitor . See Visitor pattern for more details.- Specified by:
accept
in interfaceMDElement
- Overrides:
accept
in classPathConnector
- Parameters:
visitor
- which visits this element.- Throws:
Exception
-