treeTable

6

6e

Hi,

Im wondering if anyone knows if sun has, or plans to implement a
treeTable component in their standard java api....

Thanks...
 
6

6e

I was wondering if anyone has used this treetable before, and may be
able to give me some guidance as far as creating a TreeTableModel
without use of a filesystem

for instance I want to create a hierarchial browsing system for rows of
editable information...
 
R

Rogan Dawes

6e said:
I was wondering if anyone has used this treetable before, and may be
able to give me some guidance as far as creating a TreeTableModel
without use of a filesystem

for instance I want to create a hierarchial browsing system for rows of
editable information...

You might want to take a look at the implementation of the
AbstractTreeTableModel, and the classes it inherits from in the
WebScarab source. It is available in the CVS repository of the OWASP
project on sourceforge.

<http://cvs.sourceforge.net/viewcvs....stractTreeTableModel.java?rev=1.4&view=markup>

This implementation is not editable, but you would easily be able to
make it editable, I reckon, by overriding the methods shown below.

Rogan

P.S. You would basically have to override or implement the following
methods:

// Left to be implemented in the subclass:

/* From TreeModel
* public Object getRoot()
* public Object getChild(Object parent, int index)
* public int getChildCount(Object parent)
* public boolean isLeaf(Object node)
*
* From TreeTableModel
* public int getColumnCount()
* public String getColumnName(Object node, int column)
* public Object getValueAt(Object node, int column)
*/

public boolean isCellEditable(Object node, int column) {
return getColumnClass(column) == TreeTableModel.class;
}

public void setValueAt(Object aValue, Object node, int column) {}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top