Package com.luciad.view.lightspeed.query
Class TLspBoundsQuery
java.lang.Object
com.luciad.view.lightspeed.query.ALspPaintQuery<ALspBoundsInfo>
com.luciad.view.lightspeed.query.TLspBoundsQuery
Query to retrieve the bounds of an object.
If this query is used for an object that is currently not painted (ex. because it is outside the
view) then this query determines the bounds if it were painted.
The
bounds(com.luciad.view.lightspeed.layer.ALspWorldBoundsInfo)
methods may be called multiple times if the object has multiple bounds. This
implementation only returns the first bounds as result. You can override this class if you want
to handle all bounds.- Since:
- 2012.0
- See Also:
-
Constructor Summary
ConstructorDescriptionTLspBoundsQuery
(TLspLabelID aLabel) Creates a new label bounds query.TLspBoundsQuery
(TLspLabelID aLabel, TLspPaintState aPaintState) Creates a new label bounds query, this tries to find bounds for the given label, in the given paint state.TLspBoundsQuery
(TLspLabelID aLabel, TLspPaintState aPaintState, ALspLabelLocation aLabelLocation) Creates a new label bounds query, this tries to find bounds for the given label, in the given paint state, for the given label location.TLspBoundsQuery
(Object aObject, TLspPaintRepresentation aPaintRepresentation) Creates a new objects bounds query. -
Method Summary
Modifier and TypeMethodDescriptionboolean
bounds
(ALspViewBoundsInfo aBoundsInfo) Called if the object has view bounds.boolean
bounds
(ALspWorldBoundsInfo aBoundsInfo) Called if the object has world bounds.getLabel()
Returns the label that should be queried.Returns the label location for the label that should be queried.Returns the object that should be queried.Returns the paint representation that should be queried.Returns the paint stated that should be queried.Returns the bounds info for the object.
-
Constructor Details
-
TLspBoundsQuery
Creates a new objects bounds query.- Parameters:
aObject
- the object whose bounds should be retrievedaPaintRepresentation
- the paint representation
-
TLspBoundsQuery
Creates a new label bounds query.- Parameters:
aLabel
- the label whose bounds should be retrieved
-
TLspBoundsQuery
Creates a new label bounds query, this tries to find bounds for the given label, in the given paint state. If the given paint state isnull
, all paint states will be tried.- Parameters:
aLabel
- the label whose bounds should be retrievedaPaintState
- the paint state of the label
-
TLspBoundsQuery
public TLspBoundsQuery(TLspLabelID aLabel, TLspPaintState aPaintState, ALspLabelLocation aLabelLocation) Creates a new label bounds query, this tries to find bounds for the given label, in the given paint state, for the given label location. If the given paint state isnull
, all paint states will be tried.- Parameters:
aLabel
- the label whose bounds should be retrievedaPaintState
- the paint state of the labelaLabelLocation
- the label location for the label.
-
-
Method Details
-
getObject
Returns the object that should be queried.- Returns:
- the object
-
getLabel
Returns the label that should be queried.- Returns:
- the label
-
getPaintRepresentation
Returns the paint representation that should be queried.- Returns:
- the paint representation
-
getPaintState
Returns the paint stated that should be queried. If this method returnsnull
, it means all paint states should be queried.- Returns:
- the paint stated that should be queried. Can be
null
.
-
getLabelLocation
Returns the label location for the label that should be queried.- Returns:
- the label location. Can be
null
.
-
getResult
Returns the bounds info for the object.- Specified by:
getResult
in classALspPaintQuery<ALspBoundsInfo>
- Returns:
- the bounds info
-
bounds
Called if the object has world bounds. Note that theaBoundsInfo
may change after this method call returns. The implementation can create aALspBoundsInfo.clone()
if it still needs it after the method call returns.- Parameters:
aBoundsInfo
- the bounds info- Returns:
true
if the query should continue,false
if it should stop
-
bounds
Called if the object has view bounds. Note that theaBoundsInfo
may change after this method call returns. The implementation can create aALspBoundsInfo.clone()
if it still needs it after the method call returns.- Parameters:
aBoundsInfo
- the bounds info- Returns:
true
if the query should continue,false
if it should stop
-