public class TLspLabelLocations extends ALspLabelLocations
Default implementation of ALspLabelLocations
.
ALspLabelLocations.LocationInfo
Constructor and Description |
---|
TLspLabelLocations() |
Modifier and Type | Method and Description |
---|---|
void |
addLabelLocationListener(ILspLabelLocationChangeListener aListener)
Adds the specified listener to this information store.
|
ALspLabelLocations.LocationInfo |
getLabelLocation(ILspView aView,
TLspLabelID aLabel)
Returns the location and visibility for the requested label.
|
Iterable<ALspLabelLocations.LocationInfo> |
getLabelLocations(ILspView aView,
ILspLayer aLayer,
TLspPaintRepresentation aPaintRepresentation,
boolean aVisibleOnly)
Retrieves the current set of label locations and visibilities.
|
void |
removeLabelLocationListener(ILspLabelLocationChangeListener aListener)
Removes the specified listener.
|
void |
setLabelLocations(List<TLspLabelID> aLabels,
List<ALspLabelLocation> aLocations,
List<Boolean> aVisibilities,
ILspView aView)
Stores the given location information so it can be
retrieved
later on. |
void |
updateLabelLocations(List<TLspLabelID> aLabels,
List<ALspLabelLocation> aLocations,
List<Boolean> aVisibilities,
ILspView aView)
Stores the given location information so it can be
retrieved
later on. |
public void addLabelLocationListener(ILspLabelLocationChangeListener aListener)
ALspLabelLocations
addLabelLocationListener
in class ALspLabelLocations
aListener
- The listener that should be informed when there are changes in the label
information.ALspLabelLocations.updateLabelLocations(java.util.List<com.luciad.view.lightspeed.painter.label.TLspLabelID>, java.util.List<com.luciad.view.lightspeed.label.location.ALspLabelLocation>, java.util.List<java.lang.Boolean>, com.luciad.view.lightspeed.ILspView)
public void removeLabelLocationListener(ILspLabelLocationChangeListener aListener)
ALspLabelLocations
removeLabelLocationListener
in class ALspLabelLocations
aListener
- The listener to remove.public void setLabelLocations(List<TLspLabelID> aLabels, List<ALspLabelLocation> aLocations, List<Boolean> aVisibilities, ILspView aView)
ALspLabelLocations
Stores the given location information so it can be retrieved
later on.
Note that this call sets all labels that are not explicitly specified to invisible.
This method also allows to remove the information: just let the ALspLabelLocation be
null
.
setLabelLocations
in class ALspLabelLocations
aLabels
- An array of objects identifying a label to which this information applies.aLocations
- An array of locations. No references to the locations are kept within the
implementations of this class. This allows the client of this class to
reuse the same locations. If this location is null
, any
label information already present in this instance about the given
representation is removed from this class.aVisibilities
- An array of boolean
s indicating visibility of the labels.aView
- The view for which the location applies.ALspLabelLocations.updateLabelLocations(java.util.List<com.luciad.view.lightspeed.painter.label.TLspLabelID>, java.util.List<com.luciad.view.lightspeed.label.location.ALspLabelLocation>, java.util.List<java.lang.Boolean>, com.luciad.view.lightspeed.ILspView)
public void updateLabelLocations(List<TLspLabelID> aLabels, List<ALspLabelLocation> aLocations, List<Boolean> aVisibilities, ILspView aView)
ALspLabelLocations
Stores the given location information so it can be retrieved
later on.
This call only changes the location and visibility of the specified labels, and leaves the other labels untouched.
This method also allows to remove the information: just let the ALspLabelLocation be
null
.
updateLabelLocations
in class ALspLabelLocations
aLabels
- An array of objects identifying a label to which this information applies.aLocations
- An array of locations. No references to the locations are kept within the
implementations of this class. This allows the client of this class to
reuse the same locations. If this location is null
, any
label information already present in this instance about the given
representation is removed from this class.aVisibilities
- The identifiers for the labels that should be visible.aView
- The view for which the location applies.ALspLabelLocations.setLabelLocations(java.util.List<com.luciad.view.lightspeed.painter.label.TLspLabelID>, java.util.List<com.luciad.view.lightspeed.label.location.ALspLabelLocation>, java.util.List<java.lang.Boolean>, com.luciad.view.lightspeed.ILspView)
public ALspLabelLocations.LocationInfo getLabelLocation(ILspView aView, TLspLabelID aLabel)
ALspLabelLocations
This method never return null
, but the location inside can be null
.
getLabelLocation
in class ALspLabelLocations
aView
- The viewaLabel
- The labelnull
public Iterable<ALspLabelLocations.LocationInfo> getLabelLocations(ILspView aView, ILspLayer aLayer, TLspPaintRepresentation aPaintRepresentation, boolean aVisibleOnly)
ALspLabelLocations
getLabelLocations
in class ALspLabelLocations
aView
- The view to retrieve the information for, never null
aLayer
- The layer to retrieve the information for, can be null
if all layers relevantaPaintRepresentation
- The paint representation to retrieve the information, can be null
if the layer is also null
aVisibleOnly
- Indicates whether all information is necessary, or only that of visible labels