Methods Summary |
---|
public java.lang.Class | getColumnClass(int c) return types[c];
|
public int | getColumnCount() return titles.length;
|
public java.lang.String | getColumnName(int c) return titles[c];
|
public int | getRowCount() return data.length;
|
public java.lang.Object | getValueAt(int r, int c) return data[r][c];
|
public void | setFileStats(java.io.File dir)
String files[] = dir.list();
data = new Object[files.length][titles.length];
for (int i=0; i < files.length; i++) {
File tmp = new File(files[i]);
data[i][0] = new Boolean(tmp.isDirectory());
data[i][1] = tmp.getName();
data[i][2] = new Boolean(tmp.canRead());
data[i][3] = new Boolean(tmp.canWrite());
data[i][4] = new Long(tmp.length());
data[i][5] = new Date(tmp.lastModified());
}
// Just in case anyone's listening...
fireTableDataChanged();
|