01: /*
02: * TreeTableModel.java
03: *
04: * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * This software is the confidential and proprietary information of Sun
07: * Microsystems, Inc. ("Confidential Information"). You shall not
08: * disclose such Confidential Information and shall use it only in
09: * accordance with the terms of the license agreement you entered into
10: * with Sun.
11: *
12: * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
13: * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
14: * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
15: * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
16: * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
17: * THIS SOFTWARE OR ITS DERIVATIVES.
18: *
19: */
20: package gruntspud.ui.treetable;
21:
22: import gruntspud.ui.CheckNode;
23:
24: import javax.swing.tree.TreeModel;
25: import javax.swing.tree.TreeNode;
26:
27: /**
28: * TreeTableModel is the model used by a JTreeTable. It extends TreeModel
29: * to add methods for getting inforamtion about the set of columns each
30: * node in the TreeTableModel may have. Each column, like a column in
31: * a TableModel, has a name and a type associated with it. Each node in
32: * the TreeTableModel can return a value for each of the columns and
33: * set that value if isCellEditable() returns true.
34: *
35: * @author Philip Milne
36: * @author Scott Violet
37: */
38: public interface TreeTableModel extends TreeModel {
39: /**
40: * Returns the number ofs availible column.
41: */
42: public int getColumnCount();
43:
44: /**
45: * Returns the name for column number <code>column</code>.
46: */
47: public String getColumnName(int column);
48:
49: /**
50: * Returns the type for column number <code>column</code>.
51: */
52: public Class getColumnClass(int column);
53:
54: /**
55: * Returns the value to be displayed for node <code>node</code>,
56: * at column number <code>column</code>.
57: */
58: public Object getValueAt(Object node, int column);
59:
60: /**
61: * Indicates whether the the value for node <code>node</code>,
62: * at column number <code>column</code> is editable.
63: */
64: public boolean isCellEditable(Object node, int column);
65:
66: /**
67: * Sets the value for node <code>node</code>,
68: * at column number <code>column</code>.
69: */
70: public void setValueAt(Object aValue, Object node, int column);
71: }
|