|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.graphic.probe.AbstractPickEngine
A full implementation of the PickEngine interface. The default implementation performs non-native unordered picking based on intersection using the IntersectableGraphic interface (see doRawPick()).
Nested Class Summary | |
static class |
AbstractPickEngine.DistanceComparator
A comparator for ordering hits (HitResult) by distance, from closest to farthest. |
static class |
AbstractPickEngine.GroupComparator
A comparator for ordering groups (List) of ordered hits (HitResult) by group distance, from closest to farthest. |
Constructor Summary | |
AbstractPickEngine()
Creates an instance. |
Method Summary | |
protected void |
checkPickSpecs(java.util.Set specs,
java.util.Collection pickers,
java.util.Collection pickables)
Called by the system to check the pick specs for compatibility with this engine and the pick players, and throws an exception if a problem is found. |
PickResult |
doGraphicPick(java.util.Set specs,
java.util.Collection pickers,
java.util.Collection pickables)
Default implementation: Independent of the picker/pickable type. |
protected java.util.List |
doRawPick(java.util.Set specs,
java.lang.Object picker,
java.lang.Object pickable,
java.util.List retVal)
Called by the system to perform a pick operation between each combination of picker and pickable. |
java.lang.Object |
getGraphic()
Default implementation: Returns this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractPickEngine()
Method Detail |
protected void checkPickSpecs(java.util.Set specs, java.util.Collection pickers, java.util.Collection pickables)
The default implementation only checks for null parameters and unsupported pick flags, specifically the PICK_ORDERED flag.
specs
- The pick specs. Never null.pickers
- The pickers (Object). Never null.pickables
- The pickables (Object). Never null.
java.lang.IllegalArgumentException
- Specs is null.
java.lang.UnsupportedOperationException
- The PICK_ORDERED flag
is not supported.protected java.util.List doRawPick(java.util.Set specs, java.lang.Object picker, java.lang.Object pickable, java.util.List retVal)
specs
- The pick specs. Never null.picker
- The picker. Never null.pickable
- The pickable. Never null.retVal
- Return value object. Hit results (HitResult), ordered
if required. Never null.
java.lang.UnsupportedOperationException
- The picker and pickable
are incompatible.public PickResult doGraphicPick(java.util.Set specs, java.util.Collection pickers, java.util.Collection pickables)
doGraphicPick
in interface PickEngine
specs
- Flags (Picks.PICK_???, Picks.HIT_???) specifying the
pick operation and its result. Never null. PICK_??? flag
compliance is mandatory. HIT_??? flag compliance is typically
optional.pickers
- Group of pickers (Object). Never null.
If empty, no hits. A picker's reference space is assumed to be
absolute or natively defined unless it implements GraphicGeometry.pickables
- Group of pickables (Object). Never null.
If empty, no hits. A pickable's reference space is assumed to be
absolute or natively defined unless it implements GraphicGeometry.
public java.lang.Object getGraphic()
getGraphic
in interface Graphic
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |