Class TLcdGXYLspAsynchronousLayerTreeNodeWrapper
- All Implemented Interfaces:
ILcdPropertyChangeSource
,ILcdSelection<Object>
,ILcdGXYAsynchronousLayerWrapper
,ILcdGXYLayer
,ILcdLayer
,ILcdLayered
,ILcdLayerTreeNode
,Serializable
TLcdGXYLspAsynchronousLayerWrapper
extension for layer nodes
. It only protects the functionality offered by the ILcdGXYLayer
interface. The node functionality is not protected from asynchronous painting, and should
therefore not be accessed in paint-specific methods.- Since:
- 2012.0
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTLcdGXYLspAsynchronousLayerTreeNodeWrapper
(ILcdGXYLayer aDecoratedGXYLayer, ILspLayer aLayer) Deprecated.Creates a layer node decorator that delegates painting to an asynchronous paint queue. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHierarchyLayeredListener
(ILcdLayeredListener aListener) Deprecated.Registers the givenILcdLayeredListener
to receiveTLcdLayeredEvent
s from all theILcdLayerTreeNode
s contained in the tree with this node as root node.void
Deprecated.Registers the givenPropertyChangeListener
to receivePropertyChangeEvent
s from all theILcdLayer
s contained in the tree with this node as root node.void
Deprecated.Registers the givenILcdSelectionListener
to receiveTLcdSelectionChangedEvent
s from all theILcdLayer
s contained in the tree with this node as root node.boolean
Deprecated.Adds a new node to the tree as a child of this node.boolean
Deprecated.Adds a new node to the tree as a child of this node.void
addLayeredListener
(ILcdLayeredListener aLayeredListener) Deprecated.Registers the givenILcdLayeredListener
to be notified when layers are added, removed or moved.boolean
containsLayer
(ILcdLayer aLayer) Deprecated.Returns whether thisILcdLayered
contains the given layer.Deprecated.Returns the initial layer index provider, which can be used to determine the best index when a layer is added without specifying an index.getLayer
(int aIndex) Deprecated.Returns theILcdLayer
in thisILcdLayered
with indexaIndex
.int
Deprecated.Returns the index if the given layer is in the list.boolean
Deprecated.Returns whether a node should be painted on top of its children when the node is added to a view, or beneath its child layers.int
Deprecated.Returns the number ofILcdLayer
objects in thisILcdLayered
.Deprecated.Returns theILcdLayer
of thisILcdLayered
that contains the givenILcdModel
.layers()
Deprecated.Returns anEnumeration
of allILcdLayer
objects currently in thisILcdLayered
, starting from the bottom layer to the top layer.Deprecated.Returns anEnumeration
of allILcdLayer
objects currently in thisILcdLayered
, starting from the top layer to the bottom layer.void
moveLayerAt
(int aIndex, ILcdLayer aLayer) Deprecated.Moves the given layer (which is already inILcdLayered
) to the existing index aIndex.void
Deprecated.Removes all theILcdLayer
objects from thisILcdLayered
.void
Deprecated.Unregisters the givenILcdLayeredListener
from receivingTLcdLayeredEvent
s for the tree with this node as root node.void
Deprecated.Unregisters the givenPropertyChangeListener
from receivingPropertyChangeEvent
s for the tree with this node as root node.void
Deprecated.Unregisters the givenILcdSelectionListener
from receivingTLcdSelectionChangedEvent
s for the tree with this node as root node.void
removeLayer
(int aIndex) Deprecated.Removes the node at indexaIndex
from this node and sends the appropriateTLcdLayeredEvent
.void
removeLayer
(ILcdLayer aLayer) Deprecated.Removes aLayer from thisILcdLayered
.void
removeLayeredListener
(ILcdLayeredListener aLayeredListener) Deprecated.Unregisters the givenILcdLayeredListener
from receiving layered events for theILcdLayered
.void
setInitialLayerIndexProvider
(ILcdInitialLayerIndexProvider aInitialLayerIndexProvider) Deprecated.Sets an initial layer index provider, which can be used to determine the best index when a layer is added without specifying an index.void
setPaintOnTopOfChildrenHint
(boolean aPaintOnTopOfChildrenHint) Deprecated.Sets whether a node should be painted on top of its children when the node is added to a view, or beneath its child layers.Methods inherited from class com.luciad.view.gxy.asynchronous.lightspeed.TLcdGXYLspAsynchronousLayerWrapper
getAsynchronousGXYLayerChangeTracker, getLspLayer, invokeAndWaitOnGXYAndLspLayer, invokeLaterOnGXYAndLspLayer, invokeLaterOnGXYAndLspLayerInEDT, invokeNowOnGXYAndLspLayer, setGXYAsynchronousPaintQueue
Methods inherited from class com.luciad.view.gxy.asynchronous.TLcdGXYAsynchronousLayerWrapper
addPropertyChangeListener, addSelectionListener, applyOnInteract, clearSelection, fireCollectedSelectionChanges, firePropertyChangeEvent, getBounds, getGXYAsynchronousPaintQueue, getGXYEditor, getGXYLabelPainter, getGXYLayer, getGXYPainter, getGXYPen, getIcon, getLabel, getLabelMapScaleRange, getLabelScaleRange, getMapScaleRange, getModel, getModelXYWorldTransfoClass, getScaleRange, getSelectionCount, getSynchronousGXYLayerChangeTracker, invokeAndWaitOnGXYLayer, invokeLaterOnGXYLayer, invokeLaterOnGXYLayerInEDT, invokeNowOnGXYLayer, isAsynchronous, isEditable, isEditableSupported, isLabeled, isLabeledSupported, isSelectable, isSelectableSupported, isSelected, isTraceOn, isVisible, paint, removePropertyChangeListener, removeSelectionListener, selectedObjects, selectObject, setAsynchronous, setEditable, setIcon, setLabel, setLabeled, setSelectable, setTraceOn, setVisible, stopPainting
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.view.ILcdLayer
clearSelection, fireCollectedSelectionChanges, getIcon, getLabel, getModel, isEditable, isEditableSupported, isSelectable, isSelectableSupported, isVisible, selectObject, setEditable, setIcon, setLabel, setSelectable, setVisible
Methods inherited from interface com.luciad.view.ILcdLayered
addLayeredListener, getLayers, removeLayeredListener
Methods inherited from interface com.luciad.view.ILcdLayerTreeNode
addPropertyChangeListener, removePropertyChangeListener
Methods inherited from interface com.luciad.util.ILcdSelection
addSelectionListener, getSelectedObjects, getSelectionCount, isSelected, removeSelectionListener, selectedObjects
-
Constructor Details
-
TLcdGXYLspAsynchronousLayerTreeNodeWrapper
public TLcdGXYLspAsynchronousLayerTreeNodeWrapper(ILcdGXYLayer aDecoratedGXYLayer, ILspLayer aLayer) Deprecated.Creates a layer node decorator that delegates painting to an asynchronous paint queue. After construction, a paint queue must be set using- Parameters:
aDecoratedGXYLayer
- the layer node to decorate. The node must implement ILcdLayerTreeNode. Paint-sensitive state changes are propagated to and from the wrapper.aLayer
- layer for the visualization of the shape's bodies Paint-sensitive wrapper state changes are propagated to this layer.TLcdGXYLspAsynchronousLayerWrapper.setGXYAsynchronousPaintQueue(com.luciad.view.gxy.asynchronous.ILcdGXYAsynchronousPaintQueue)
-
-
Method Details
-
addHierarchyLayeredListener
Deprecated.Description copied from interface:ILcdLayerTreeNode
Registers the given
ILcdLayeredListener
to receiveTLcdLayeredEvent
s from all theILcdLayerTreeNode
s contained in the tree with this node as root node. If the listener should only receive events for changes occurring in this node, it should be registered as a regular listener (seeILcdLayerTreeNode.addLayeredListener(ILcdLayeredListener)
.The source
ILcdLayered
of the event can be retrieved by callingTLcdLayeredEvent.getLayered()
on the receivedTLcdLayeredEvent
.- Specified by:
addHierarchyLayeredListener
in interfaceILcdLayerTreeNode
- Parameters:
aListener
- the listener
-
removeHierarchyLayeredListener
Deprecated.Description copied from interface:ILcdLayerTreeNode
Unregisters the given
ILcdLayeredListener
from receivingTLcdLayeredEvent
s for the tree with this node as root node.- Specified by:
removeHierarchyLayeredListener
in interfaceILcdLayerTreeNode
- Parameters:
aListener
- the listener
-
addHierarchyPropertyChangeListener
Deprecated.Description copied from interface:ILcdLayerTreeNode
Registers the given
PropertyChangeListener
to receivePropertyChangeEvent
s from all theILcdLayer
s contained in the tree with this node as root node. If the listener should only receive events for changes occurring in this layer, it should be registered as a regular listener (seeILcdLayerTreeNode.addPropertyChangeListener(java.beans.PropertyChangeListener)
).The source layer of the event can be retrieved by calling
EventObject.getSource()
on the receivedPropertyChangeEvent
.- Specified by:
addHierarchyPropertyChangeListener
in interfaceILcdLayerTreeNode
- Parameters:
aListener
- the listener
-
removeHierarchyPropertyChangeListener
Deprecated.Description copied from interface:ILcdLayerTreeNode
Unregisters the given
PropertyChangeListener
from receivingPropertyChangeEvent
s for the tree with this node as root node.- Specified by:
removeHierarchyPropertyChangeListener
in interfaceILcdLayerTreeNode
- Parameters:
aListener
- the listener
-
removeAllLayers
public void removeAllLayers()Deprecated.Description copied from interface:ILcdLayerTreeNode
Removes all theILcdLayer
objects from thisILcdLayered
.This method will generate a
TLcdLayeredEvent
indicating a layer was removed for every child layer.- Specified by:
removeAllLayers
in interfaceILcdLayered
- Specified by:
removeAllLayers
in interfaceILcdLayerTreeNode
-
addLayeredListener
Deprecated.Description copied from interface:ILcdLayerTreeNode
Registers the given
ILcdLayeredListener
to be notified when layers are added, removed or moved.In case you need to register a listener which keeps a reference to an object with a shorter life-time than this layered, you can use a
ALcdWeakLayeredListener
instance as layered listener.This layer will only be informed when child layers are added, removed or moved in this layer node. To receive the events of the whole hierarchical structure, the listener must be added as a hierarchical listener (see
ILcdLayerTreeNode.addHierarchyLayeredListener(ILcdLayeredListener)
).- Specified by:
addLayeredListener
in interfaceILcdLayered
- Specified by:
addLayeredListener
in interfaceILcdLayerTreeNode
- Parameters:
aLayeredListener
- the listener that from now on will be notified of all changes to theILcdLayered
- See Also:
-
removeLayeredListener
Deprecated.Description copied from interface:ILcdLayerTreeNode
Unregisters the givenILcdLayeredListener
from receiving layered events for theILcdLayered
.It is not possible to remove a hierarchy listener with this method. Use
ILcdLayerTreeNode.removeHierarchyLayeredListener(ILcdLayeredListener)
for this purpose.- Specified by:
removeLayeredListener
in interfaceILcdLayered
- Specified by:
removeLayeredListener
in interfaceILcdLayerTreeNode
- Parameters:
aLayeredListener
- the listener that will no longer be notified of changes to theILcdLayered
- See Also:
-
addHierarchySelectionListener
Deprecated.Description copied from interface:ILcdLayerTreeNode
Registers the given
ILcdSelectionListener
to receiveTLcdSelectionChangedEvent
s from all theILcdLayer
s contained in the tree with this node as root node. If the listener should only receive events for selection changes occurring in this layer, it should be registered as a regular listener (seeILcdSelection.addSelectionListener(com.luciad.util.ILcdSelectionListener)
).The source layer of the event can be retrieved by calling
TLcdSelectionChangedEvent.getSelection()
on the receivedTLcdSelectionChangedEvent
.- Specified by:
addHierarchySelectionListener
in interfaceILcdLayerTreeNode
- Parameters:
aListener
- the listener
-
removeHierarchySelectionListener
Deprecated.Description copied from interface:ILcdLayerTreeNode
Unregisters the given
ILcdSelectionListener
from receivingTLcdSelectionChangedEvent
s for the tree with this node as root node.- Specified by:
removeHierarchySelectionListener
in interfaceILcdLayerTreeNode
- Parameters:
aListener
- the listener
-
layerCount
public int layerCount()Deprecated.Description copied from interface:ILcdLayerTreeNode
Returns the number ofILcdLayer
objects in thisILcdLayered
.This number does not include this layer node. It is the number of child layers of this node that is returned.
- Specified by:
layerCount
in interfaceILcdLayered
- Specified by:
layerCount
in interfaceILcdLayerTreeNode
- Returns:
- the number of
ILcdLayer
objects in thisILcdLayered
.
-
layers
Deprecated.Description copied from interface:ILcdLayerTreeNode
Returns anEnumeration
of allILcdLayer
objects currently in thisILcdLayered
, starting from the bottom layer to the top layer.This enumeration does not include this layer node, but only the child layers.
- Specified by:
layers
in interfaceILcdLayered
- Specified by:
layers
in interfaceILcdLayerTreeNode
- Returns:
- an
Enumeration
of allILcdLayer
objects currently in thisILcdLayered
, starting from the bottom layer to the top layer.
-
layersBackwards
Deprecated.Description copied from interface:ILcdLayerTreeNode
Returns anEnumeration
of allILcdLayer
objects currently in thisILcdLayered
, starting from the top layer to the bottom layer.This enumeration does not include this layer node, but only the child layers.
- Specified by:
layersBackwards
in interfaceILcdLayered
- Specified by:
layersBackwards
in interfaceILcdLayerTreeNode
- Returns:
- an
Enumeration
of allILcdLayer
objects currently in thisILcdLayered
, starting from the top layer to the bottom layer.
-
getLayer
Deprecated.Description copied from interface:ILcdLayered
Returns theILcdLayer
in thisILcdLayered
with indexaIndex
.- Specified by:
getLayer
in interfaceILcdLayered
- Parameters:
aIndex
- the position of the layer to retrieve in theILcdLayered
.- Returns:
- the
ILcdLayer
in thisILcdLayered
with indexaIndex
. - Throws:
ArrayIndexOutOfBoundsException
- if the given index is invalid
-
layerOf
Deprecated.Description copied from interface:ILcdLayered
Returns theILcdLayer
of thisILcdLayered
that contains the givenILcdModel
.- Specified by:
layerOf
in interfaceILcdLayered
- Parameters:
aModel
- the model to check for in thisILcdLayered
.- Returns:
- the
ILcdLayer
of thisILcdLayered
that contains the givenILcdModel
. - Throws:
NoSuchElementException
- if there is no layer containing the given model
-
indexOf
Deprecated.Description copied from interface:ILcdLayered
Returns the index if the given layer is in the list.- Specified by:
indexOf
in interfaceILcdLayered
- Parameters:
aLayer
- the layer whose index to return- Returns:
- the index of
aLayer
- Throws:
NoSuchElementException
- ifaLayer
is not in the list
-
containsLayer
Deprecated.Description copied from interface:ILcdLayerTreeNode
Returns whether thisILcdLayered
contains the given layer. More formally, returnstrue
if and only if theILcdLayered
contains at least one layerl
such that (aLayer==null ? l==null : aLayer.equals(l)).Calling this method with this node as parameter will return
false
, since this method only checks the child layers and not the layer node itself.- Specified by:
containsLayer
in interfaceILcdLayered
- Specified by:
containsLayer
in interfaceILcdLayerTreeNode
- Parameters:
aLayer
- the layer to check whether it is in this layered.- Returns:
- true if
aLayer
is in thisILcdLayered
, false otherwise.
-
removeLayer
Deprecated.Description copied from interface:ILcdLayered
Removes aLayer from thisILcdLayered
.- Specified by:
removeLayer
in interfaceILcdLayered
- Parameters:
aLayer
- the layer to remove.- Throws:
NoSuchElementException
-
moveLayerAt
public void moveLayerAt(int aIndex, ILcdLayer aLayer) throws NoSuchElementException, ArrayIndexOutOfBoundsException Deprecated.Description copied from interface:ILcdLayered
Moves the given layer (which is already inILcdLayered
) to the existing index aIndex. When a layer is moved down, all layers in between the previous and future position of the given layer (including the layer at index aIndex) are moved one position up. When a layer is moved up, all layers in between the previous and future position of the given layer (including the layer at index aIndex) are moved one position down.More formally, let previousIndex be the index of
aLayer
before the move. If previousIndex < aIndex, then the index of allILcdLayer
objects in from previousIndex + 1 to aIndex is decremented with 1. If previousIndex > aIndex, then the index of allILcdLayer
objects in from aIndex to previousIndex -1 is incremented with 1.- Specified by:
moveLayerAt
in interfaceILcdLayered
- Parameters:
aIndex
- the index of the position where to move the layer.aLayer
- the layer to move.- Throws:
NoSuchElementException
- ifaLayer
is not in thisILcdLayered
.ArrayIndexOutOfBoundsException
- ifaIndex
is not an index of one of the layers of thisILcdLayered
.
-
addLayer
Deprecated.Description copied from interface:ILcdLayerTreeNode
Adds a new node to the tree as a child of this node. This newly added node will normally be the last child node, but that can be implementation specific. Implementations could for example decide to use the initial layer index provider to determine the best index to add the layer. Notice that in order to avoid loops in the tree
aNewChildNode
must not already be an element of the tree. This method should also generate aTLcdLayeredEvent
to warn its listeners that a node has been added.- Specified by:
addLayer
in interfaceILcdLayerTreeNode
- Parameters:
aNewChildNode
- the node which must be added as a child- Returns:
true
when the layer was successfully added to this node,false
if the node already contained layeraNewChildNode
- Throws:
IllegalArgumentException
- when the node is already an element of the tree
-
addLayer
public boolean addLayer(ILcdLayer aNewChildNode, int aIndex) throws IndexOutOfBoundsException, IllegalArgumentException Deprecated.Description copied from interface:ILcdLayerTreeNode
Adds a new node to the tree as a child of this node. The child will be inserted at index
aIndex
in the child list of this node. Notice that in order to avoid loops in the treeaNewChildNode
must not already be an element of the tree. This method should also generate aTLcdLayeredEvent
to warn its listeners that a node has been added.- Specified by:
addLayer
in interfaceILcdLayerTreeNode
- Parameters:
aNewChildNode
- the new childaIndex
- the index in the child list of this node for the new child- Returns:
true
when the layer was successfully added to this node,false
if the node already contained layeraNewChildNode
- Throws:
IndexOutOfBoundsException
- whenindex >
ILcdLayerTreeNode.layerCount()
IllegalArgumentException
- when the node is already an element of the tree
-
removeLayer
public void removeLayer(int aIndex) Deprecated.Description copied from interface:ILcdLayerTreeNode
Removes the node at index
aIndex
from this node and sends the appropriateTLcdLayeredEvent
.- Specified by:
removeLayer
in interfaceILcdLayerTreeNode
- Parameters:
aIndex
- the index of the child node which has to be removed
-
isPaintOnTopOfChildrenHint
public boolean isPaintOnTopOfChildrenHint()Deprecated.Description copied from interface:ILcdLayerTreeNode
Returns whether a node should be painted on top of its children when the node is added to a view, or beneath its child layers.
- Specified by:
isPaintOnTopOfChildrenHint
in interfaceILcdLayerTreeNode
- Returns:
true
when a node should be painted on top of its children,false
when the node should be painted underneath its child layers- See Also:
-
setPaintOnTopOfChildrenHint
public void setPaintOnTopOfChildrenHint(boolean aPaintOnTopOfChildrenHint) Deprecated.Description copied from interface:ILcdLayerTreeNode
Sets whether a node should be painted on top of its children when the node is added to a view, or beneath its child layers. Notice that this is only a hint, hence the paint order of the node and its children is not guaranteed.
This property must be set before the node is added to the view. Otherwise it will have no effect. Changing it afterwards will have no effect, unless the node is removed and re-added to the view.
The default behavior is to paint nodes underneath the child layers.
- Specified by:
setPaintOnTopOfChildrenHint
in interfaceILcdLayerTreeNode
- Parameters:
aPaintOnTopOfChildrenHint
-true
when a node should be painted on top of its children,false
when the node should be painted underneath its child layers- See Also:
-
getInitialLayerIndexProvider
Deprecated.Description copied from interface:ILcdLayerTreeNode
Returns the initial layer index provider, which can be used to determine the best index when a layer is added without specifying an index.
It is however up to the implementation to decide whether it uses the
ILcdInitialLayerIndexProvider
.- Specified by:
getInitialLayerIndexProvider
in interfaceILcdLayerTreeNode
- Returns:
- the initial layer index provider. Can be
null
- See Also:
-
setInitialLayerIndexProvider
Deprecated.Description copied from interface:ILcdLayerTreeNode
Sets an initial layer index provider, which can be used to determine the best index when a layer is added without specifying an index.
- Specified by:
setInitialLayerIndexProvider
in interfaceILcdLayerTreeNode
- Parameters:
aInitialLayerIndexProvider
- The new initial layer index provider. May benull
- See Also:
-
Lightspeed view
.