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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds 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.voidRemoves the specified listener.voidsetLabelLocations(List<TLspLabelID> aLabels, List<ALspLabelLocation> aLocations, List<Boolean> aVisibilities, ILspView aView) Stores the given location information so it can beretrievedlater on.voidupdateLabelLocations(List<TLspLabelID> aLabels, List<ALspLabelLocation> aLocations, List<Boolean> aVisibilities, ILspView aView) Stores the given location information so it can beretrievedlater on.
-
Constructor Details
-
TLspLabelLocations
public TLspLabelLocations()
-
-
Method Details
-
addLabelLocationListener
Description copied from class:ALspLabelLocationsAdds the specified listener to this information store. This listener will be notified of changes in the label information.- Specified by:
addLabelLocationListenerin classALspLabelLocations- Parameters:
aListener- The listener that should be informed when there are changes in the label information.- See Also:
-
removeLabelLocationListener
Description copied from class:ALspLabelLocationsRemoves the specified listener. This listener will no longer be notified of changes in the label information.- Specified by:
removeLabelLocationListenerin 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:ALspLabelLocationsStores the given location information so it can be
retrievedlater 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:
setLabelLocationsin 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 ofbooleans 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:ALspLabelLocationsStores the given location information so it can be
retrievedlater 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:
updateLabelLocationsin 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:ALspLabelLocationsReturns the location and visibility for the requested label.This method never return
null, but the location inside can benull.- Specified by:
getLabelLocationin 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:ALspLabelLocationsRetrieves the current set of label locations and visibilities.- Specified by:
getLabelLocationsin classALspLabelLocations- Parameters:
aView- The view to retrieve the information for, nevernullaLayer- The layer to retrieve the information for, can benullif all layers relevantaPaintRepresentation- The paint representation to retrieve the information, can benullif the layer is alsonullaVisibleOnly- Indicates whether all information is necessary, or only that of visible labels- Returns:
- A set of labels with their location and visibility.
-