public class TLspIsTouchedQuery extends ALspPaintQuery<Boolean>
touched(com.luciad.view.lightspeed.layer.ALspWorldTouchInfo)
methods may be called multiple times if the object is touched at multiple
points. This implementation only keeps track of the first touched point. You can override this
class if you want to handle all touched points.Constructor and Description |
---|
TLspIsTouchedQuery(Object aObject,
TLspPaintRepresentation aPaintRepresentation,
ILcdPoint aViewPoint,
double aSensitivity)
Creates a new is touched query.
|
TLspIsTouchedQuery(TLspLabelID aLabel,
ILcdPoint aViewPoint,
double aSensitivity)
Creates a new is touched query for a label.
|
TLspIsTouchedQuery(TLspLabelID aLabel,
ILcdPoint aViewPoint,
double aSensitivity,
ALspLabelLocation aLabelLocation)
Creates a new is touched query for a label, for the given location.
|
Modifier and Type | Method and Description |
---|---|
TLspLabelID |
getLabel()
Returns the label that should be queried.
|
ALspLabelLocation |
getLabelLocation()
Returns the label location for the label that should be queried.
|
Object |
getObject()
Returns the object that should be queried.
|
TLspPaintRepresentation |
getPaintRepresentation()
Returns the paint representation that should be queried.
|
Boolean |
getResult()
Returns whether the object is touched.
|
double |
getSensitivity()
Returns the sensitivity in pixels.
|
ALspTouchInfo |
getTouchInfo()
Returns the touch info if the object is touched.
|
ILcdPoint |
getViewPoint()
Returns the view point that should be queried.
|
boolean |
isTouched()
Returns whether the object is touched.
|
boolean |
touched(ALspViewTouchInfo aTouchInfo)
Called if the object is touched at a point in view coordinates.
|
boolean |
touched(ALspWorldTouchInfo aTouchInfo)
Called if the object is touched at a point in world coordinates.
|
public TLspIsTouchedQuery(Object aObject, TLspPaintRepresentation aPaintRepresentation, ILcdPoint aViewPoint, double aSensitivity)
aObject
- the object that should be testedaPaintRepresentation
- the paint representationaViewPoint
- the view pointaSensitivity
- the sensitivitypublic TLspIsTouchedQuery(TLspLabelID aLabel, ILcdPoint aViewPoint, double aSensitivity)
aLabel
- the label that should be testedaViewPoint
- the view pointaSensitivity
- the sensitivitypublic TLspIsTouchedQuery(TLspLabelID aLabel, ILcdPoint aViewPoint, double aSensitivity, ALspLabelLocation aLabelLocation)
ILspLabelPlacer
instead.aLabel
- the label that should be testedaViewPoint
- the view pointaSensitivity
- the sensitivitypublic Object getObject()
public TLspLabelID getLabel()
public ALspLabelLocation getLabelLocation()
null
.public TLspPaintRepresentation getPaintRepresentation()
public ILcdPoint getViewPoint()
public double getSensitivity()
public Boolean getResult()
getResult
in class ALspPaintQuery<Boolean>
true
if the object is touched, false
otherwisepublic boolean touched(ALspWorldTouchInfo aTouchInfo)
aTouchInfo
may change after this method call returns. The implementation
can create a ALspTouchInfo.clone()
if it still needs
it after the method call returns.aTouchInfo
- the touch infotrue
if the query should continue, false
if it should stoppublic boolean touched(ALspViewTouchInfo aTouchInfo)
aTouchInfo
may change after this method call returns. The implementation
can create a ALspTouchInfo.clone()
if it still needs
it after the method call returns.aTouchInfo
- the touch infotrue
if the query should continue, false
if it should stoppublic boolean isTouched()
true
if the object is touched, false
otherwisepublic ALspTouchInfo getTouchInfo()
null