KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mc4j > console > swing > treetable > TreeTableModel


1 package org.mc4j.console.swing.treetable;
2
3 /*
4  * TreeTableModel.java
5  *
6  * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved.
7  *
8  * This software is the confidential and proprietary information of Sun
9  * Microsystems, Inc. ("Confidential Information"). You shall not
10  * disclose such Confidential Information and shall use it only in
11  * accordance with the terms of the license agreement you entered into
12  * with Sun.
13  *
14  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
15  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
18  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
19  * THIS SOFTWARE OR ITS DERIVATIVES.
20  *
21  */

22
23 import javax.swing.tree.TreeModel JavaDoc;
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 JavaDoc
37 {
38     /**
39      * Returns the number ofs availible column.
40      */

41     public int getColumnCount();
42
43     /**
44      * Returns the name for column number <code>column</code>.
45      */

46     public String JavaDoc getColumnName(int column);
47
48     /**
49      * Returns the type for column number <code>column</code>.
50      */

51     public Class JavaDoc 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     public Object JavaDoc getValueAt(Object JavaDoc 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     public boolean isCellEditable(Object JavaDoc node, int column);
64
65     /**
66      * Sets the value for node <code>node</code>,
67      * at column number <code>column</code>.
68      */

69     public void setValueAt(Object JavaDoc aValue, Object JavaDoc node, int column);
70 }
71
Popular Tags