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
ConstructorsConstructorDescriptionTLspGXYLayerTreeNodeAdapter(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 TypeMethodDescriptionvoidaddHierarchyLayeredListener(ILcdLayeredListener aListener) Deprecated.Registers the givenILcdLayeredListenerto receiveTLcdLayeredEvents from all theILcdLayerTreeNodes contained in the tree with this node as root node.voidDeprecated.Registers the givenPropertyChangeListenerto receivePropertyChangeEvents from all theILcdLayers contained in the tree with this node as root node.voidDeprecated.Registers the givenILcdSelectionListenerto receiveTLcdSelectionChangedEvents from all theILcdLayers contained in the tree with this node as root node.booleanDeprecated.Adds a new node to the tree as a child of this node.booleanDeprecated.Adds a new node to the tree as a child of this node.voidaddLayeredListener(ILcdLayeredListener aListener) Deprecated.Registers the givenILcdLayeredListenerto be notified when layers are added, removed or moved.booleancontainsLayer(ILcdLayer aLayer) Deprecated.Returns whether thisILcdLayeredcontains 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 theILcdLayerin thisILcdLayeredwith indexaIndex.intDeprecated.Returns the index if the given layer is in the list.booleanDeprecated.Override some of the methods of TLspLayer to first check the model of this layer.booleanDeprecated.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.booleanDeprecated.Returnstrueif this layer supports selecting objects,falseotherwise.intDeprecated.Returns the number ofILcdLayerobjects in thisILcdLayered.Deprecated.Returns theILcdLayerof thisILcdLayeredthat contains the givenILcdModel.Enumeration<?> layers()Deprecated.Returns anEnumerationof allILcdLayerobjects currently in thisILcdLayered, starting from the bottom layer to the top layer.Enumeration<?> Deprecated.Returns anEnumerationof allILcdLayerobjects currently in thisILcdLayered, starting from the top layer to the bottom layer.voidmoveLayerAt(int aIndex, ILcdLayer aLayer) Deprecated.Moves the given layer (which is already inILcdLayered) to the existing index aIndex.voidDeprecated.Removes all theILcdLayerobjects from thisILcdLayered.voidDeprecated.Unregisters the givenILcdLayeredListenerfrom receivingTLcdLayeredEvents for the tree with this node as root node.voidDeprecated.Unregisters the givenPropertyChangeListenerfrom receivingPropertyChangeEvents for the tree with this node as root node.voidDeprecated.Unregisters the givenILcdSelectionListenerfrom receivingTLcdSelectionChangedEvents for the tree with this node as root node.voidremoveLayer(int aIndex) Deprecated.Removes the node at indexaIndexfrom this node and sends the appropriateTLcdLayeredEvent.voidremoveLayer(ILcdLayer aLayer) Deprecated.Removes aLayer from thisILcdLayered.voidremoveLayeredListener(ILcdLayeredListener aListener) Deprecated.Unregisters the givenILcdLayeredListenerfrom receiving layered events for theILcdLayered.voidsetInitialLayerIndexProvider(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.voidsetPaintOnTopOfChildrenHint(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, toStringMethods 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, unregisterViewMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.luciad.view.ILcdLayer
clearSelection, fireCollectedSelectionChanges, getIcon, getLabel, getModel, isEditable, isSelectable, isVisible, selectObject, setIcon, setLabel, setSelectableMethods inherited from interface com.luciad.view.ILcdLayered
addLayeredListener, getLayers, removeLayeredListenerMethods inherited from interface com.luciad.view.ILcdLayerTreeNode
addPropertyChangeListener, removePropertyChangeListenerMethods inherited from interface com.luciad.util.ILcdSelection
addSelectionListener, getSelectedObjects, getSelectionCount, isSelected, removeSelectionListener, selectedObjectsMethods inherited from interface com.luciad.view.lightspeed.layer.ILspLayer
addLayerStateListener, addStatusListener, getBounds, getCurrentViews, getLayerStyle, getMapScaleProvider, invalidate, registerView, removeLayerStateListener, removeStatusListener, setLayerStyle, unregisterViewMethods 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- theLayerTypeof the new layer.
-
-
Method Details
-
addLayer
Deprecated.Description copied from interface:ILcdLayerTreeNodeAdds 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
aNewChildNodemust not already be an element of the tree. This method should also generate aTLcdLayeredEventto warn its listeners that a node has been added.- Specified by:
addLayerin interfaceILcdLayerTreeNode- Parameters:
aNewChildNode- the node which must be added as a child- Returns:
truewhen the layer was successfully added to this node,falseif 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:ILcdLayerTreeNodeAdds a new node to the tree as a child of this node. The child will be inserted at index
aIndexin the child list of this node. Notice that in order to avoid loops in the treeaNewChildNodemust not already be an element of the tree. This method should also generate aTLcdLayeredEventto warn its listeners that a node has been added.- Specified by:
addLayerin interfaceILcdLayerTreeNode- Parameters:
aNewChildNode- the new childaIndex- the index in the child list of this node for the new child- Returns:
truewhen the layer was successfully added to this node,falseif 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:ILcdLayeredRemoves aLayer from thisILcdLayered.- Specified by:
removeLayerin interfaceILcdLayered- Parameters:
aLayer- the layer to remove.
-
removeLayer
public void removeLayer(int aIndex) Deprecated.Description copied from interface:ILcdLayerTreeNodeRemoves the node at index
aIndexfrom this node and sends the appropriateTLcdLayeredEvent.- Specified by:
removeLayerin interfaceILcdLayerTreeNode- Parameters:
aIndex- the index of the child node which has to be removed
-
getLayer
Deprecated.Description copied from interface:ILcdLayeredReturns theILcdLayerin thisILcdLayeredwith indexaIndex.- Specified by:
getLayerin interfaceILcdLayered- Parameters:
aIndex- the position of the layer to retrieve in theILcdLayered.- Returns:
- the
ILcdLayerin thisILcdLayeredwith indexaIndex. - Throws:
IndexOutOfBoundsException
-
layerCount
public int layerCount()Deprecated.Description copied from interface:ILcdLayerTreeNodeReturns the number ofILcdLayerobjects 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:
layerCountin interfaceILcdLayered- Specified by:
layerCountin interfaceILcdLayerTreeNode- Returns:
- the number of
ILcdLayerobjects in thisILcdLayered.
-
layers
Deprecated.Description copied from interface:ILcdLayerTreeNodeReturns anEnumerationof allILcdLayerobjects 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:
layersin interfaceILcdLayered- Specified by:
layersin interfaceILcdLayerTreeNode- Returns:
- an
Enumerationof allILcdLayerobjects currently in thisILcdLayered, starting from the bottom layer to the top layer.
-
moveLayerAt
Deprecated.Description copied from interface:ILcdLayeredMoves 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
aLayerbefore the move. If previousIndex < aIndex, then the index of allILcdLayerobjects in from previousIndex + 1 to aIndex is decremented with 1. If previousIndex > aIndex, then the index of allILcdLayerobjects in from aIndex to previousIndex -1 is incremented with 1.- Specified by:
moveLayerAtin interfaceILcdLayered- Parameters:
aIndex- the index of the position where to move the layer.aLayer- the layer to move.
-
indexOf
Deprecated.Description copied from interface:ILcdLayeredReturns the index if the given layer is in the list.- Specified by:
indexOfin interfaceILcdLayered- Parameters:
aLayer- the layer whose index to return- Returns:
- the index of
aLayer
-
addLayeredListener
Deprecated.Description copied from interface:ILcdLayerTreeNodeRegisters the given
ILcdLayeredListenerto 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
ALcdWeakLayeredListenerinstance 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:
addLayeredListenerin interfaceILcdLayered- Specified by:
addLayeredListenerin 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:ILcdLayerTreeNodeUnregisters the givenILcdLayeredListenerfrom 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:
removeLayeredListenerin interfaceILcdLayered- Specified by:
removeLayeredListenerin interfaceILcdLayerTreeNode- Parameters:
aListener- the listener that will no longer be notified of changes to theILcdLayered- See Also:
-
addHierarchyLayeredListener
Deprecated.Description copied from interface:ILcdLayerTreeNodeRegisters the given
ILcdLayeredListenerto receiveTLcdLayeredEvents from all theILcdLayerTreeNodes 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
ILcdLayeredof the event can be retrieved by callingTLcdLayeredEvent.getLayered()on the receivedTLcdLayeredEvent.- Specified by:
addHierarchyLayeredListenerin interfaceILcdLayerTreeNode- Parameters:
aListener- the listener
-
removeHierarchyLayeredListener
Deprecated.Description copied from interface:ILcdLayerTreeNodeUnregisters the given
ILcdLayeredListenerfrom receivingTLcdLayeredEvents for the tree with this node as root node.- Specified by:
removeHierarchyLayeredListenerin interfaceILcdLayerTreeNode- Parameters:
aListener- the listener
-
addHierarchyPropertyChangeListener
Deprecated.Description copied from interface:ILcdLayerTreeNodeRegisters the given
PropertyChangeListenerto receivePropertyChangeEvents from all theILcdLayers 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:
addHierarchyPropertyChangeListenerin interfaceILcdLayerTreeNode- Parameters:
aListener- the listener
-
removeHierarchyPropertyChangeListener
Deprecated.Description copied from interface:ILcdLayerTreeNodeUnregisters the given
PropertyChangeListenerfrom receivingPropertyChangeEvents for the tree with this node as root node.- Specified by:
removeHierarchyPropertyChangeListenerin interfaceILcdLayerTreeNode- Parameters:
aListener- the listener
-
addHierarchySelectionListener
Deprecated.Description copied from interface:ILcdLayerTreeNodeRegisters the given
ILcdSelectionListenerto receiveTLcdSelectionChangedEvents from all theILcdLayers 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:
addHierarchySelectionListenerin interfaceILcdLayerTreeNode- Parameters:
aListener- the listener
-
removeHierarchySelectionListener
Deprecated.Description copied from interface:ILcdLayerTreeNodeUnregisters the given
ILcdSelectionListenerfrom receivingTLcdSelectionChangedEvents for the tree with this node as root node.- Specified by:
removeHierarchySelectionListenerin interfaceILcdLayerTreeNode- Parameters:
aListener- the listener
-
removeAllLayers
public void removeAllLayers()Deprecated.Description copied from interface:ILcdLayerTreeNodeRemoves all theILcdLayerobjects from thisILcdLayered.This method will generate a
TLcdLayeredEventindicating a layer was removed for every child layer.- Specified by:
removeAllLayersin interfaceILcdLayered- Specified by:
removeAllLayersin interfaceILcdLayerTreeNode
-
layersBackwards
Deprecated.Description copied from interface:ILcdLayerTreeNodeReturns anEnumerationof allILcdLayerobjects 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:
layersBackwardsin interfaceILcdLayered- Specified by:
layersBackwardsin interfaceILcdLayerTreeNode- Returns:
- an
Enumerationof allILcdLayerobjects currently in thisILcdLayered, starting from the top layer to the bottom layer.
-
layerOf
Deprecated.Description copied from interface:ILcdLayeredReturns theILcdLayerof thisILcdLayeredthat contains the givenILcdModel.- Specified by:
layerOfin interfaceILcdLayered- Parameters:
aModel- the model to check for in thisILcdLayered.- Returns:
- the
ILcdLayerof thisILcdLayeredthat contains the givenILcdModel. - Throws:
NoSuchElementException- if there is no layer containing the given model
-
containsLayer
Deprecated.Description copied from interface:ILcdLayerTreeNodeReturns whether thisILcdLayeredcontains the given layer. More formally, returnstrueif and only if theILcdLayeredcontains at least one layerlsuch 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:
containsLayerin interfaceILcdLayered- Specified by:
containsLayerin interfaceILcdLayerTreeNode- Parameters:
aLayer- the layer to check whether it is in this layered.- Returns:
- true if
aLayeris in thisILcdLayered, false otherwise.
-
setPaintOnTopOfChildrenHint
public void setPaintOnTopOfChildrenHint(boolean aPaintOnTopOfChildrenHint) Deprecated.Description copied from interface:ILcdLayerTreeNodeSets 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:
setPaintOnTopOfChildrenHintin interfaceILcdLayerTreeNode- Parameters:
aPaintOnTopOfChildrenHint-truewhen a node should be painted on top of its children,falsewhen the node should be painted underneath its child layers- See Also:
-
isPaintOnTopOfChildrenHint
public boolean isPaintOnTopOfChildrenHint()Deprecated.Description copied from interface:ILcdLayerTreeNodeReturns 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:
isPaintOnTopOfChildrenHintin interfaceILcdLayerTreeNode- Returns:
truewhen a node should be painted on top of its children,falsewhen the node should be painted underneath its child layers- See Also:
-
getInitialLayerIndexProvider
Deprecated.Description copied from interface:ILcdLayerTreeNodeReturns 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:
getInitialLayerIndexProviderin interfaceILcdLayerTreeNode- Returns:
- the initial layer index provider. Can be
null - See Also:
-
setInitialLayerIndexProvider
Deprecated.Description copied from interface:ILcdLayerTreeNodeSets 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:
setInitialLayerIndexProviderin 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:
isEditableSupportedin interfaceILcdLayer- Overrides:
isEditableSupportedin classTLspGXYLayerAdapter- Returns:
true- See Also:
-
isSelectableSupported
public boolean isSelectableSupported()Deprecated.Description copied from interface:ILcdLayerReturnstrueif this layer supports selecting objects,falseotherwise.- Specified by:
isSelectableSupportedin interfaceILcdLayer- Overrides:
isSelectableSupportedin classTLspGXYLayerAdapter- Returns:
true- See Also:
-
GXY view, or use Lightspeed layers.