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
TLcdLayeredEvent
s originating from it into the
corresponding TreeModelEvent
s which are passed to the
TreeModelListener
s registered to this model.
- Since:
- 9.0
-
Constructor Summary
ConstructorDescriptionTLcdFlatListTreeModel
(ILcdLayered aLayered) Create a new instance ofTLcdFlatListTreeModel
based on the layers inaLayered
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
int
getChildCount
(Object parent) int
getIndexOfChild
(Object parent, Object child) getRoot()
boolean
void
void
valueForPathChanged
(TreePath path, Object newValue)
-
Constructor Details
-
TLcdFlatListTreeModel
Create a new instance ofTLcdFlatListTreeModel
based 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 usingvalueForPathChanged
is not supported.- Parameters:
aLayered
- theILcdLayered
containing all the layers for this model
-
-
Method Details
-
getRoot
-
getChild
-
getChildCount
- Specified by:
getChildCount
in interfaceTreeModel
-
isLeaf
-
valueForPathChanged
- Specified by:
valueForPathChanged
in interfaceTreeModel
-
getIndexOfChild
- Specified by:
getIndexOfChild
in interfaceTreeModel
-
addTreeModelListener
- Specified by:
addTreeModelListener
in interfaceTreeModel
-
removeTreeModelListener
- Specified by:
removeTreeModelListener
in interfaceTreeModel
-