View Javadoc
1   package net.logAnalyzer.utils.gui.treetable;
2   /*
3    * %W% %E%
4    *
5    * Copyright 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.
6    * 
7    * Redistribution and use in source and binary forms, with or
8    * without modification, are permitted provided that the following
9    * conditions are met:
10   * 
11   * - Redistributions of source code must retain the above copyright
12   *   notice, this list of conditions and the following disclaimer. 
13   *   
14   * - Redistribution in binary form must reproduce the above
15   *   copyright notice, this list of conditions and the following
16   *   disclaimer in the documentation and/or other materials
17   *   provided with the distribution. 
18   *   
19   * Neither the name of Sun Microsystems, Inc. or the names of
20   * contributors may be used to endorse or promote products derived
21   * from this software without specific prior written permission.  
22   * 
23   * This software is provided "AS IS," without a warranty of any
24   * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
25   * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
26   * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
27   * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
28   * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
29   * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
30   * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE 
31   * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,   
32   * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER  
33   * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF 
34   * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS 
35   * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
36   * 
37   * You acknowledge that this software is not designed, licensed or
38   * intended for use in the design, construction, operation or
39   * maintenance of any nuclear facility.
40   */
41  
42  import javax.swing.tree.TreeModel;
43  
44  /***
45   * TreeTableModel is the model used by a JTreeTable. It extends TreeModel
46   * to add methods for getting inforamtion about the set of columns each 
47   * node in the TreeTableModel may have. Each column, like a column in 
48   * a TableModel, has a name and a type associated with it. Each node in 
49   * the TreeTableModel can return a value for each of the columns and 
50   * set that value if isCellEditable() returns true. 
51   *
52   * @version %I% %G%
53   *
54   * @author Philip Milne 
55   * @author Scott Violet
56   */
57  public interface TreeTableModel extends TreeModel
58  {
59      /***
60       * Returns the number ofs availible column.
61       */
62      public int getColumnCount();
63  
64      /***
65       * Returns the name for column number <code>column</code>.
66       */
67      public String getColumnName(int column);
68  
69      /***
70       * Returns the type for column number <code>column</code>.
71       */
72      public Class getColumnClass(int column);
73  
74      /***
75       * Returns the value to be displayed for node <code>node</code>, 
76       * at column number <code>column</code>.
77       */
78      public Object getValueAt(Object node, int column);
79  
80      /***
81       * Indicates whether the the value for node <code>node</code>, 
82       * at column number <code>column</code> is editable.
83       */
84      public boolean isCellEditable(Object node, int column);
85  
86      /***
87       * Sets the value for node <code>node</code>, 
88       * at column number <code>column</code>.
89       */
90      public void setValueAt(Object aValue, Object node, int column);
91  }
92