protected static class Path.PathPickSupport extends PickSupport
addPickablePositions(int, int, Path)
with the minimum and
maximum color codes that the Path's position points are drawn in.
The resolution of the picked position point is integrated with the resolution of the picked Path. Either an
entire Path or one of its position points may be picked. In either case, resolvePick and getTopObject return a
PickedObject that specifies the picked Path. If a position point is picked, the PickedObject's AVList contains
the position and ordinal number of the picked position.Modifier and Type | Field and Description |
---|---|
protected Map<Object,PickedObject> |
pathPickedObjects
A map that associates each path with a picked object.
|
protected List<Path.PickablePositions> |
pickablePositions
The list of Path pickable positions that this PathPickSupport is currently tracking.
|
minAndMaxColorCodes, pickableObjectRanges, pickableObjects
Modifier | Constructor and Description |
---|---|
protected |
PathPickSupport() |
Modifier and Type | Method and Description |
---|---|
void |
addPickablePositions(int minColorCode,
int maxColorCode,
Path path)
Registers a range of unique pick color codes with a Path, representing the range of pick colors that the
Path's position points are drawn in.
|
void |
clearPickList()
Overridden to clear the list of pickable positions.
|
protected void |
doResolvePick(DrawContext dc,
Rectangle pickRect,
Layer layer)
Adds all picked paths that are registered with this PickSupport and intersect the specified rectangle in AWT
screen coordinates (if any) to the draw context's list of picked objects.
|
List<Path.PickablePositions> |
getPickablePositions()
Indicates the list of Path pickable positions that this PathPickSupport is currently tracking.
|
PickedObject |
getTopObject(DrawContext dc,
Point pickPoint)
Computes and returns the top object at the specified pick point.
|
addPickableObject, addPickableObject, addPickableObject, addPickableObject, addPickableObjectRange, adjustExtremeColorCodes, areSelectionsTheSame, beginPicking, doResolvePick, endPicking, getPickableObjectRanges, getPickableObjects, getTopColor, hasPickableObjects, lookupPickableObject, resolvePick
protected Map<Object,PickedObject> pathPickedObjects
protected List<Path.PickablePositions> pickablePositions
public void addPickablePositions(int minColorCode, int maxColorCode, Path path)
minColorCode
- the minimum color code, inclusive.maxColorCode
- the maximum color code, inclusive.path
- the Path who's position points are associated with the specified color code range.IllegalArgumentException
- if the path is null.public void clearPickList()
clearPickList
in class PickSupport
protected void doResolvePick(DrawContext dc, Rectangle pickRect, Layer layer)
doResolvePick
in class PickSupport
dc
- the draw context which receives the picked objects.pickRect
- the rectangle in AWT screen coordinates.layer
- the layer associated with the picked objects.public List<Path.PickablePositions> getPickablePositions()
public PickedObject getTopObject(DrawContext dc, Point pickPoint)
getTopObject
in class PickSupport
dc
- the current draw context.pickPoint
- the screen-coordinate point in question.IllegalArgumentException
- if the draw context is null.