Class ALspLayer
- All Implemented Interfaces:
ILcdPropertyChangeSource,ILcdSelection<Object>,ILcdLayer,ILspLayer,Serializable
- Direct Known Subclasses:
TLspGXYLayerAdapter,TLspLayer,TLspRasterLayer
ILspLayer. This class implements
most functionality in ILspLayer and additionally allows:
- setting a
filter - firing
property changes - firing
layer state changes - firing
status changes
- Since:
- 2012.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.layer.ILspLayer
ILspLayer.LayerType -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty layer.Constructs a layer with the specified model and a default label.Constructs a layer with the specified model and label.Constructs an empty layer with the specified label. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayerStateListener(ILspLayerStateListener aListener) Adds a state change listener to this layer.protected voidaddPaintRepresentation(TLspPaintRepresentation aPaintRepresentation) Adds a supported paint representation.voidRegisters the givenPropertyChangeListenerto be notified when this object's properties change.voidaddSelectionListener(ILcdSelectionListener<Object> aSelectionListener) Adds a listener to this selection.voidaddStatusListener(ILcdStatusListener<ILspLayer> aStatusListener) Adds a status listener to this layer that is notified when the layer starts work asynchronously, when it is in progress, and when it is finished.voidclearSelection(int aDispatchEventMode) Deselect all the Objects in thisILcdLayer, i.e., the selection of thisILcdLayeris empty afterward.protected ILcdModelXYZWorldTransformationcreateModelXYZWorldTransformation(ILcdModelReference aModelReference, ILcdXYZWorldReference aWorldReference, ILspView aView) Creates a new model world transformation for the given model and world reference.voidFires aTLcdSelectionChangedEventthat contains all the selection changes appended by successively callingselectObject(Object, boolean, ILcdFireEventMode.FIRE_LATER).protected voidFires a layer state change event.voidfireLayerStateChange(TLspLayerPaintStateEvent.Type aType, TLspPaintRepresentationState aPaintRepresentationState, Object aOldValue, Object aNewValue) Fires a layer state change event with the specified properties.protected voidFires a layer state change event.voidfireLayerStateChange(TLspLayerStateEvent.Type aType, TLspPaintRepresentation aPaintRepresentation, Object aOldValue, Object aNewValue) Fires a layer state change event with the specified properties.protected voidFires a property change event for this layer.protected voidfireStatusEvent(TLcdStatusEvent<ILspLayer> aStatusEvent) Fires a status event.getBounds(TLspContext aContext) Returns the bounds of the layer in world coordinates.Returns a collection of all the views in which this layer is currently present.Returns the currentILcdDynamicFilterthat filters the objects on this layer.getIcon()Returns a visual indication of the contents of this layer.getLabel()A short textual representation of thisILcdLayer.Gets the current layer style.ReturnsILspLayer.LayerType.EDITABLE.getMapScaleRange(TLspPaintRepresentation aPaintRepresentation) Returns the scale range of a TLspPaintRepresentation of this layer in unitless map scale ratios.getModel()Gets theILcdModelcurrently associated to this layer.Returns the transformation that will be used to transform coordinates of the objects in the model to world coordinates of the given view.No paint representations are supported by default.intReturns the number of objects in this selection.voidConvenience method to indicate that the representation of the model is no longer valid.booleanReturns whether the layer allows editing the content that it visualizes.booleanisEditable(TLspPaintRepresentation aPaintRepresentation) Returns whether the specifiedPaintRepresentationis editable or not.booleanReturnstrueif the layer supports editing its objects.booleanReturns whether the layer's objects can be selected, for example, by clicking on them.booleanReturnstrueif this layer supports selecting objects,falseotherwise.booleanisSelected(Object aObject) Checks whether the givenObjectis currently in the set of selected objects.booleanReturns if this layer paints synchronously.booleanReturns whether or not the layer's content is painted.booleanisVisible(TLspPaintRepresentation aPaintRepresentation) Returns whether one of theTLspPaintRepresentationStates of the the specifiedTLspPaintRepresentationis enabled.booleanisVisible(TLspPaintRepresentationState aPaintRepresentationState) Returns whether the specifiedPaintRepresentationStateis enabled or not.voidregisterView(ILspView aView) Registers a view with this layer.voidremoveLayerStateListener(ILspLayerStateListener aListener) Removes the specified state listener from this layer.protected voidremovePaintRepresentation(TLspPaintRepresentation aPaintRepresentation) Removes a supported paint representation.voidDe-registers the givenPropertyChangeListenerfrom receiving property change events for this object.voidremoveSelectionListener(ILcdSelectionListener<Object> aSelectionListener) Removes anILcdSelectionListenerfrom thisILcdSelection.voidremoveStatusListener(ILcdStatusListener<ILspLayer> aStatusListener) Removes a previously added status listener from this layer.Returns the objects in this selection.voidselectObject(Object aObject, boolean aSelection, int aDispatchEventMode) Changes the selection state of any element contained in theILcdModelthisILcdLayerrefers to.voidselectObjects(Collection<Object> aObjects, boolean aSelection, int aDispatchEventMode) Changes the selection state for the given collection of objects contained in theILcdModelthis layer refers to.voidsetEditable(boolean aEditable) Sets whether the layer should allow editing the content that it visualizes.voidsetEditable(TLspPaintRepresentation aPaintRepresentation, boolean aEditable) Enables or disables the editable property of a paint representation.voidsetFilter(ILcdDynamicFilter aFilter) Sets theILcdDynamicFilterto filter the objects on this layer.voidSets a visual indication of the contents of this layer.voidSets the textual representation of thisILcdLayer.voidsetLayerStyle(TLspLayerStyle aLayerStyle) Sets a layer style to this layer.voidsetMapScaleRange(TLspPaintRepresentation aPaintRepresentation, TLcdDimensionInterval<TLcdMapScale> aMapScaleRange) Sets the scale range of this layer to the given unitless map scale ratio range.voidSets theILcdModelto this layer.voidsetSelectable(boolean aSelectable) Sets the Selectable property of thisILcdLayer.voidsetSynchronous(boolean aSynchronous) Specifies whether this layer should paint synchronously.voidsetVisible(boolean aVisible) Sets whether or not the layer's content is painted.voidsetVisible(TLspPaintRepresentation aPaintRepresentation, boolean aVisible) Enables or disables allTLspPaintRepresentationStates of the specifiedTLspPaintRepresentation.voidsetVisible(TLspPaintRepresentationState aPaintRepresentationState, boolean aVisible) Enables or disables the a paint representation state.voidunregisterView(ILspView aView) Unregisters a view from this layer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.util.ILcdSelection
getSelectedObjectsMethods inherited from interface com.luciad.view.lightspeed.layer.ILspLayer
getMapScaleProvider
-
Constructor Details
-
ALspLayer
public ALspLayer()Constructs an empty layer. -
ALspLayer
Constructs an empty layer with the specified label.- Parameters:
aLabel- the label
-
ALspLayer
Constructs a layer with the specified model and a default label.- Parameters:
aModel- the model
-
ALspLayer
Constructs a layer with the specified model and label.- Parameters:
aModel- the modelaLabel- the label
-
-
Method Details
-
isSynchronous
public boolean isSynchronous()Returns if this layer paints synchronously.- Returns:
- if this layer paints synchronously.
- See Also:
-
setSynchronous
public void setSynchronous(boolean aSynchronous) Specifies whether this layer should paint synchronously. The default is false and allows layers to perform shape discretization and other expensive processing using the view's ILspTaskExecutor. When synchronous mode is on, all such tasks are performed on the EDT. It is strongly recommended to leave this setting off, to ensure that the application remains responsive. Applications that need to change the view's world reference on a regular basis, however, may want to consider synchronous mode to avoid flickering.- Parameters:
aSynchronous- true if the layer should paint synchronously- See Also:
-
getLayerType
ReturnsILspLayer.LayerType.EDITABLE. Implementing classes can override this method to return other values.- Specified by:
getLayerTypein interfaceILspLayer- Returns:
LayerType#EDITABLE- See Also:
-
registerView
Description copied from interface:ILspLayerRegisters a view with this layer. This method is called by the view when this layer is added to it. When the layer is removed from the view, the view invokesILspLayer.unregisterView(com.luciad.view.lightspeed.ILspView). This allows the layer to know at all times in which views it is currently present; this information may help it to manage any data that it caches.- Specified by:
registerViewin interfaceILspLayer- Parameters:
aView- the view to which this layer has been added
-
unregisterView
Description copied from interface:ILspLayerUnregisters a view from this layer. This method is called by the view when this layer is removed from it. Along withILspLayer.registerView(com.luciad.view.lightspeed.ILspView), this method determines the result ofILspLayer.getCurrentViews().- Specified by:
unregisterViewin interfaceILspLayer- Parameters:
aView- the view from which this layer has been removed
-
getCurrentViews
Description copied from interface:ILspLayerReturns a collection of all the views in which this layer is currently present. This list is kept up-to-date via the view's invocations of
ILspLayer.registerView(com.luciad.view.lightspeed.ILspView)andILspLayer.unregisterView(com.luciad.view.lightspeed.ILspView).The returned collection should not be modified.
- Specified by:
getCurrentViewsin interfaceILspLayer- Returns:
- a collection of views in which this layer is currently present
- See Also:
-
getModel
Gets theILcdModelcurrently associated to this layer. -
setModel
Sets theILcdModelto this layer.This method is not thread safe, it is recommended to synchronize on the layer instance if needed.
- Parameters:
aModel- the model that contains the objects that should be displayed in this layer.
-
invalidate
public void invalidate()Convenience method to indicate that the representation of the model is no longer valid. Call this method after modifying settings that influence the representation of the model, but are not properties of the layer itself. This method does not have to be called when setting a property of the layer itself (for example, calling setVisible) as setting such a property will inform listeners that the representation of the model is no longer valid.- Specified by:
invalidatein interfaceILspLayer
-
setVisible
public void setVisible(boolean aVisible) Sets whether or not the layer's content is painted.This method is not thread safe, it is recommended to synchronize on the layer instance if needed.
- Specified by:
setVisiblein interfaceILcdLayer- Specified by:
setVisiblein interfaceILspLayer- Parameters:
aVisible-trueif the layer should be visible,falseotherwise.- See Also:
-
getFilter
Returns the currentILcdDynamicFilterthat filters the objects on this layer.- Returns:
- the filter that accepts only those objects that should be taken into account or
null - See Also:
-
setFilter
Sets the
ILcdDynamicFilterto filter the objects on this layer. Operations on this layer will only be applied to objects of the model that pass the filter. This includes painting, labeling, selection, editing, ...Setting a
nullfilter, lets all objects pass for rendering. By default the filter isnull.This method is not thread safe, it is recommended to synchronize on the layer instance if needed.
- Parameters:
aFilter- the filter that accepts only those objects that should be taken into account- See Also:
-
isVisible
public boolean isVisible()Description copied from interface:ILcdLayerReturns whether or not the layer's content is painted. -
setVisible
Description copied from interface:ILspLayerEnables or disables the a paint representation state. This can be used to quickly switch representations (e.g. labels) on and off without having to remove its related properties (ex. a painter). Note that this method is independent of thelayer visibility. So a paint representation state will only be visible when this method and theILcdLayer.isVisible()method returntrue.- Specified by:
setVisiblein interfaceILspLayer- Parameters:
aPaintRepresentationState- the representations to enable or disableaVisible- true to enable the representations or false to disable it- See Also:
-
isVisible
Description copied from interface:ILspLayerReturns whether the specifiedPaintRepresentationStateis enabled or not. -
setVisible
Description copied from interface:ILspLayerEnables or disables allTLspPaintRepresentationStates of the specifiedTLspPaintRepresentation. This can be used to quickly switch representations (e.g. labels) on and off without having to remove its related properties (ex. a painter).- Specified by:
setVisiblein interfaceILspLayer- Parameters:
aPaintRepresentation- the representation to enable or disableaVisible- true to enable the representations or false to disable it- See Also:
-
isVisible
Description copied from interface:ILspLayerReturns whether one of theTLspPaintRepresentationStates of the the specifiedTLspPaintRepresentationis enabled. -
isEditableSupported
public boolean isEditableSupported()Description copied from interface:ILcdLayerReturnstrueif the layer supports editing its objects.- Specified by:
isEditableSupportedin interfaceILcdLayer- Returns:
true- See Also:
-
setEditable
public void setEditable(boolean aEditable) Description copied from interface:ILcdLayerSets whether the layer should allow editing the content that it visualizes. CheckisEditableSupportedto see if the layer supports editing.- Specified by:
setEditablein interfaceILcdLayer- Specified by:
setEditablein interfaceILspLayer- Parameters:
aEditable- true if the layer content can be edited- See Also:
-
isEditable
public boolean isEditable()Description copied from interface:ILcdLayerReturns whether the layer allows editing the content that it visualizes.- Specified by:
isEditablein interfaceILcdLayer- Returns:
trueif thisILcdLayeris editable,falseotherwise- See Also:
-
setEditable
Description copied from interface:ILspLayerEnables or disables the editable property of a paint representation. This can be used to quickly switch editing for representations (e.g. labels) on and off without having to remove its related properties (ex. a painter). Note that this method is independent of thelayer editability. So paint representation will only be editable when both the layer and the paint representation are editable andediting is supported.- Specified by:
setEditablein interfaceILspLayer- Parameters:
aPaintRepresentation- the representation to enable or disableaEditable- true to enable the representations or false to disable it- See Also:
-
isEditable
Description copied from interface:ILspLayerReturns whether the specifiedPaintRepresentationis editable or not.- Specified by:
isEditablein interfaceILspLayer- Parameters:
aPaintRepresentation- the paint representation to check- Returns:
- whether the specified
PaintRepresentationis editable or not - See Also:
-
getLabel
Description copied from interface:ILcdLayerA short textual representation of thisILcdLayer. -
setLabel
Sets the textual representation of thisILcdLayer.This method is not thread safe, it is recommended to synchronize on the layer instance if needed.
-
getIcon
Description copied from interface:ILcdLayerReturns a visual indication of the contents of this layer. For example, for a grid layer, an icon containing a grid could be used. -
setIcon
Description copied from interface:ILcdLayerSets a visual indication of the contents of this layer. -
getMapScaleRange
public TLcdDimensionInterval<TLcdMapScale> getMapScaleRange(TLspPaintRepresentation aPaintRepresentation) Returns the scale range of a TLspPaintRepresentation of this layer in unitless map scale ratios. If configured, the layer contents are only shown if and when the view's map scale is larger than the interval's minimum and smaller than the interval's maximum.- Parameters:
aPaintRepresentation- the paint representation for which to return the scale range- Returns:
- the scale range
- Throws:
IllegalArgumentException- ifaPaintRepresentationis not supported- Since:
- 2021.1
- See Also:
-
setMapScaleRange
public void setMapScaleRange(TLspPaintRepresentation aPaintRepresentation, TLcdDimensionInterval<TLcdMapScale> aMapScaleRange) Sets the scale range of this layer to the given unitless map scale ratio range. If configured, the layer contents are only shown if and when the view's map scale is larger than the interval's minimum and smaller than the interval's maximum.- Parameters:
aPaintRepresentation- the paint representationaMapScaleRange- the new scale range of this layer, ornullto deactivate any scale restriction- Throws:
IllegalArgumentException- ifaPaintRepresentationis not supported- Since:
- 2021.1
- See Also:
-
getPaintRepresentations
No paint representations are supported by default.- Specified by:
getPaintRepresentationsin interfaceILspLayer- Returns:
- a collection of
PaintRepresentations, nevernull
-
addPaintRepresentation
Adds a supported paint representation.- Parameters:
aPaintRepresentation- the paint representation- See Also:
-
removePaintRepresentation
Removes a supported paint representation.- Parameters:
aPaintRepresentation- the paint representation
-
getModelXYZWorldTransformation
Returns the transformation that will be used to transform coordinates of the objects in the model to world coordinates of the given view.
In order for this method to be thread-safe, the model-world transformation should not be modified after it is returned by this method. In practice this means that this method and its callers should treat the model-world transformation as an immutable object. So it shouldn't reuse the same
ILcdModelXYZWorldTransformationfor differentILcdModelReferencesorILcdXYZWorldReference.By default this method calls
createModelXYZWorldTransformationto create a new transformation instance.- Specified by:
getModelXYZWorldTransformationin interfaceILspLayer- Parameters:
aView- the view- Returns:
- the transformation that will be used to transform coordinates of the objects in the model to world coordinates of the given view
-
createModelXYZWorldTransformation
protected ILcdModelXYZWorldTransformation createModelXYZWorldTransformation(ILcdModelReference aModelReference, ILcdXYZWorldReference aWorldReference, ILspView aView) Creates a new model world transformation for the given model and world reference. This method is called by the default implementation of
getModelXYZWorldTransformation.- Parameters:
aModelReference- the model reference.aWorldReference- the world reference.aView- the view for which a transformation is created.- Returns:
- a new model world transformation for the given model and world references.
-
addLayerStateListener
Description copied from interface:ILspLayerAdds a state change listener to this layer. The layer must notify this listener when any of its state for a specificTLspPaintRepresentationorTLspPaintRepresentationStateis changed. This state change is described respectively by aTLspLayerStateEventor aTLspLayerPaintStateEvent.- Specified by:
addLayerStateListenerin interfaceILspLayer- Parameters:
aListener- the state change listener to be registered on this layer
-
removeLayerStateListener
Description copied from interface:ILspLayerRemoves the specified state listener from this layer.- Specified by:
removeLayerStateListenerin interfaceILspLayer- Parameters:
aListener- the listener to be removed from the layer- See Also:
-
fireLayerStateChange
Fires a layer state change event.- Parameters:
aEvent- the event- See Also:
-
fireLayerStateChange
Fires a layer state change event.- Parameters:
aEvent- the event- See Also:
-
fireLayerStateChange
public void fireLayerStateChange(TLspLayerPaintStateEvent.Type aType, TLspPaintRepresentationState aPaintRepresentationState, Object aOldValue, Object aNewValue) Fires a layer state change event with the specified properties.- Parameters:
aType- the event typeaPaintRepresentationState- the affected paint representation stateaOldValue- the old valueaNewValue- the new value- See Also:
-
fireLayerStateChange
public void fireLayerStateChange(TLspLayerStateEvent.Type aType, TLspPaintRepresentation aPaintRepresentation, Object aOldValue, Object aNewValue) Fires a layer state change event with the specified properties.- Parameters:
aType- the event typeaPaintRepresentation- the affected paint representationaOldValue- the old valueaNewValue- the new value- See Also:
-
addStatusListener
Description copied from interface:ILspLayerAdds a status listener to this layer that is notified when the layer starts work asynchronously, when it is in progress, and when it is finished.- Specified by:
addStatusListenerin interfaceILspLayer- Parameters:
aStatusListener- a status listener
-
removeStatusListener
Description copied from interface:ILspLayerRemoves a previously added status listener from this layer. The listener will no longer be notified of changes in layer progress- Specified by:
removeStatusListenerin interfaceILspLayer- Parameters:
aStatusListener- a status listener
-
fireStatusEvent
Fires a status event.- Parameters:
aStatusEvent- the status event
-
addPropertyChangeListener
Description copied from interface:ILcdPropertyChangeSourceRegisters the given
PropertyChangeListenerto be notified when this object's properties change.In case you need to register a listener which keeps a reference to an object with a shorter life-time than this change source, you can use a
ALcdWeakPropertyChangeListenerinstance as property change listener.- Specified by:
addPropertyChangeListenerin interfaceILcdPropertyChangeSource- Parameters:
listener- The listener to be notified- See Also:
-
removePropertyChangeListener
Description copied from interface:ILcdPropertyChangeSourceDe-registers the given
PropertyChangeListenerfrom receiving property change events for this object.If the listener was added more than once, it will be notified one less time after being removed. If the listener is
null, or was never added, no exception is thrown and no action is taken.- Specified by:
removePropertyChangeListenerin interfaceILcdPropertyChangeSource- Parameters:
listener- the listener that should no longer be notified of changes of this object's properties- See Also:
-
firePropertyChange
Fires a property change event for this layer.- Parameters:
aEvent- the event
-
selectedObjects
Description copied from interface:ILcdSelectionReturns the objects in this selection.- Specified by:
selectedObjectsin interfaceILcdSelection<Object>- Returns:
- the objects currently in this
ILcdSelection.
-
getSelectionCount
public int getSelectionCount()Description copied from interface:ILcdSelectionReturns the number of objects in this selection.- Specified by:
getSelectionCountin interfaceILcdSelection<Object>- Returns:
- the number of objects in this
ILcdSelection.
-
isSelected
Description copied from interface:ILcdSelectionChecks whether the givenObjectis currently in the set of selected objects.- Specified by:
isSelectedin interfaceILcdSelection<Object>- Parameters:
aObject- theObjectto be checked.- Returns:
trueif theObjectis in thisILcdSelection, false otherwise.- Throws:
IllegalArgumentException
-
selectObject
Description copied from interface:ILcdLayerChanges the selection state of any element contained in theILcdModelthisILcdLayerrefers to. This method shall have an effect only if isSelectableSupported and isSelectable return true.- Specified by:
selectObjectin interfaceILcdLayer- Parameters:
aObject- theObjectto select or deselect. The object should be in the model of this layer. The implementation of this method is not responsible for checking this.aSelection- the selection state,trueto select,falseto deselect.aDispatchEventMode- shall be one amongILcdFireEventMode.FIRE_NOW,ILcdFireEventMode.FIRE_LATER,ILcdFireEventMode.NO_EVENT- See Also:
-
selectObjects
Changes the selection state for the given collection of objects contained in theILcdModelthis layer refers to. This method shall have an effect only if isSelectableSupported() and isSelectable() returntrue.- Parameters:
aObjects- the collection of objects to select or deselectaSelection- the selection state,trueto select,falseto deselectaDispatchEventMode- shall be one amongILcdFireEventMode.FIRE_NOW,ILcdFireEventMode.FIRE_LATER,ILcdFireEventMode.NO_EVENT- See Also:
-
fireCollectedSelectionChanges
public void fireCollectedSelectionChanges()Description copied from interface:ILcdLayerFires aTLcdSelectionChangedEventthat contains all the selection changes appended by successively callingselectObject(Object, boolean, ILcdFireEventMode.FIRE_LATER).- Specified by:
fireCollectedSelectionChangesin interfaceILcdLayer
-
clearSelection
public void clearSelection(int aDispatchEventMode) Description copied from interface:ILcdLayerDeselect all the Objects in thisILcdLayer, i.e., the selection of thisILcdLayeris empty afterward.- Specified by:
clearSelectionin interfaceILcdLayer- Parameters:
aDispatchEventMode- shall be one amongILcdFireEventMode.FIRE_NOW,ILcdFireEventMode.FIRE_LATER,ILcdFireEventMode.NO_EVENT- See Also:
-
addSelectionListener
Description copied from interface:ILcdSelectionAdds a listener to this selection. In case you need to register a listener which keeps a reference to an object with a shorter life-time than thisILcdSelection, you can use aALcdWeakSelectionListenerinstance as selection listener.- Specified by:
addSelectionListenerin interfaceILcdSelection<Object>- Parameters:
aSelectionListener- theILcdSelectionListenerto be added.
-
removeSelectionListener
Description copied from interface:ILcdSelectionRemoves anILcdSelectionListenerfrom thisILcdSelection.- Specified by:
removeSelectionListenerin interfaceILcdSelection<Object>- Parameters:
aSelectionListener- theILcdSelectionListenerto be removed.
-
isSelectableSupported
public boolean isSelectableSupported()Description copied from interface:ILcdLayerReturnstrueif this layer supports selecting objects,falseotherwise.- Specified by:
isSelectableSupportedin interfaceILcdLayer- Returns:
true- See Also:
-
setSelectable
public void setSelectable(boolean aSelectable) Description copied from interface:ILcdLayerSets the Selectable property of thisILcdLayer. CheckisSelectableSupportedto see if the layer supports selection.- Specified by:
setSelectablein interfaceILcdLayer- Parameters:
aSelectable-trueif the layer allows selection,falseotherwise.- See Also:
-
isSelectable
public boolean isSelectable()Description copied from interface:ILcdLayerReturns whether the layer's objects can be selected, for example, by clicking on them.- Specified by:
isSelectablein interfaceILcdLayer- Returns:
trueif the layer allows selection,falseotherwise.- See Also:
-
getBounds
public ILcdBounds getBounds(TLspContext aContext) throws TLcdNoBoundsException, TLcdOutOfBoundsException Returns the bounds of the layer in world coordinates. The world reference system returned byTLspContext.getXYZWorldReference()is used. ALspLayer provides a default model based implementation of this method. In some cases, this is only an approximation of the actual bounds, so more specific implementations are encouraged to provide a more precise implementation.- Specified by:
getBoundsin interfaceILspLayer- Parameters:
aContext- The context that defines the reference system for the bounds to be returned.- Returns:
- The bounds of the layer in the reference system specified by aContext.
- Throws:
TLcdNoBoundsException- If the layer has no bounds in the reference system. For instance, if the layer paints directly in the view.TLcdOutOfBoundsException- If the bounds can not be represented in the specified reference system.
-
getLayerStyle
Description copied from interface:ILspLayerGets the current layer style. You can reset the layer style like this:layer.setLayerStyle(TLspLayerStyle.newBuilder().build());
- Specified by:
getLayerStylein interfaceILspLayer- Returns:
- the layer style. Never
null.
-
setLayerStyle
Description copied from interface:ILspLayerSets a layer style to this layer. Layer style can for example modify the transparency of a layer as a whole. You can reset the layer style like this:layer.setLayerStyle(TLspLayerStyle.newBuilder().build());
- Specified by:
setLayerStylein interfaceILspLayer- Parameters:
aLayerStyle- the layer style. must not benull.
-