Source code: com/puppycrawl/tools/checkstyle/gui/TreeTableModel.java
1 /*
2 * TreeTableModel.java
3 *
4 * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved.
5 *
6 * This software is the confidential and proprietary information of Sun
7 * Microsystems, Inc. ("Confidential Information"). You shall not
8 * disclose such Confidential Information and shall use it only in
9 * 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 /**
39 * Returns the number ofs availible column.
40 */
41 int getColumnCount();
42
43 /**
44 * Returns the name for column number <code>column</code>.
45 */
46 String getColumnName(int column);
47
48 /**
49 * Returns the type for column number <code>column</code>.
50 */
51 Class getColumnClass(int column);
52
53 /**
54 * Returns the value to be displayed for node <code>node</code>,
55 * at column number <code>column</code>.
56 */
57 Object getValueAt(Object node, int column);
58
59 /**
60 * Indicates whether the the value for node <code>node</code>,
61 * at column number <code>column</code> is editable.
62 */
63 boolean isCellEditable(Object node, int column);
64
65 /**
66 * Sets the value for node <code>node</code>,
67 * at column number <code>column</code>.
68 */
69 void setValueAt(Object aValue, Object node, int column);
70 }