Class TLspLabelLocations
java.lang.Object
com.luciad.view.lightspeed.label.location.ALspLabelLocations
com.luciad.view.lightspeed.label.location.TLspLabelLocations
Default implementation of ALspLabelLocations
.
- Since:
- 2012.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.luciad.view.lightspeed.label.location.ALspLabelLocations
ALspLabelLocations.LocationInfo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the specified listener to this information store.getLabelLocation
(ILspView aView, TLspLabelID aLabel) Returns the location and visibility for the requested label.getLabelLocations
(ILspView aView, ILspLayer aLayer, TLspPaintRepresentation aPaintRepresentation, boolean aVisibleOnly) Retrieves the current set of label locations and visibilities.void
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 beretrieved
later on.void
updateLabelLocations
(List<TLspLabelID> aLabels, List<ALspLabelLocation> aLocations, List<Boolean> aVisibilities, ILspView aView) Stores the given location information so it can beretrieved
later on.
-
Constructor Details
-
TLspLabelLocations
public TLspLabelLocations()
-
-
Method Details
-
addLabelLocationListener
Description copied from class:ALspLabelLocations
Adds the specified listener to this information store. This listener will be notified of changes in the label information.- Specified by:
addLabelLocationListener
in classALspLabelLocations
- Parameters:
aListener
- The listener that should be informed when there are changes in the label information.- See Also:
-
removeLabelLocationListener
Description copied from class:ALspLabelLocations
Removes the specified listener. This listener will no longer be notified of changes in the label information.- Specified by:
removeLabelLocationListener
in classALspLabelLocations
- Parameters:
aListener
- The listener to remove.
-
setLabelLocations
public void setLabelLocations(List<TLspLabelID> aLabels, List<ALspLabelLocation> aLocations, List<Boolean> aVisibilities, ILspView aView) Description copied from class: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
.- Specified by:
setLabelLocations
in classALspLabelLocations
- Parameters:
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 isnull
, any label information already present in this instance about the given representation is removed from this class.aVisibilities
- An array ofboolean
s indicating visibility of the labels.aView
- The view for which the location applies.- See Also:
-
updateLabelLocations
public void updateLabelLocations(List<TLspLabelID> aLabels, List<ALspLabelLocation> aLocations, List<Boolean> aVisibilities, ILspView aView) Description copied from class: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
.- Specified by:
updateLabelLocations
in classALspLabelLocations
- Parameters:
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 isnull
, 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.- See Also:
-
getLabelLocation
Description copied from class:ALspLabelLocations
Returns the location and visibility for the requested label.This method never return
null
, but the location inside can benull
.- Specified by:
getLabelLocation
in classALspLabelLocations
- Parameters:
aView
- The viewaLabel
- The label- Returns:
- The location info, never
null
-
getLabelLocations
public Iterable<ALspLabelLocations.LocationInfo> getLabelLocations(ILspView aView, ILspLayer aLayer, TLspPaintRepresentation aPaintRepresentation, boolean aVisibleOnly) Description copied from class:ALspLabelLocations
Retrieves the current set of label locations and visibilities.- Specified by:
getLabelLocations
in classALspLabelLocations
- Parameters:
aView
- The view to retrieve the information for, nevernull
aLayer
- The layer to retrieve the information for, can benull
if all layers relevantaPaintRepresentation
- The paint representation to retrieve the information, can benull
if the layer is alsonull
aVisibleOnly
- Indicates whether all information is necessary, or only that of visible labels- Returns:
- A set of labels with their location and visibility.
-