01: /*
02: * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. Redistribution and use in source and binary
03: * forms, with or without modification, are permitted provided that the following conditions are met: -
04: * Redistributions of source code must retain the above copyright notice, this list of conditions and the
05: * following disclaimer. - Redistribution in binary form must reproduce the above copyright notice, this list
06: * of conditions and the following disclaimer in the documentation and/or other materials provided with the
07: * distribution. Neither the name of Sun Microsystems, Inc. or the names of contributors may be used to
08: * endorse or promote products derived from this software without specific prior written permission. This
09: * software is provided "AS IS," without a warranty of any kind. ALL EXPRESS OR IMPLIED CONDITIONS,
10: * REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
11: * PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES
12: * OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS
13: * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT
14: * OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED
15: * AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
16: * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You acknowledge that this software is not
17: * designed, licensed or intended for use in the design, construction, operation or maintenance of any nuclear
18: * facility.
19: */
20:
21: package br.com.igor.beans.table;
22:
23: import javax.swing.tree.TreeModel;
24:
25: /**
26: * TreeTableModel is the model used by a JTreeTable. It extends TreeModel to add methods for getting
27: * information about the set of columns each node in the TreeTableModel may have. Each column, like a column
28: * in a TableModel, has a name and a type associated with it. Each node in the TreeTableModel can return a
29: * value for each of the columns and set that value if isCellEditable() returns true.
30: *
31: * @author Philip Milne
32: * @author Scott Violet
33: */
34: public interface TreeTableModel extends TreeModel {
35: /**
36: * Returns the number of available columns.
37: * @return Nomero de colunas
38: */
39: public int getColumnCount();
40:
41: /**
42: * Returns the name for column number <code>column</code>.
43: *
44: * @param column
45: * @return 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: * @param column Coluna
52: * @return Class
53: */
54: public Class getColumnClass(int column);
55:
56: /**
57: * Returns the value to be displayed for node <code>node</code>, at column number <code>column</code>.
58: * @param node No
59: * @param column Coluna
60: * @return Valor
61: */
62: public Object getValueAt(Object node, int column);
63:
64: /**
65: * Indicates whether the the value for node <code>node</code>, at column number <code>column</code>
66: * is editable.
67: * @param node Nó
68: * @param column Coluna
69: * @return Se for editavel True
70: */
71: public boolean isCellEditable(Object node, int column);
72:
73: /**
74: * Sets the value for node <code>node</code>, at column number <code>column</code>.
75: * @param aValue Valor
76: * @param node Nó
77: * @param column Coluna
78: */
79: public void setValueAt(Object aValue, Object node, int column);
80: }
|