01: package com.xoetrope.swing.treetable;
02:
03: import javax.swing.tree.TreeModel;
04:
05: /**
06: * TreeTableModel is the model used by a JTreeTable. It extends TreeModel
07: * to add methods for getting inforamtion about the set of columns each
08: * node in the TreeTableModel may have. Each column, like a column in
09: * a TableModel, has a name and a type associated with it. Each node in
10: * the TreeTableModel can return a value for each of the columns and
11: * set that value if isCellEditable() returns true.
12: *
13: * <p> Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
14: * the GNU Public License (GPL), please see license.txt for more details. If
15: * you make commercial use of this software you must purchase a commercial
16: * license from Xoetrope.</p>
17: * <p> $Revision: 1.5 $</p>
18: */
19: public interface TreeTableModel extends TreeModel {
20: /**
21: * Returns the number ofs availible column.
22: */
23: public int getColumnCount();
24:
25: /**
26: * Returns the name for column number <code>column</code>.
27: */
28: public String getColumnName(int column);
29:
30: /**
31: * Returns the type for column number <code>column</code>.
32: */
33: public Class getColumnClass(int column);
34:
35: /**
36: * Returns the value to be displayed for node <code>node</code>,
37: * at column number <code>column</code>.
38: */
39: public Object getValueAt(Object node, int column);
40:
41: /**
42: * Indicates whether the the value for node <code>node</code>,
43: * at column number <code>column</code> is editable.
44: */
45: public boolean isCellEditable(Object node, int column);
46:
47: /**
48: * Sets the value for node <code>node</code>,
49: * at column number <code>column</code>.
50: */
51: public void setValueAt(Object aValue, Object node, int column);
52: }
|