01 /*
02 * Copyright (c) 1995-2010, The University of Sheffield. See the file
03 * COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
04 *
05 * This file is part of GATE (see http://gate.ac.uk/), and is free
06 * software, licenced under the GNU Library General Public License,
07 * Version 2, June 1991 (in the distribution as file licence.html,
08 * and also available at http://gate.ac.uk/gate/licence.html).
09 *
10 * Valentin Tablan 23/01/2001
11 *
12 * $Id: TreeTableModel.java 12006 2009-12-01 17:24:28Z thomas_heitz $
13 *
14 */
15
16 package gate.swing;
17
18 import javax.swing.tree.TreeModel;
19
20 /**
21 * TreeTableModel is the model used by a JTreeTable. It extends TreeModel
22 * to add methods for getting information about the set of columns each
23 * node in the TreeTableModel may have. Each column, like a column in
24 * a TableModel, has a name and a type associated with it. Each node in
25 * the TreeTableModel can return a value for each of the columns and
26 * set that value if isCellEditable() returns true.
27 *
28 * @version %I% %G%
29 *
30 * @author Philip Milne
31 * @author Scott Violet
32 */
33 public interface TreeTableModel extends TreeModel
34 {
35 /**
36 * Returns the number ofs availible column.
37 */
38 public int getColumnCount();
39
40 /**
41 * Returns the name for column number <code>column</code>.
42 */
43 public String getColumnName(int column);
44
45 /**
46 * Returns the type for column number <code>column</code>.
47 */
48 public Class getColumnClass(int column);
49
50 /**
51 * Returns the value to be displayed for node <code>node</code>,
52 * at column number <code>column</code>.
53 */
54 public Object getValueAt(Object node, int column);
55
56 /**
57 * Indicates whether the the value for node <code>node</code>,
58 * at column number <code>column</code> is editable.
59 */
60 public boolean isCellEditable(Object node, int column);
61
62 /**
63 * Sets the value for node <code>node</code>,
64 * at column number <code>column</code>.
65 */
66 public void setValueAt(Object aValue, Object node, int column);
67 }
|