GXY view
, or use Lightspeed layers.public class TLspGXYLayerAdapter extends ALspLayer implements ILspInteractivePaintableLayer, ILspSnappable
A class that wraps around an ILcdGXYLayer
and presents it as an ILspLayer
. To
this effect, the ILcdGXYLayer
is painted onto an offscreen image which can then in turn
be painted in the ILspView
.
The painting of the ILcdGXYLayer
happens on an anonymous (pooled) thread. To ensure
thread-safety, this class offers invocation methods (e.g. invokeAndWaitOnGXYLayer
). It is advised that any modification that may
interfere with painting, is executed through these invocation methods. For example, modifications
to the styling of the ILcdGXYLayer
have an effect on the painting, so these must be
wrapped in a ILcdGXYAsynchronousLayerRunnable
and passed to an appropriate invocation method.
This class has the following limitations:
ILspLayer.LayerType
Constructor and Description |
---|
TLspGXYLayerAdapter(ILcdGXYLayer aGXYLayer)
Deprecated.
Creates a new adapter for the given
ILcdGXYLayer . |
TLspGXYLayerAdapter(ILcdGXYLayer aGXYLayer,
ILspLayer.LayerType aLayerType)
Deprecated.
Creates a new adapter for the given
ILcdGXYLayer . |
Modifier and Type | Method and Description |
---|---|
void |
addEditingStateListener(ILspEditingStateListener aListener)
Deprecated.
/**
Adds an
ILspEditingStateListener to this ILspInteractivePaintableLayer . |
void |
addSelectionListener(ILcdSelectionListener<Object> aSelectionListener)
Deprecated.
Adds a listener to this selection.
|
void |
clearSelection(int aDispatchEventMode)
Deprecated.
Deselect all the Objects in this
ILcdLayer , i.e., the selection of
this ILcdLayer is empty afterward. |
void |
editedObjectChanged(Object aObject)
Deprecated.
This method should be called when an object that is being edited has changed significantly.
|
void |
editedObjectsChanged(Collection<Object> aObjectList)
Deprecated.
This method should be called when a group of objects that is being edited has changed significantly.
|
void |
fireCollectedSelectionChanges()
Deprecated.
Fires a
TLcdSelectionChangedEvent that contains all the
selection changes appended by successively calling
selectObject(Object, boolean, ILcdFireEventMode.FIRE_LATER) . |
void |
fireStatusEvent(TLcdStatusEvent<ILspLayer> aStatusEvent)
Deprecated.
Fires a status event.
|
ILspEditor |
getEditor(TLspPaintRepresentation aPaintRepresentation)
Deprecated.
Returns the editor currently associated with the given paint representation, or
null
if no editor is associated. |
ILcdDynamicFilter |
getFilter()
Deprecated.
Returns the current
ILcdDynamicFilter that filters the objects on this layer. |
ILcdGXYLayer |
getGXYLayer()
Deprecated.
Returns the GXY layer contained in this adapter.
|
ILcdGXYLabelingAlgorithm |
getGXYLayerLabelingAlgorithm()
Deprecated.
Method to retrieve an
ILcdGXYLabelingAlgorithm
used to place the labels of the internal GXY layer. |
ILcdIcon |
getIcon()
Deprecated.
Returns a visual indication of the contents of this layer.
|
String |
getLabel()
Deprecated.
A short textual representation of this
ILcdLayer . |
ILspLayer.LayerType |
getLayerType()
Deprecated.
Returns the layer type set via this layer's constructor.
|
TLcdDimensionInterval<TLcdMapScale> |
getMapScaleRange(TLspPaintRepresentation aPaintRepresentation)
Deprecated.
Returns the scale range of a TLspPaintRepresentation of this layer in unitless map scale ratios.
|
ILcdModel |
getModel()
Deprecated.
Gets the
ILcdModel currently associated to this layer. |
ILcdModelXYZWorldTransformation |
getModelXYZWorldTransformation(ILspView aView)
Deprecated.
Returns the transformation that will be used to transform coordinates of the objects
in the model to world coordinates of the given view.
|
ILcdCollection<Object> |
getObjectsWithPaintState(TLspPaintState aState)
Deprecated.
Returns the objects in the specified paint state.
|
ILspPainter |
getPainter(TLspPaintRepresentation aPaintRepresentation)
Deprecated.
Returns the painter currently associated with the specified paint
representation, or
null if no painter is associated. |
Collection<TLspPaintRepresentation> |
getPaintRepresentations()
Deprecated.
The GXY layer adapter only supports the
TLspPaintRepresentation.BODY and TLspPaintRepresentation.LABEL
paint representations. |
TLspOpenGLProfile |
getRequiredOpenGLProfile()
Deprecated.
Returns the minimum required OpenGL profile that a view must support in
order to be compatible with this layer.
|
int |
getSelectionCount()
Deprecated.
Returns the number of objects in this selection.
|
ILspStyler |
getStyler(TLspPaintRepresentationState aPaintRepresentationState)
Deprecated.
Returns null, because LuciadLightspeed styles are not used by the GXY layer adapter.
|
void |
invokeAndWaitOnGXYLayer(ILcdGXYAsynchronousLayerRunnable aRunnable)
Deprecated.
Executes the given layer runnable so that it does not interfere with the painting.
|
void |
invokeLaterOnGXYLayer(ILcdGXYAsynchronousLayerRunnable aRunnable)
Deprecated.
Executes the given layer runnable so that it does not interfere with the painting.
|
boolean |
isEditable()
Deprecated.
Returns whether the layer allows editing the content that it visualizes.
|
boolean |
isEditable(TLspPaintRepresentation aPaintRepresentation)
Deprecated.
Returns whether the specified
PaintRepresentation is editable or not. |
boolean |
isEditableSupported()
Deprecated.
Returns
true if the layer supports editing its objects. |
boolean |
isSelectable()
Deprecated.
Returns whether the layer's objects can be selected, for example, by clicking on them.
|
boolean |
isSelectableSupported()
Deprecated.
Returns
true if this layer supports selecting objects, false otherwise. |
boolean |
isSelected(Object aObject)
Deprecated.
Checks whether the given
Object is currently in the set of
selected objects. |
boolean |
isSnapTarget()
Deprecated.
Determines whether this object should be regarded as a source for snapping points.
|
boolean |
isVisible()
Deprecated.
Returns whether or not the layer's content is painted.
|
boolean |
isVisible(TLspPaintRepresentation aPaintRepresentation)
Deprecated.
Returns whether one of the
TLspPaintRepresentationState s of the the specified
TLspPaintRepresentation is enabled. |
boolean |
isVisible(TLspPaintRepresentationState aPaintRepresentationState)
Deprecated.
Returns whether the specified
PaintRepresentationState is enabled or not. |
TLspPaintProgress |
paint(ILcdGLDrawable aGLDrawable,
TLspPaintPhase aPhase,
TLspPaintRepresentationState aPaintRepresentationState,
ILspView aView)
Deprecated.
Renders the specified paint representation of this layer into a view.
|
<T> T |
query(ALspPaintQuery<T> aQuery,
TLspContext aContext)
Deprecated.
Retrieves a set of domain objects and data based on the parameters given by the query.
|
void |
removeEditingStateListener(ILspEditingStateListener aListener)
Deprecated.
Removes an
ILspEditingStateListener from this ILspInteractivePaintableLayer . |
void |
removeSelectionListener(ILcdSelectionListener<Object> aSelectionListener)
Deprecated.
Removes an
ILcdSelectionListener from this ILcdSelection . |
Enumeration<Object> |
selectedObjects()
Deprecated.
Returns the objects in this selection.
|
void |
selectObject(Object aObject,
boolean aSelection,
int aDispatchEventMode)
Deprecated.
Changes the selection state of any element contained in the
ILcdModel this ILcdLayer refers to. |
void |
selectObjects(Collection<Object> aObjects,
boolean aSelection,
int aDispatchEventMode)
Deprecated.
Changes the selection state for the given collection of objects contained in the
ILcdModel this
layer refers to. |
void |
setEditable(boolean aEditable)
Deprecated.
Sets whether the layer should allow editing the content that it visualizes.
|
void |
setEditable(TLspPaintRepresentation aPaintRepresentation,
boolean aEditable)
Deprecated.
Enables or disables the editable property of a paint representation.
|
void |
setFilter(ILcdDynamicFilter aFilter)
Deprecated.
Sets the
ILcdDynamicFilter to filter the objects on this layer. |
void |
setGXYLayerLabelingAlgorithm(ILcdGXYLabelingAlgorithm aLabelingAlgorithm)
Deprecated.
Assigns a label algorithm which will be used to place the labels of the internal GXY layer.
|
void |
setIcon(ILcdIcon aIcon)
Deprecated.
Sets a visual indication of the contents of this layer.
|
void |
setLabel(String aLabel)
Deprecated.
Sets the textual representation of this
ILcdLayer . |
void |
setMapScaleRange(TLspPaintRepresentation aPaintRepresentation,
TLcdDimensionInterval<TLcdMapScale> aMapScaleRange)
Deprecated.
Sets the scale range of this layer to the given unitless map scale ratio range.
|
void |
setModel(ILcdModel aModel)
Deprecated.
Sets the
ILcdModel to this layer. |
void |
setSelectable(boolean aSelectable)
Deprecated.
Sets the Selectable property of this
ILcdLayer . |
void |
setSnapTarget(boolean aSnapTarget)
Deprecated.
Sets whether this object should be regarded as a source for snapping points.
|
void |
setVisible(boolean aVisible)
Deprecated.
Sets whether or not the layer's content is painted.
|
void |
setVisible(TLspPaintRepresentation aPaintRepresentation,
boolean aVisible)
Deprecated.
Enables or disables all
TLspPaintRepresentationState s of the specified
TLspPaintRepresentation . |
void |
setVisible(TLspPaintRepresentationState aPaintRepresentationState,
boolean aVisible)
Deprecated.
Enables or disables the a paint representation state.
|
String |
toString()
Deprecated.
|
addLayerStateListener, addPaintRepresentation, addPropertyChangeListener, addStatusListener, createModelXYZWorldTransformation, fireLayerStateChange, fireLayerStateChange, fireLayerStateChange, fireLayerStateChange, firePropertyChange, getBounds, getCurrentViews, getLayerStyle, invalidate, isSynchronous, registerView, removeLayerStateListener, removePaintRepresentation, removePropertyChangeListener, removeStatusListener, setLayerStyle, setSynchronous, unregisterView
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addLayerStateListener, addStatusListener, getBounds, getCurrentViews, getLayerStyle, getMapScaleProvider, invalidate, registerView, removeLayerStateListener, removeStatusListener, setLayerStyle, unregisterView
getSelectedObjects
addPropertyChangeListener, removePropertyChangeListener
addPropertyChangeListener, removePropertyChangeListener
public TLspGXYLayerAdapter(ILcdGXYLayer aGXYLayer, ILspLayer.LayerType aLayerType)
Creates a new adapter for the given ILcdGXYLayer
.
For thread safety, the given layer should operate synchronously. Hence, no ILcdGXYAsynchronousLayerWrapper instance should be passed.
In case aGXYLayer
is a TLcdLayer
, it may only have
a null
filter or a
non-null
ILcdDynamicFilter
. It is also not allowed to
set a filter which is not a
ILcdDynamicFilter
instance on aGXYLayer
as long as aGXYLayer
is
contained in a TLspGXYLayerAdapter
.
aGXYLayer
- a synchronous layer to visualize and interact withaLayerType
- the LayerType
of the new layerpublic TLspGXYLayerAdapter(ILcdGXYLayer aGXYLayer)
ILcdGXYLayer
.
For thread safety, the given layer should operate synchronously.
Hence, no ILcdGXYAsynchronousLayerWrapper instance should be passed.aGXYLayer
- a synchronous layer to visualize and interact withpublic void setGXYLayerLabelingAlgorithm(ILcdGXYLabelingAlgorithm aLabelingAlgorithm)
aLabelingAlgorithm
- A label algorithm which will be used to declutter the labels of the internal GXY layer.
If null
the currently installed label algorithm will be removedpublic ILcdGXYLabelingAlgorithm getGXYLayerLabelingAlgorithm()
ILcdGXYLabelingAlgorithm
used to place the labels of the internal GXY layer.
In case no labeling algorithm is installed, this method returns null
.ILcdGXYLabelingAlgorithm
used to declutter the labels of the internal GXY layer.
null
in case no labeling algorithm is installed.public ILspLayer.LayerType getLayerType()
LayerType
argument is used, the default value is
ILspLayer.LayerType.EDITABLE
.getLayerType
in interface ILspLayer
getLayerType
in class ALspLayer
LayerType
ILspLayer.LayerType
public ILcdGXYLayer getGXYLayer()
invokeAndWaitOnGXYLayer(ILcdGXYAsynchronousLayerRunnable aRunnable)
method
to make sure no synchronization issues occur.invokeAndWaitOnGXYLayer(ILcdGXYAsynchronousLayerRunnable aRunnable)
public boolean isSnapTarget()
ILspSnappable
isSnapTarget
in interface ILspSnappable
public void setSnapTarget(boolean aSnapTarget)
ILspSnappable
setSnapTarget
in interface ILspSnappable
aSnapTarget
- if true, this object should be regarded as a source for snapping points, i.e.
it should be possible to snap to this object; if false, this object should not
produce snapping candidates.public void fireStatusEvent(TLcdStatusEvent<ILspLayer> aStatusEvent)
ALspLayer
fireStatusEvent
in class ALspLayer
aStatusEvent
- the status eventpublic ILspPainter getPainter(TLspPaintRepresentation aPaintRepresentation)
ILspInteractivePaintableLayer
null
if no painter is associated.getPainter
in interface ILspInteractivePaintableLayer
aPaintRepresentation
- the paint representation for which to obtain a painternull
otherwisepublic ILspEditor getEditor(TLspPaintRepresentation aPaintRepresentation)
ILspInteractivePaintableLayer
null
if no editor is associated.getEditor
in interface ILspInteractivePaintableLayer
aPaintRepresentation
- the paint representation for which to retrieve an editornull
otherwisepublic boolean isVisible(TLspPaintRepresentation aPaintRepresentation)
ILspLayer
TLspPaintRepresentationState
s of the the specified
TLspPaintRepresentation
is enabled.isVisible
in interface ILspLayer
isVisible
in class ALspLayer
aPaintRepresentation
- the paint representation to checkPaintRepresentation
is enabled or notILspLayer.setVisible(TLspPaintRepresentation, boolean)
public void setVisible(boolean aVisible)
ALspLayer
This method is not thread safe, it is recommended to synchronize on the layer instance if needed.
setVisible
in interface ILcdLayer
setVisible
in interface ILspLayer
setVisible
in class ALspLayer
aVisible
- true
if the layer should be visible, false
otherwise.ILspLayer.setVisible(TLspPaintRepresentationState, boolean)
public boolean isVisible()
ILcdLayer
isVisible
in interface ILcdLayer
isVisible
in class ALspLayer
true
if the layer is visible, false
otherwise.ILcdLayer.setVisible(boolean)
public void setVisible(TLspPaintRepresentationState aPaintRepresentationState, boolean aVisible)
ILspLayer
layer visibility
. So a paint
representation state will only be visible when this method and the ILcdLayer.isVisible()
method
return true
.setVisible
in interface ILspLayer
setVisible
in class ALspLayer
aPaintRepresentationState
- the representations to enable or disableaVisible
- true to enable the representations or false to disable itILspLayer.setVisible(boolean)
public boolean isVisible(TLspPaintRepresentationState aPaintRepresentationState)
ILspLayer
PaintRepresentationState
is enabled or not.isVisible
in interface ILspLayer
isVisible
in class ALspLayer
aPaintRepresentationState
- the paint representation to checkPaintRepresentationState
is enabled or notILspLayer.setVisible(TLspPaintRepresentationState, boolean)
public void setVisible(TLspPaintRepresentation aPaintRepresentation, boolean aVisible)
ILspLayer
TLspPaintRepresentationState
s of the specified
TLspPaintRepresentation
.
This can be used to quickly switch representations (e.g. labels) on and off
without having to remove its related properties (ex. a painter).setVisible
in interface ILspLayer
setVisible
in class ALspLayer
aPaintRepresentation
- the representation to enable or disableaVisible
- true to enable the representations or false to disable itILspLayer.setVisible(TLspPaintRepresentationState, boolean)
public void setEditable(TLspPaintRepresentation aPaintRepresentation, boolean aEditable)
ILspLayer
layer editability
. So paint
representation will only be editable when both the layer and the paint representation are
editable and editing is supported
.setEditable
in interface ILspLayer
setEditable
in class ALspLayer
aPaintRepresentation
- the representation to enable or disableaEditable
- true to enable the representations or false to disable itILspLayer.setEditable(boolean)
,
ILcdLayer.isEditableSupported()
public boolean isEditable(TLspPaintRepresentation aPaintRepresentation)
ILspLayer
PaintRepresentation
is editable or not.isEditable
in interface ILspLayer
isEditable
in class ALspLayer
aPaintRepresentation
- the paint representation to checkPaintRepresentation
is editable or notILspLayer.setEditable(TLspPaintRepresentation, boolean)
public void setFilter(ILcdDynamicFilter aFilter)
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 is null
.
This method is not thread safe, it is recommended to synchronize on the layer instance if needed.
This method should only be used if the inner GXY layer supports filtering, which is only the
case for TLcdLayer
instances. An UnsupportedOperationException
will
be thrown when the inner layer is not a TLcdLayer
.
setFilter
in class ALspLayer
aFilter
- the filter that accepts only those objects that should be taken
into accountALspLayer.getFilter()
public ILcdDynamicFilter getFilter()
ILcdDynamicFilter
that filters the objects on this layer.
Returns the adapter layer's filter if it extends TLcdLayer
, or null otherwise.
getFilter
in class ALspLayer
null
ALspLayer.setFilter(com.luciad.util.ILcdDynamicFilter)
public TLspOpenGLProfile getRequiredOpenGLProfile()
ILspPaintableLayer
getRequiredOpenGLProfile
in interface ILspPaintableLayer
TLspGLProfile
public TLspPaintProgress paint(ILcdGLDrawable aGLDrawable, TLspPaintPhase aPhase, TLspPaintRepresentationState aPaintRepresentationState, ILspView aView)
ILspPaintableLayer
ILcdGLDrawable
as an
access point to the OpenGL API. In addition to rendering the individual paint representations,
views may also perform multiple rendering passes to support things such as transparency
rendering or terrain of data on a 3D terrain. To this effect, the layer must honor the
supplied TLspPaintPhase
.
This method returns a TLspPaintProgress
object to indicate whether the repaint
was entirely finished or not. This might not be the case if the paint()
method scheduled
some asynchronous processing task, whose result is needed to complete the paint operation. For
instance, if the layer loads data in the background on demand, it may return early rather than
letting the paint()
method block until the data is available. In this case the view is
left incomplete, but additional repaints of the view will incrementally become more
up-to-date,
and the progress objects retrieved after each new repaint can be used to provide progress
information to the user.paint
in interface ILspPaintableLayer
aGLDrawable
- the access point to OpenGLaPhase
- describes the phase that the view repaint process is
currently inaPaintRepresentationState
- identifies which paint representation state the layer should
render into the viewaView
- the view into which the layer is being renderedpublic ILcdCollection<Object> getObjectsWithPaintState(TLspPaintState aState)
ILspInteractivePaintableLayer
TLspPaintState.REGULAR
, you can use ILspInteractivePaintableLayer.query(com.luciad.view.lightspeed.query.ALspPaintQuery<T>, com.luciad.view.lightspeed.TLspContext)
instead to get the current regular objects in the view.
The state of objects can be modified by adding/removing them from the returned collection. You
can be informed when the objects in a certain state change by adding a listener to the
returned collection.getObjectsWithPaintState
in interface ILspInteractivePaintableLayer
aState
- a paint statepublic void editedObjectChanged(Object aObject)
ILspInteractivePaintableLayer
editedObjectChanged
in interface ILspInteractivePaintableLayer
aObject
- the objectTLspEditingStateEvent.ChangeType.EDITING_CHANGE
,
ILspInteractivePaintableLayer.addEditingStateListener(com.luciad.view.lightspeed.editor.operation.ILspEditingStateListener)
public void editedObjectsChanged(Collection<Object> aObjectList)
ILspInteractivePaintableLayer
editedObjectsChanged
in interface ILspInteractivePaintableLayer
aObjectList
- A list of domain objects (in this layer) that have changed significantly. Never null.TLspEditingStateEvent.ChangeType.EDITING_CHANGE
,
ILspInteractivePaintableLayer.addEditingStateListener(com.luciad.view.lightspeed.editor.operation.ILspEditingStateListener)
public void addEditingStateListener(ILspEditingStateListener aListener)
ILspInteractivePaintableLayer
ILspEditingStateListener
to this ILspInteractivePaintableLayer
.addEditingStateListener
in interface ILspInteractivePaintableLayer
aListener
- the ILspEditingStateListener
to be added.public void removeEditingStateListener(ILspEditingStateListener aListener)
ILspInteractivePaintableLayer
ILspEditingStateListener
from this ILspInteractivePaintableLayer
.removeEditingStateListener
in interface ILspInteractivePaintableLayer
aListener
- the ILspEditingStateListener
to be removed.public void invokeAndWaitOnGXYLayer(ILcdGXYAsynchronousLayerRunnable aRunnable)
aRunnable
- the runnable to execute. The wrapped gxy layer will be used as argument for the
runnable's execution.public void invokeLaterOnGXYLayer(ILcdGXYAsynchronousLayerRunnable aRunnable)
aRunnable
- the runnable to execute. The invocation will pass the wrapped gxy layer as argumentpublic Collection<TLspPaintRepresentation> getPaintRepresentations()
TLspPaintRepresentation.BODY
and TLspPaintRepresentation.LABEL
paint representations.getPaintRepresentations
in interface ILspLayer
getPaintRepresentations
in class ALspLayer
PaintRepresentation
s, never null
public ILcdModelXYZWorldTransformation getModelXYZWorldTransformation(ILspView aView)
ALspLayer
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 different
ILcdModelReferences
or ILcdXYZWorldReference
.
By default this method calls createModelXYZWorldTransformation
to create a new transformation instance.
getModelXYZWorldTransformation
in interface ILspLayer
getModelXYZWorldTransformation
in class ALspLayer
aView
- the viewpublic boolean isSelectable()
ILcdLayer
isSelectable
in interface ILcdLayer
isSelectable
in class ALspLayer
true
if the layer allows selection, false
otherwise.ILcdSelection
,
ILcdLayer.setSelectable(boolean)
public void setSelectable(boolean aSelectable)
ILcdLayer
ILcdLayer
.
Check isSelectableSupported
to see if the layer supports selection.setSelectable
in interface ILcdLayer
setSelectable
in class ALspLayer
aSelectable
- true
if the layer allows selection, false
otherwise.ILcdLayer.isSelectable()
,
ILcdLayer.isSelectableSupported()
public boolean isSelectableSupported()
ILcdLayer
true
if this layer supports selecting objects, false
otherwise.isSelectableSupported
in interface ILcdLayer
isSelectableSupported
in class ALspLayer
true
ILcdLayer.setSelectable(boolean)
,
ILcdLayer.selectObject(java.lang.Object, boolean, int)
public void addSelectionListener(ILcdSelectionListener<Object> aSelectionListener)
ILcdSelection
ILcdSelection
,
you can use a ALcdWeakSelectionListener
instance as selection listener.addSelectionListener
in interface ILcdSelection<Object>
addSelectionListener
in class ALspLayer
aSelectionListener
- the ILcdSelectionListener
to be added.public void removeSelectionListener(ILcdSelectionListener<Object> aSelectionListener)
ILcdSelection
ILcdSelectionListener
from this ILcdSelection
.removeSelectionListener
in interface ILcdSelection<Object>
removeSelectionListener
in class ALspLayer
aSelectionListener
- the ILcdSelectionListener
to be removed.public void clearSelection(int aDispatchEventMode)
ILcdLayer
ILcdLayer
, i.e., the selection of
this ILcdLayer
is empty afterward.clearSelection
in interface ILcdLayer
clearSelection
in class ALspLayer
aDispatchEventMode
- shall be one among ILcdFireEventMode.FIRE_NOW
,
ILcdFireEventMode.FIRE_LATER
, ILcdFireEventMode.NO_EVENT
ILcdFireEventMode
public void fireCollectedSelectionChanges()
ILcdLayer
TLcdSelectionChangedEvent
that contains all the
selection changes appended by successively calling
selectObject(Object, boolean, ILcdFireEventMode.FIRE_LATER)
.fireCollectedSelectionChanges
in interface ILcdLayer
fireCollectedSelectionChanges
in class ALspLayer
public void selectObjects(Collection<Object> aObjects, boolean aSelection, int aDispatchEventMode)
ALspLayer
ILcdModel
this
layer refers to. This method shall have an effect only if
ALspLayer.isSelectableSupported() and ALspLayer.isSelectable() return true
.selectObjects
in class ALspLayer
aObjects
- the collection of objects to select or deselectaSelection
- the selection state, true
to select, false
to deselectaDispatchEventMode
- shall be one among ILcdFireEventMode.FIRE_NOW
,
ILcdFireEventMode.FIRE_LATER
, ILcdFireEventMode.NO_EVENT
ILcdFireEventMode
public void selectObject(Object aObject, boolean aSelection, int aDispatchEventMode)
ILcdLayer
ILcdModel
this ILcdLayer
refers to. This method
shall have an effect only if isSelectableSupported and isSelectable return
true.selectObject
in interface ILcdLayer
selectObject
in class ALspLayer
aObject
- the Object
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 among ILcdFireEventMode.FIRE_NOW
,
ILcdFireEventMode.FIRE_LATER
, ILcdFireEventMode.NO_EVENT
ALspLayer.selectObjects(java.util.Collection, boolean, int)
public boolean isSelected(Object aObject) throws IllegalArgumentException
ILcdSelection
Object
is currently in the set of
selected objects.isSelected
in interface ILcdSelection<Object>
isSelected
in class ALspLayer
aObject
- the Object
to be checked.true
if the Object
is in this ILcdSelection
,
false otherwise.IllegalArgumentException
public int getSelectionCount()
ILcdSelection
getSelectionCount
in interface ILcdSelection<Object>
getSelectionCount
in class ALspLayer
ILcdSelection
.public Enumeration<Object> selectedObjects()
ILcdSelection
selectedObjects
in interface ILcdSelection<Object>
selectedObjects
in class ALspLayer
ILcdSelection
.public ILcdModel getModel()
ALspLayer
ILcdModel
currently associated to this layer.public void setModel(ILcdModel aModel)
ALspLayer
ILcdModel
to this layer.
This method is not thread safe, it is recommended to synchronize on the layer instance if needed.
public boolean isEditableSupported()
ILcdLayer
true
if the layer supports editing its objects.isEditableSupported
in interface ILcdLayer
isEditableSupported
in class ALspLayer
true
ILcdLayer.setEditable(boolean)
public void setEditable(boolean aEditable)
ILcdLayer
isEditableSupported
to see if the layer supports editing.setEditable
in interface ILcdLayer
setEditable
in interface ILspLayer
setEditable
in class ALspLayer
aEditable
- true if the layer content can be editedILspLayer.setEditable(TLspPaintRepresentation, boolean)
,
ILcdLayer.isEditableSupported()
public boolean isEditable()
ILcdLayer
isEditable
in interface ILcdLayer
isEditable
in class ALspLayer
true
if this ILcdLayer
is editable,
false
otherwiseILcdLayer.setEditable(boolean)
public String getLabel()
ILcdLayer
ILcdLayer
.public void setLabel(String aLabel)
ALspLayer
ILcdLayer
.
This method is not thread safe, it is recommended to synchronize on the layer instance if needed.
public ILcdIcon getIcon()
ILcdLayer
public void setIcon(ILcdIcon aIcon)
ILcdLayer
setIcon
in interface ILcdLayer
setIcon
in class ALspLayer
aIcon
- a visual indication of the contents of this layer.ILcdLayer.getIcon()
public ILspStyler getStyler(TLspPaintRepresentationState aPaintRepresentationState)
getStyler
in interface ILspStyledLayer
aPaintRepresentationState
- the paint representation state for which the
styler should be retrievedpublic <T> T query(ALspPaintQuery<T> aQuery, TLspContext aContext)
ILspInteractivePaintableLayer
query
in interface ILspInteractivePaintableLayer
T
- the type of the return value of ALspPaintQuery.getResult()
aQuery
- the queryaContext
- the contextALspPaintQuery.getResult()
after processing is finishedpublic TLcdDimensionInterval<TLcdMapScale> getMapScaleRange(TLspPaintRepresentation aPaintRepresentation)
Map scale ranges are unsupported for TLspGXYLayerAdapter
, so this method will always return
null
.
getMapScaleRange
in class ALspLayer
aPaintRepresentation
- the paint representation for which to return the scale rangeALspLayer.setMapScaleRange(com.luciad.view.lightspeed.layer.TLspPaintRepresentation, com.luciad.multidimensional.TLcdDimensionInterval<com.luciad.view.TLcdMapScale>)
public void setMapScaleRange(TLspPaintRepresentation aPaintRepresentation, TLcdDimensionInterval<TLcdMapScale> aMapScaleRange)
Map scale ranges are unsupported for TLspGXYLayerAdapter
, this method will throw an
UnsupportedOperationException
.
setMapScaleRange
in class ALspLayer
aPaintRepresentation
- the paint representationaMapScaleRange
- the new scale range of this layer, or null
to deactivate any scale restrictionUnsupportedOperationException
- alwaysTLspLayer.setMapScaleRange(TLspPaintRepresentation, TLcdDimensionInterval)
,
TLcdMapScale.createScaleRange(TLcdMapScale, TLcdMapScale)