1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 /***
21 * Original copyright notice below. Class was slightly adopted for XNap.
22 */
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42 package org.xnap.gui.table;
43
44 import javax.swing.tree.TreeModel;
45
46 /***
47 * TreeTableModel is the model used by a JTreeTable. It extends TreeModel
48 * to add methods for getting inforamtion about the set of columns each
49 * node in the TreeTableModel may have. Each column, like a column in
50 * a TableModel, has a name and a type associated with it. Each node in
51 * the TreeTableModel can return a value for each of the columns and
52 * set that value if isCellEditable() returns true.
53 *
54 * @author Philip Milne
55 * @author Scott Violet
56 */
57 public interface TreeTableModel extends TreeModel
58 {
59 /***
60 * Returns the number ofs availible column.
61 */
62 int getColumnCount();
63
64 /***
65 * Returns the name for column number <code>column</code>.
66 */
67 String getColumnName(int column);
68
69 /***
70 * Returns the type for column number <code>column</code>.
71 */
72 Class getColumnClass(int column);
73
74 /***
75 * Returns the value to be displayed for node <code>node</code>,
76 * at column number <code>column</code>.
77 */
78 Object getValueAt(Object node, int column);
79
80 /***
81 * Indicates whether the the value for node <code>node</code>,
82 * at column number <code>column</code> is editable.
83 */
84 boolean isCellEditable(Object node, int column);
85
86 /***
87 * Sets the value for node <code>node</code>,
88 * at column number <code>column</code>.
89 */
90 void setValueAt(Object aValue, Object node, int column);
91
92 }