Package com.luciad.view.swing
Class TLcdFlatListTreeModel
java.lang.Object
com.luciad.view.swing.TLcdFlatListTreeModel
- All Implemented Interfaces:
TreeModel
A TreeModel for a tree based on an ILcdLayered
instance, which can be used to visualise the layers in the ILcdLayered using a
JTree. It will only show the flat structure of the layers in the
ILcdLayered. When for example an ILcdLayerTreeNode with children is
contained in the ILcdLayered, it will only show the ILcdLayerTreeNode
and not its child nodes.
This model also adds a listener to the ILcdLayered instance, and converts all the
TLcdLayeredEvents originating from it into the
corresponding TreeModelEvents which are passed to the
TreeModelListeners registered to this model.
- Since:
- 9.0
-
Constructor Summary
ConstructorsConstructorDescriptionTLcdFlatListTreeModel(ILcdLayered aLayered) Create a new instance ofTLcdFlatListTreeModelbased on the layers inaLayered. -
Method Summary
Modifier and TypeMethodDescriptionvoidintgetChildCount(Object parent) intgetIndexOfChild(Object parent, Object child) getRoot()booleanvoidvoidvalueForPathChanged(TreePath path, Object newValue)
-
Constructor Details
-
TLcdFlatListTreeModel
Create a new instance ofTLcdFlatListTreeModelbased on the layers inaLayered. The root node of this model is not relevant, and it is advised to not display it (JTree#setRootVisible(false)). Editing this tree model by usingvalueForPathChangedis not supported.- Parameters:
aLayered- theILcdLayeredcontaining all the layers for this model
-
-
Method Details
-
getRoot
-
getChild
-
getChildCount
- Specified by:
getChildCountin interfaceTreeModel
-
isLeaf
-
valueForPathChanged
- Specified by:
valueForPathChangedin interfaceTreeModel
-
getIndexOfChild
- Specified by:
getIndexOfChildin interfaceTreeModel
-
addTreeModelListener
- Specified by:
addTreeModelListenerin interfaceTreeModel
-
removeTreeModelListener
- Specified by:
removeTreeModelListenerin interfaceTreeModel
-