01: /*
02: * The contents of this file are subject to the Mozilla Public License
03: * Version 1.1 (the "License"); you may not use this file except in
04: * compliance with the License. You may obtain a copy of the License at
05: * http://www.mozilla.org/MPL/
06: *
07: * Software distributed under the License is distributed on an "AS IS"
08: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
09: * License for the specific language governing rights and limitations
10: * under the License.
11: *
12: * The Original Code is iSQL-Viewer, A Mutli-Platform Database Tool.
13: *
14: * The Initial Developer of the Original Code is iSQL-Viewer, A Mutli-Platform Database Tool.
15: * Portions created by Mark A. Kobold are Copyright (C) 2000-2007. All Rights Reserved.
16: *
17: * Contributor(s):
18: * Mark A. Kobold [mkobold <at> isqlviewer <dot> com].
19: *
20: * If you didn't download this code from the following link, you should check
21: * if you aren't using an obsolete version: http://www.isqlviewer.com
22: */
23: package org.isqlviewer.swing.outline;
24:
25: import javax.swing.tree.TreeModel;
26:
27: /**
28: * TreeTableModel is the model used by a JTreeTable.
29: * <p>
30: * It extends TreeModel to add methods for getting inforamtion about the set of columns each node in the TreeTableModel
31: * may have. Each column, like a column in a TableModel, has a name and a type associated with it. Each node in the
32: * TreeTableModel can return a value for each of the columns and set that value if isCellEditable() returns true.
33: *
34: * @author Philip Milne
35: * @author Scott Violet
36: */
37: public interface OutlineModel extends TreeModel {
38:
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>, at column number <code>column</code>.
56: */
57: public Object getValueAt(Object node, int column);
58:
59: /**
60: * Indicates whether the the value for node <code>node</code>, at column number <code>column</code> is
61: * editable.
62: */
63: public boolean isCellEditable(Object node, int column);
64:
65: /**
66: * Sets the value for node <code>node</code>, at column number <code>column</code>.
67: */
68: public void setValueAt(Object aValue, Object node, int column);
69: }
|