KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jodd > swing > ReadOnlyDefaultTableModel


1 // Copyright (c) 2003-2007, Jodd Team (jodd.sf.net). All Rights Reserved.
2

3 package jodd.swing;
4
5 import java.util.Vector JavaDoc;
6
7 import javax.swing.table.DefaultTableModel JavaDoc;
8
9 public class ReadOnlyDefaultTableModel extends DefaultTableModel JavaDoc {
10
11     public ReadOnlyDefaultTableModel() {
12         super();
13     }
14
15     public ReadOnlyDefaultTableModel(int rowCount, int columnCount) {
16         super(rowCount, columnCount);
17     }
18
19     public ReadOnlyDefaultTableModel(Object JavaDoc[] columnNames, int rowCount) {
20         super(columnNames, rowCount);
21     }
22
23     public ReadOnlyDefaultTableModel(Object JavaDoc[][] data, Object JavaDoc[] columnNames) {
24         super(data, columnNames);
25     }
26
27     public ReadOnlyDefaultTableModel(Vector JavaDoc columnNames, int rowCount) {
28         super(columnNames, rowCount);
29     }
30
31     public ReadOnlyDefaultTableModel(Vector JavaDoc data, Vector JavaDoc columnNames) {
32         super(data, columnNames);
33     }
34
35     /**
36      * Returns <code>false</code> regardless of parameter values.
37      *
38      * @param row the row whose value is to be queried
39      * @param column the column whose value is to be queried
40      * @return <code>false</code>
41      * @see #setValueAt
42      */

43     public boolean isCellEditable(int row, int column) {
44         return false;
45     }
46 }
47
Popular Tags