Class TLspBoundsQuery

java.lang.Object
com.luciad.view.lightspeed.query.ALspPaintQuery<ALspBoundsInfo>
com.luciad.view.lightspeed.query.TLspBoundsQuery

public class TLspBoundsQuery extends ALspPaintQuery<ALspBoundsInfo>
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 Details

    • TLspBoundsQuery

      public TLspBoundsQuery(Object aObject, TLspPaintRepresentation aPaintRepresentation)
      Creates a new objects bounds query.
      Parameters:
      aObject - the object whose bounds should be retrieved
      aPaintRepresentation - the paint representation
    • TLspBoundsQuery

      public TLspBoundsQuery(TLspLabelID aLabel)
      Creates a new label bounds query.
      Parameters:
      aLabel - the label whose bounds should be retrieved
    • TLspBoundsQuery

      public 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. If the given paint state is null, all paint states will be tried.
      Parameters:
      aLabel - the label whose bounds should be retrieved
      aPaintState - 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 is null, all paint states will be tried.
      Parameters:
      aLabel - the label whose bounds should be retrieved
      aPaintState - the paint state of the label
      aLabelLocation - the label location for the label.
  • Method Details

    • getObject

      public Object getObject()
      Returns the object that should be queried.
      Returns:
      the object
    • getLabel

      public TLspLabelID getLabel()
      Returns the label that should be queried.
      Returns:
      the label
    • getPaintRepresentation

      public TLspPaintRepresentation getPaintRepresentation()
      Returns the paint representation that should be queried.
      Returns:
      the paint representation
    • getPaintState

      public TLspPaintState getPaintState()
      Returns the paint stated that should be queried. If this method returns null, it means all paint states should be queried.
      Returns:
      the paint stated that should be queried. Can be null.
    • getLabelLocation

      public ALspLabelLocation getLabelLocation()
      Returns the label location for the label that should be queried.
      Returns:
      the label location. Can be null.
    • getResult

      public ALspBoundsInfo getResult()
      Returns the bounds info for the object.
      Specified by:
      getResult in class ALspPaintQuery<ALspBoundsInfo>
      Returns:
      the bounds info
    • bounds

      public boolean bounds(ALspWorldBoundsInfo aBoundsInfo)
      Called if the object has world bounds.

      Note that the aBoundsInfo may change after this method call returns. The implementation can create a ALspBoundsInfo.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

      public boolean bounds(ALspViewBoundsInfo aBoundsInfo)
      Called if the object has view bounds.

      Note that the aBoundsInfo may change after this method call returns. The implementation can create a ALspBoundsInfo.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