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
ConstructorDescriptionConstructs 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 TypeMethodDescriptionvoid
addLayerStateListener
(ILspLayerStateListener aListener) Adds a state change listener to this layer.protected void
addPaintRepresentation
(TLspPaintRepresentation aPaintRepresentation) Adds a supported paint representation.void
Registers the givenPropertyChangeListener
to be notified when this object's properties change.void
addSelectionListener
(ILcdSelectionListener<Object> aSelectionListener) Adds a listener to this selection.void
addStatusListener
(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.void
clearSelection
(int aDispatchEventMode) Deselect all the Objects in thisILcdLayer
, i.e., the selection of thisILcdLayer
is empty afterward.protected ILcdModelXYZWorldTransformation
createModelXYZWorldTransformation
(ILcdModelReference aModelReference, ILcdXYZWorldReference aWorldReference, ILspView aView) Creates a new model world transformation for the given model and world reference.void
Fires aTLcdSelectionChangedEvent
that contains all the selection changes appended by successively callingselectObject(Object, boolean, ILcdFireEventMode.FIRE_LATER)
.protected void
Fires a layer state change event.void
fireLayerStateChange
(TLspLayerPaintStateEvent.Type aType, TLspPaintRepresentationState aPaintRepresentationState, Object aOldValue, Object aNewValue) Fires a layer state change event with the specified properties.protected void
Fires a layer state change event.void
fireLayerStateChange
(TLspLayerStateEvent.Type aType, TLspPaintRepresentation aPaintRepresentation, Object aOldValue, Object aNewValue) Fires a layer state change event with the specified properties.protected void
Fires a property change event for this layer.protected void
fireStatusEvent
(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 currentILcdDynamicFilter
that 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 theILcdModel
currently 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.int
Returns the number of objects in this selection.void
Convenience method to indicate that the representation of the model is no longer valid.boolean
Returns whether the layer allows editing the content that it visualizes.boolean
isEditable
(TLspPaintRepresentation aPaintRepresentation) Returns whether the specifiedPaintRepresentation
is editable or not.boolean
Returnstrue
if the layer supports editing its objects.boolean
Returns whether the layer's objects can be selected, for example, by clicking on them.boolean
Returnstrue
if this layer supports selecting objects,false
otherwise.boolean
isSelected
(Object aObject) Checks whether the givenObject
is currently in the set of selected objects.boolean
Returns if this layer paints synchronously.boolean
Returns whether or not the layer's content is painted.boolean
isVisible
(TLspPaintRepresentation aPaintRepresentation) Returns whether one of theTLspPaintRepresentationState
s of the the specifiedTLspPaintRepresentation
is enabled.boolean
isVisible
(TLspPaintRepresentationState aPaintRepresentationState) Returns whether the specifiedPaintRepresentationState
is enabled or not.void
registerView
(ILspView aView) Registers a view with this layer.void
removeLayerStateListener
(ILspLayerStateListener aListener) Removes the specified state listener from this layer.protected void
removePaintRepresentation
(TLspPaintRepresentation aPaintRepresentation) Removes a supported paint representation.void
De-registers the givenPropertyChangeListener
from receiving property change events for this object.void
removeSelectionListener
(ILcdSelectionListener<Object> aSelectionListener) Removes anILcdSelectionListener
from thisILcdSelection
.void
removeStatusListener
(ILcdStatusListener<ILspLayer> aStatusListener) Removes a previously added status listener from this layer.Returns the objects in this selection.void
selectObject
(Object aObject, boolean aSelection, int aDispatchEventMode) Changes the selection state of any element contained in theILcdModel
thisILcdLayer
refers to.void
selectObjects
(Collection<Object> aObjects, boolean aSelection, int aDispatchEventMode) Changes the selection state for the given collection of objects contained in theILcdModel
this layer refers to.void
setEditable
(boolean aEditable) Sets whether the layer should allow editing the content that it visualizes.void
setEditable
(TLspPaintRepresentation aPaintRepresentation, boolean aEditable) Enables or disables the editable property of a paint representation.void
setFilter
(ILcdDynamicFilter aFilter) Sets theILcdDynamicFilter
to filter the objects on this layer.void
Sets a visual indication of the contents of this layer.void
Sets the textual representation of thisILcdLayer
.void
setLayerStyle
(TLspLayerStyle aLayerStyle) Sets a layer style to this layer.void
setMapScaleRange
(TLspPaintRepresentation aPaintRepresentation, TLcdDimensionInterval<TLcdMapScale> aMapScaleRange) Sets the scale range of this layer to the given unitless map scale ratio range.void
Sets theILcdModel
to this layer.void
setSelectable
(boolean aSelectable) Sets the Selectable property of thisILcdLayer
.void
setSynchronous
(boolean aSynchronous) Specifies whether this layer should paint synchronously.void
setVisible
(boolean aVisible) Sets whether or not the layer's content is painted.void
setVisible
(TLspPaintRepresentation aPaintRepresentation, boolean aVisible) Enables or disables allTLspPaintRepresentationState
s of the specifiedTLspPaintRepresentation
.void
setVisible
(TLspPaintRepresentationState aPaintRepresentationState, boolean aVisible) Enables or disables the a paint representation state.void
unregisterView
(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, wait
Methods inherited from interface com.luciad.util.ILcdSelection
getSelectedObjects
Methods 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:
getLayerType
in interfaceILspLayer
- Returns:
LayerType#EDITABLE
- See Also:
-
registerView
Description copied from interface:ILspLayer
Registers 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:
registerView
in interfaceILspLayer
- Parameters:
aView
- the view to which this layer has been added
-
unregisterView
Description copied from interface:ILspLayer
Unregisters 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:
unregisterView
in interfaceILspLayer
- Parameters:
aView
- the view from which this layer has been removed
-
getCurrentViews
Description copied from interface:ILspLayer
Returns 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:
getCurrentViews
in interfaceILspLayer
- Returns:
- a collection of views in which this layer is currently present
- See Also:
-
getModel
Gets theILcdModel
currently associated to this layer. -
setModel
Sets theILcdModel
to 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:
invalidate
in 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:
setVisible
in interfaceILcdLayer
- Specified by:
setVisible
in interfaceILspLayer
- Parameters:
aVisible
-true
if the layer should be visible,false
otherwise.- See Also:
-
getFilter
Returns the currentILcdDynamicFilter
that 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
ILcdDynamicFilter
to 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
null
filter, 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:ILcdLayer
Returns whether or not the layer's content is painted. -
setVisible
Description copied from interface:ILspLayer
Enables 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:
setVisible
in 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:ILspLayer
Returns whether the specifiedPaintRepresentationState
is enabled or not. -
setVisible
Description copied from interface:ILspLayer
Enables or disables allTLspPaintRepresentationState
s 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:
setVisible
in 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:ILspLayer
Returns whether one of theTLspPaintRepresentationState
s of the the specifiedTLspPaintRepresentation
is enabled. -
isEditableSupported
public boolean isEditableSupported()Description copied from interface:ILcdLayer
Returnstrue
if the layer supports editing its objects.- Specified by:
isEditableSupported
in interfaceILcdLayer
- Returns:
true
- See Also:
-
setEditable
public void setEditable(boolean aEditable) Description copied from interface:ILcdLayer
Sets whether the layer should allow editing the content that it visualizes. CheckisEditableSupported
to see if the layer supports editing.- Specified by:
setEditable
in interfaceILcdLayer
- Specified by:
setEditable
in interfaceILspLayer
- Parameters:
aEditable
- true if the layer content can be edited- See Also:
-
isEditable
public boolean isEditable()Description copied from interface:ILcdLayer
Returns whether the layer allows editing the content that it visualizes.- Specified by:
isEditable
in interfaceILcdLayer
- Returns:
true
if thisILcdLayer
is editable,false
otherwise- See Also:
-
setEditable
Description copied from interface:ILspLayer
Enables 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:
setEditable
in 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:ILspLayer
Returns whether the specifiedPaintRepresentation
is editable or not.- Specified by:
isEditable
in interfaceILspLayer
- Parameters:
aPaintRepresentation
- the paint representation to check- Returns:
- whether the specified
PaintRepresentation
is editable or not - See Also:
-
getLabel
Description copied from interface:ILcdLayer
A 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:ILcdLayer
Returns 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:ILcdLayer
Sets 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
- ifaPaintRepresentation
is 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, ornull
to deactivate any scale restriction- Throws:
IllegalArgumentException
- ifaPaintRepresentation
is not supported- Since:
- 2021.1
- See Also:
-
getPaintRepresentations
No paint representations are supported by default.- Specified by:
getPaintRepresentations
in interfaceILspLayer
- Returns:
- a collection of
PaintRepresentation
s, 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
ILcdModelXYZWorldTransformation
for differentILcdModelReferences
orILcdXYZWorldReference
.By default this method calls
createModelXYZWorldTransformation
to create a new transformation instance.- Specified by:
getModelXYZWorldTransformation
in 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:ILspLayer
Adds a state change listener to this layer. The layer must notify this listener when any of its state for a specificTLspPaintRepresentation
orTLspPaintRepresentationState
is changed. This state change is described respectively by aTLspLayerStateEvent
or aTLspLayerPaintStateEvent
.- Specified by:
addLayerStateListener
in interfaceILspLayer
- Parameters:
aListener
- the state change listener to be registered on this layer
-
removeLayerStateListener
Description copied from interface:ILspLayer
Removes the specified state listener from this layer.- Specified by:
removeLayerStateListener
in 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:ILspLayer
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.- Specified by:
addStatusListener
in interfaceILspLayer
- Parameters:
aStatusListener
- a status listener
-
removeStatusListener
Description copied from interface:ILspLayer
Removes a previously added status listener from this layer. The listener will no longer be notified of changes in layer progress- Specified by:
removeStatusListener
in interfaceILspLayer
- Parameters:
aStatusListener
- a status listener
-
fireStatusEvent
Fires a status event.- Parameters:
aStatusEvent
- the status event
-
addPropertyChangeListener
Description copied from interface:ILcdPropertyChangeSource
Registers the given
PropertyChangeListener
to 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
ALcdWeakPropertyChangeListener
instance as property change listener.- Specified by:
addPropertyChangeListener
in interfaceILcdPropertyChangeSource
- Parameters:
listener
- The listener to be notified- See Also:
-
removePropertyChangeListener
Description copied from interface:ILcdPropertyChangeSource
De-registers the given
PropertyChangeListener
from 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:
removePropertyChangeListener
in 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:ILcdSelection
Returns the objects in this selection.- Specified by:
selectedObjects
in interfaceILcdSelection<Object>
- Returns:
- the objects currently in this
ILcdSelection
.
-
getSelectionCount
public int getSelectionCount()Description copied from interface:ILcdSelection
Returns the number of objects in this selection.- Specified by:
getSelectionCount
in interfaceILcdSelection<Object>
- Returns:
- the number of objects in this
ILcdSelection
.
-
isSelected
Description copied from interface:ILcdSelection
Checks whether the givenObject
is currently in the set of selected objects.- Specified by:
isSelected
in interfaceILcdSelection<Object>
- Parameters:
aObject
- theObject
to be checked.- Returns:
true
if theObject
is in thisILcdSelection
, false otherwise.- Throws:
IllegalArgumentException
-
selectObject
Description copied from interface:ILcdLayer
Changes the selection state of any element contained in theILcdModel
thisILcdLayer
refers to. This method shall have an effect only if isSelectableSupported and isSelectable return true.- Specified by:
selectObject
in interfaceILcdLayer
- Parameters:
aObject
- theObject
to 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,true
to select,false
to 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 theILcdModel
this 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,true
to select,false
to deselectaDispatchEventMode
- shall be one amongILcdFireEventMode.FIRE_NOW
,ILcdFireEventMode.FIRE_LATER
,ILcdFireEventMode.NO_EVENT
- See Also:
-
fireCollectedSelectionChanges
public void fireCollectedSelectionChanges()Description copied from interface:ILcdLayer
Fires aTLcdSelectionChangedEvent
that contains all the selection changes appended by successively callingselectObject(Object, boolean, ILcdFireEventMode.FIRE_LATER)
.- Specified by:
fireCollectedSelectionChanges
in interfaceILcdLayer
-
clearSelection
public void clearSelection(int aDispatchEventMode) Description copied from interface:ILcdLayer
Deselect all the Objects in thisILcdLayer
, i.e., the selection of thisILcdLayer
is empty afterward.- Specified by:
clearSelection
in interfaceILcdLayer
- Parameters:
aDispatchEventMode
- shall be one amongILcdFireEventMode.FIRE_NOW
,ILcdFireEventMode.FIRE_LATER
,ILcdFireEventMode.NO_EVENT
- See Also:
-
addSelectionListener
Description copied from interface:ILcdSelection
Adds 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 aALcdWeakSelectionListener
instance as selection listener.- Specified by:
addSelectionListener
in interfaceILcdSelection<Object>
- Parameters:
aSelectionListener
- theILcdSelectionListener
to be added.
-
removeSelectionListener
Description copied from interface:ILcdSelection
Removes anILcdSelectionListener
from thisILcdSelection
.- Specified by:
removeSelectionListener
in interfaceILcdSelection<Object>
- Parameters:
aSelectionListener
- theILcdSelectionListener
to be removed.
-
isSelectableSupported
public boolean isSelectableSupported()Description copied from interface:ILcdLayer
Returnstrue
if this layer supports selecting objects,false
otherwise.- Specified by:
isSelectableSupported
in interfaceILcdLayer
- Returns:
true
- See Also:
-
setSelectable
public void setSelectable(boolean aSelectable) Description copied from interface:ILcdLayer
Sets the Selectable property of thisILcdLayer
. CheckisSelectableSupported
to see if the layer supports selection.- Specified by:
setSelectable
in interfaceILcdLayer
- Parameters:
aSelectable
-true
if the layer allows selection,false
otherwise.- See Also:
-
isSelectable
public boolean isSelectable()Description copied from interface:ILcdLayer
Returns whether the layer's objects can be selected, for example, by clicking on them.- Specified by:
isSelectable
in interfaceILcdLayer
- Returns:
true
if the layer allows selection,false
otherwise.- 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:
getBounds
in 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:ILspLayer
Gets the current layer style. You can reset the layer style like this:layer.setLayerStyle(TLspLayerStyle.newBuilder().build());
- Specified by:
getLayerStyle
in interfaceILspLayer
- Returns:
- the layer style. Never
null
.
-
setLayerStyle
Description copied from interface:ILspLayer
Sets 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:
setLayerStyle
in interfaceILspLayer
- Parameters:
aLayerStyle
- the layer style. must not benull
.
-