Class TLspGXYLayerTreeNodeAdapter
- All Implemented Interfaces:
ILcdPropertyChangeSource
,ILcdSelection<Object>
,ILcdLayer
,ILcdLayered
,ILcdLayerTreeNode
,ILspSnappable
,ILspInteractivePaintableLayer
,ILspLayer
,ILspPaintableLayer
,ILspStyledLayer
,Serializable
ILcdGXYLayer
to an ILspView
,
with layer tree node functionality.
Layers added to this node must implement ILspLayer
.- Since:
- 2012.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.layer.ILspLayer
ILspLayer.LayerType
-
Constructor Summary
ConstructorDescriptionTLspGXYLayerTreeNodeAdapter
(ILcdGXYLayer aGXYLayer) Deprecated.Creates an adapter for the given layer.TLspGXYLayerTreeNodeAdapter
(ILcdGXYLayer aGXYLayer, ILspLayer.LayerType aLayerType) Deprecated.Creates an adapter for the given layer. -
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 aListener) 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.Override some of the methods of TLspLayer to first check the model of this layer.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.boolean
Deprecated.Returnstrue
if this layer supports selecting objects,false
otherwise.int
Deprecated.Returns the number ofILcdLayer
objects in thisILcdLayered
.Deprecated.Returns theILcdLayer
of thisILcdLayered
that contains the givenILcdModel
.Enumeration
<?> layers()
Deprecated.Returns anEnumeration
of allILcdLayer
objects currently in thisILcdLayered
, starting from the bottom layer to the top layer.Enumeration
<?> 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 aListener) 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.lightspeed.layer.integration.gxy.TLspGXYLayerAdapter
addEditingStateListener, addSelectionListener, clearSelection, editedObjectChanged, editedObjectsChanged, fireCollectedSelectionChanges, fireStatusEvent, getEditor, getFilter, getGXYLayer, getGXYLayerLabelingAlgorithm, getIcon, getLabel, getLayerType, getMapScaleRange, getModel, getModelXYZWorldTransformation, getObjectsWithPaintState, getPainter, getPaintRepresentations, getRequiredOpenGLProfile, getSelectionCount, getStyler, invokeAndWaitOnGXYLayer, invokeLaterOnGXYLayer, isEditable, isEditable, isSelectable, isSelected, isSnapTarget, isVisible, isVisible, isVisible, paint, query, removeEditingStateListener, removeSelectionListener, selectedObjects, selectObject, selectObjects, setEditable, setEditable, setFilter, setGXYLayerLabelingAlgorithm, setIcon, setLabel, setMapScaleRange, setModel, setSelectable, setSnapTarget, setVisible, setVisible, setVisible, toString
Methods inherited from class com.luciad.view.lightspeed.layer.ALspLayer
addLayerStateListener, addPaintRepresentation, addPropertyChangeListener, addStatusListener, createModelXYZWorldTransformation, fireLayerStateChange, fireLayerStateChange, fireLayerStateChange, fireLayerStateChange, firePropertyChange, getBounds, getCurrentViews, getLayerStyle, invalidate, isSynchronous, registerView, removeLayerStateListener, removePaintRepresentation, removePropertyChangeListener, removeStatusListener, setLayerStyle, setSynchronous, unregisterView
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.luciad.view.ILcdLayer
clearSelection, fireCollectedSelectionChanges, getIcon, getLabel, getModel, isEditable, isSelectable, isVisible, selectObject, setIcon, setLabel, setSelectable
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
Methods inherited from interface com.luciad.view.lightspeed.layer.ILspLayer
addLayerStateListener, addStatusListener, getBounds, getCurrentViews, getLayerStyle, getMapScaleProvider, invalidate, registerView, removeLayerStateListener, removeStatusListener, setLayerStyle, unregisterView
Methods inherited from interface com.luciad.view.lightspeed.editor.snapping.ILspSnappable
addPropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
TLspGXYLayerTreeNodeAdapter
Deprecated.Creates an adapter for the given layer.- Parameters:
aGXYLayer
- the layer to adapt
-
TLspGXYLayerTreeNodeAdapter
Deprecated.Creates an adapter for the given layer.- Parameters:
aGXYLayer
- the layer to adaptaLayerType
- theLayerType
of the new layer.
-
-
Method Details
-
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
Deprecated.Description copied from interface:ILcdLayered
Removes aLayer from thisILcdLayered
.- Specified by:
removeLayer
in interfaceILcdLayered
- Parameters:
aLayer
- the layer to remove.
-
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
-
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:
IndexOutOfBoundsException
-
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.
-
moveLayerAt
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.
-
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
-
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:
aListener
- 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:
aListener
- the listener that will no longer be notified of changes to theILcdLayered
- See Also:
-
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
-
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
-
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
-
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.
-
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
-
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.
-
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:
-
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:
-
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:
-
isEditableSupported
public boolean isEditableSupported()Deprecated.Override some of the methods of TLspLayer to first check the model of this layer. If the model is the dummy model, indicating the node contains no useful layer data, these methods will return a more useful value than the ones of the super class. In all other cases these methods just call the methods of the superclass- Specified by:
isEditableSupported
in interfaceILcdLayer
- Overrides:
isEditableSupported
in classTLspGXYLayerAdapter
- Returns:
true
- See Also:
-
isSelectableSupported
public boolean isSelectableSupported()Deprecated.Description copied from interface:ILcdLayer
Returnstrue
if this layer supports selecting objects,false
otherwise.- Specified by:
isSelectableSupported
in interfaceILcdLayer
- Overrides:
isSelectableSupported
in classTLspGXYLayerAdapter
- Returns:
true
- See Also:
-
GXY view
, or use Lightspeed layers.