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 java.util.Map<java.lang.Object,PickedObject> |
pathPickedObjects
A map that associates each path with a picked object.
|
protected java.util.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,
java.awt.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.
|
java.util.List<Path.PickablePositions> |
getPickablePositions()
Indicates the list of Path pickable positions that this PathPickSupport is currently tracking.
|
PickedObject |
getTopObject(DrawContext dc,
java.awt.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 java.util.Map<java.lang.Object,PickedObject> pathPickedObjects
protected java.util.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.java.lang.IllegalArgumentException
- if the path is null.public void clearPickList()
clearPickList
in class PickSupport
protected void doResolvePick(DrawContext dc, java.awt.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 java.util.List<Path.PickablePositions> getPickablePositions()
public PickedObject getTopObject(DrawContext dc, java.awt.Point pickPoint)
getTopObject
in class PickSupport
dc
- the current draw context.pickPoint
- the screen-coordinate point in question.java.lang.IllegalArgumentException
- if the draw context is null.