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:
21: package com.puppycrawl.tools.checkstyle.gui;
22:
23: import javax.swing.tree.TreeModel;
24:
25: /**
26: * TreeTableModel is the model used by a JTreeTable. It extends TreeModel
27: * to add methods for getting inforamtion about the set of columns each
28: * node in the TreeTableModel may have. Each column, like a column in
29: * a TableModel, has a name and a type associated with it. Each node in
30: * the TreeTableModel can return a value for each of the columns and
31: * set that value if isCellEditable() returns true.
32: *
33: * @author Philip Milne
34: * @author Scott Violet
35: */
36: public interface TreeTableModel extends TreeModel {
37: /**
38: * Returns the number ofs availible column.
39: */
40: int getColumnCount();
41:
42: /**
43: * Returns the name for column number <code>column</code>.
44: */
45: String getColumnName(int column);
46:
47: /**
48: * Returns the type for column number <code>column</code>.
49: */
50: Class getColumnClass(int column);
51:
52: /**
53: * Returns the value to be displayed for node <code>node</code>,
54: * at column number <code>column</code>.
55: */
56: Object getValueAt(Object node, int column);
57:
58: /**
59: * Indicates whether the the value for node <code>node</code>,
60: * at column number <code>column</code> is editable.
61: */
62: boolean isCellEditable(Object node, int column);
63:
64: /**
65: * Sets the value for node <code>node</code>,
66: * at column number <code>column</code>.
67: */
68: void setValueAt(Object aValue, Object node, int column);
69: }
|