All Packages Class Hierarchy This Package Previous Next Index
Class CH.ifa.draw.standard.SegmentLocator
CH.ifa.draw.standard.AbstractLocator
|
+----CH.ifa.draw.standard.SegmentLocator
- public abstract class SegmentLocator
- extends AbstractLocator
A SegmentLocator defines some basic functionality for locators that are
associated to a segment of a polyline rather than just the display box
of the polyline.
-
fAttachment
-
-
fSegment
-
-
SegmentLocator(PolyLineFigure, Figure)
-
-
SegmentLocator(PolyLineFigure, Figure, int)
-
-
findLocation(Point, Point)
-
-
findSegment(PolyLineFigure, Figure)
- return the segment of pLine that is closest to the figure attachment.
-
getLocatedFigure()
- Returns the located figure.
-
locate(Figure)
- Find a location for the located figure relative to the figure owner.
-
updateSegment(PolyLineFigure)
- Make sure that fSegment is in range [0,pointCount()-2].
fSegment
protected int fSegment
fAttachment
protected Figure fAttachment
SegmentLocator
public SegmentLocator(PolyLineFigure pLine,
Figure attachment)
SegmentLocator
public SegmentLocator(PolyLineFigure pLine,
Figure attachment,
int segment)
findSegment
public static int findSegment(PolyLineFigure pLine,
Figure attachment)
- return the segment of pLine that is closest to the figure attachment.
updateSegment
protected void updateSegment(PolyLineFigure pLine)
- Make sure that fSegment is in range [0,pointCount()-2].
locate
public Point locate(Figure owner)
- Find a location for the located figure relative to the figure owner.
- Overrides:
- locate in class AbstractLocator
findLocation
protected abstract Point findLocation(Point p1,
Point p2)
getLocatedFigure
public Figure getLocatedFigure()
- Returns the located figure.
All Packages Class Hierarchy This Package Previous Next Index