Class TLcdModelTreeNodeSupport
- All Implemented Interfaces:
ILcdModelContainer,ILcdModelProducerListener,EventListener
This is a utility class that can be used to create an
ILcdModelTreeNode implementation.
This utility class provides support for all the methods in ILcdModelTreeNode which are not
inherited from ILcdModel.
As a consequence, this class is ideal for creating ILcdModelTreeNode implementations
based on an existing ILcdModel implementation. All those ILcdModelTreeNode
methods can then be delegated to an instance of this class.
- Since:
- 9.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new support object for nodeaNode -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHierarchyModelContainerListener(ILcdModelContainerListener aModelContainerListener) Registers the givenILcdModelContainerListenerto receiveTLcdModelContainerEvents from all theILcdModelTreeNodes contained in the tree with this node as root node.voidaddHierarchyModelListener(ILcdModelListener aModelListener) Registers the givenILcdModelListenerto receiveTLcdModelChangedEvents from all theILcdModels contained in the tree with this node as root node.booleanAdd a new model to the container, and add the hierarchy listeners to it in order to be informed of all the events in the newly added modelvoidaddModelContainerListener(ILcdModelContainerListener aModelContainerListener) Registers the givenILcdModelContainerListenerto receiveTLcdModelContainerEvents for this model container.getModel(int aIndex) Returns theILcdModelat the given index.intReturns the number ofILcdModelobjects contained in thisILcdModelContainer.voidNotifies this ILcdModelProducerListener of a produced model.models()Returns anEnumerationof theILcdModelobjects contained in thisILcdModelContainer.voidremoveHierarchyModelContainerListener(ILcdModelContainerListener aModelContainerListener) Unregisters the givenILcdModelContainerListenerfrom receivingTLcdModelContainerEvents for the tree with the node for which this support is responsible as root node.voidremoveHierarchyModelListener(ILcdModelListener aModelListener) Unregisters the givenILcdModelListenerfrom receivingTLcdModelChangedEvents for the tree with the node for which this support is responsible as root node.booleanremoveModel(ILcdModel aModel) Remove a model from the container, and remove all the hierarchy listeners which were addedvoidremoveModelContainerListener(ILcdModelContainerListener aModelContainerListener) Unregisters the givenILcdModelContainerListenerfrom receivingTLcdModelContainerEvents from this model containerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.model.ILcdModelContainer
getModels
-
Constructor Details
-
TLcdModelTreeNodeSupport
Creates a new support object for nodeaNode- Parameters:
aNode- the node for which a support object is needed
-
-
Method Details
-
addModel
Add a new model to the container, and add the hierarchy listeners to it in order to be informed of all the events in the newly added model- Specified by:
addModelin interfaceILcdModelContainer- Parameters:
aModel- the model to be added.- Returns:
trueif this collection of models changed as a result of the call
-
removeModel
Remove a model from the container, and remove all the hierarchy listeners which were added- Specified by:
removeModelin interfaceILcdModelContainer- Parameters:
aModel- the model to be removed.- Returns:
trueif a model was removed as a result of this call
-
addHierarchyModelContainerListener
Registers the given
ILcdModelContainerListenerto receiveTLcdModelContainerEvents from all theILcdModelTreeNodes contained in the tree with this node as root node.The source
ILcdModelContainerof the event can be retrieved by callingTLcdModelContainerEvent.getModelContainer()on the receivedTLcdModelContainerEvent.- Parameters:
aModelContainerListener- the listener- See Also:
-
removeHierarchyModelContainerListener
public void removeHierarchyModelContainerListener(ILcdModelContainerListener aModelContainerListener) Unregisters the given
ILcdModelContainerListenerfrom receivingTLcdModelContainerEvents for the tree with the node for which this support is responsible as root node.- Parameters:
aModelContainerListener- the listener, must not benull- See Also:
-
addHierarchyModelListener
Registers the given
ILcdModelListenerto receiveTLcdModelChangedEvents from all theILcdModels contained in the tree with this node as root node.The source
ILcdModelof the event can be retrieved by callingTLcdModelChangedEvent.getModel()on the receivedTLcdModelChangedEvent.- Parameters:
aModelListener- the listener- See Also:
-
removeHierarchyModelListener
Unregisters the given
ILcdModelListenerfrom receivingTLcdModelChangedEvents for the tree with the node for which this support is responsible as root node.- Parameters:
aModelListener- the listener- See Also:
-
addModelContainerListener
Registers the given
ILcdModelContainerListenerto receiveTLcdModelContainerEvents for this model container.- Specified by:
addModelContainerListenerin interfaceILcdModelContainer- Parameters:
aModelContainerListener- the listener, must not benull- See Also:
-
removeModelContainerListener
Unregisters the given
ILcdModelContainerListenerfrom receivingTLcdModelContainerEvents from this model container- Specified by:
removeModelContainerListenerin interfaceILcdModelContainer- Parameters:
aModelContainerListener- the listener, must not benull- See Also:
-
modelCount
public int modelCount()Description copied from interface:ILcdModelContainerReturns the number ofILcdModelobjects contained in thisILcdModelContainer.- Specified by:
modelCountin interfaceILcdModelContainer- Returns:
- the number of
ILcdModelobjects contained in thisILcdModelContainer.
-
getModel
Description copied from interface:ILcdModelContainerReturns theILcdModelat the given index.- Specified by:
getModelin interfaceILcdModelContainer- Parameters:
aIndex- a valid index in thisILcdModelContainer.- Returns:
- the
ILcdModelat the given index.
-
models
Description copied from interface:ILcdModelContainerReturns anEnumerationof theILcdModelobjects contained in thisILcdModelContainer.- Specified by:
modelsin interfaceILcdModelContainer- Returns:
- an
Enumerationof theILcdModelobjects contained in thisILcdModelContainer.
-
modelProduced
Description copied from interface:ILcdModelProducerListenerNotifies this ILcdModelProducerListener of a produced model.- Specified by:
modelProducedin interfaceILcdModelProducerListener- Parameters:
e- the event describing the changes to aILcdModelProducer.
-