org.alltimeflashdreamer.filelister.gui
Class FileListerTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byjavax.swing.table.DefaultTableModel
          extended byorg.alltimeflashdreamer.filelister.gui.FileListerTableModel
All Implemented Interfaces:
Serializable, TableModel

public class FileListerTableModel
extends DefaultTableModel

Title: FileListerTableModel

Description: This is the table model which shows the list of properties needed by the FileLister application.

Organization: All Time Flash Dreamer

Version:
0.5.1
Author:
Copyright (c) 2002-2004 by Florian Steinsiepe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
FileListerTableModel(File propertyFile)
          Constructor initializes the (default) parameters of the property file (unverified) and stores them within the table model.
 
Method Summary
 int getColumnCount()
          Returns the column count of the table.
 String getColumnName(int iColumn)
          Returns the name of the column having the given number.
 FileListerXMLHandler getXMLHandler()
          Returns the config reader, e.g. for save actions.
 boolean isCellEditable(int iRow, int iColumn)
          Returns whether the given cell is editable.
 void reload(File propertyFile, boolean bLoadDefaults)
          Clears the whole table, reloads the configuration and notifies the table about the change in data.
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileListerTableModel

public FileListerTableModel(File propertyFile)
                     throws IOException,
                            SAXException
Constructor initializes the (default) parameters of the property file (unverified) and stores them within the table model.

Parameters:
propertyFile - the property file
Throws:
IOException - if the property file wasn't found
SAXException - if the property file couldn't be parsed
Method Detail

getColumnCount

public int getColumnCount()
Returns the column count of the table.

Returns:
how many columns are there in the table?

getColumnName

public String getColumnName(int iColumn)
Returns the name of the column having the given number.

Parameters:
iColumn - the number of the column
Returns:
the name of the given column

isCellEditable

public boolean isCellEditable(int iRow,
                              int iColumn)
Returns whether the given cell is editable. This is only true if the given cell is a member of the value column .

Parameters:
iRow - the number of the row
iColumn - the number of the column
Returns:
only true if the second column

getXMLHandler

public FileListerXMLHandler getXMLHandler()
Returns the config reader, e.g. for save actions.

Returns:
the config reader class

reload

public void reload(File propertyFile,
                   boolean bLoadDefaults)
            throws IOException,
                   SAXException
Clears the whole table, reloads the configuration and notifies the table about the change in data.

Parameters:
propertyFile - the file to (re)load
bLoadDefaults - whether to load the default values or not
Throws:
IOException - if the property file wasn't found
SAXException - if the property file couldn't be parsed