uk.ac.essex.common.gui.file
Class DirectoryModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by uk.ac.essex.common.gui.file.DirectoryModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class DirectoryModel
extends javax.swing.table.AbstractTableModel

This is a model of a directory

See Also:
Serialized Form

Field Summary
protected  java.lang.String[] children
           
protected  java.io.File directory
           
protected  javax.swing.Icon dirIcon
           
protected  javax.swing.Icon fileIcon
           
protected  java.io.FilenameFilter filenameFilter
           
protected  int rowCount
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
DirectoryModel()
           
DirectoryModel(java.io.File dir)
           
DirectoryModel(java.io.FilenameFilter filenameFilter)
           
 
Method Summary
 java.lang.Class getColumnClass(int column)
           
 int getColumnCount()
           
 java.lang.String getColumnName(int column)
           
 java.io.File getRow(int row)
           
 int getRowCount()
           
 java.lang.Object getValueAt(int row, int column)
           
protected  void init()
           
 void setDirectory(java.io.File dir)
           
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

directory

protected java.io.File directory

children

protected java.lang.String[] children

rowCount

protected int rowCount

dirIcon

protected javax.swing.Icon dirIcon

fileIcon

protected javax.swing.Icon fileIcon

filenameFilter

protected java.io.FilenameFilter filenameFilter
Constructor Detail

DirectoryModel

public DirectoryModel()

DirectoryModel

public DirectoryModel(java.io.FilenameFilter filenameFilter)

DirectoryModel

public DirectoryModel(java.io.File dir)
Method Detail

init

protected void init()

setDirectory

public void setDirectory(java.io.File dir)

getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

getRow

public java.io.File getRow(int row)

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)

getColumnName

public java.lang.String getColumnName(int column)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getColumnClass

public java.lang.Class getColumnClass(int column)
Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel