net.sf.jomic.comic
Class ConversionReport

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by net.sf.jomic.comic.ConversionReport
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, javax.swing.event.ChangeListener, javax.swing.table.TableModel

public class ConversionReport
extends javax.swing.table.AbstractTableModel
implements javax.swing.event.ChangeListener

A report holding the current state of a conversion of multiple comics. To simplify the presentation it also acts as TableModel.

Author:
Thomas Aglassinger
See Also:
Serialized Form

Field Summary
static int ERROR_COLUMN
           
static int SOURCE_FILE_COLUMN
           
static int SOURCE_FILE_SIZE_COLUMN
           
static int STATE_COLUMN
           
static int TARGET_FILE_COLUMN
           
static int TARGET_FILE_SIZE_COLUMN
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ConversionReport()
           
 
Method Summary
 void clear()
           
 ConversionReportItem get(ComicToConvert comicToConvert)
           
 ConversionReportItem get(int index)
           
 java.lang.Class getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 java.lang.String getColumnName(int columnIndex)
           
 int getRowCount()
           
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
           
 void put(ComicToConvert comicToConvert)
           
 int size()
          Number of items in the report.
 void stateChanged(javax.swing.event.ChangeEvent event)
          Called when one of the report items has changed to reflect the state in the table model.
 
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

ERROR_COLUMN

public static final int ERROR_COLUMN
See Also:
Constant Field Values

SOURCE_FILE_COLUMN

public static final int SOURCE_FILE_COLUMN
See Also:
Constant Field Values

SOURCE_FILE_SIZE_COLUMN

public static final int SOURCE_FILE_SIZE_COLUMN
See Also:
Constant Field Values

STATE_COLUMN

public static final int STATE_COLUMN
See Also:
Constant Field Values

TARGET_FILE_COLUMN

public static final int TARGET_FILE_COLUMN
See Also:
Constant Field Values

TARGET_FILE_SIZE_COLUMN

public static final int TARGET_FILE_SIZE_COLUMN
See Also:
Constant Field Values
Constructor Detail

ConversionReport

public ConversionReport()
Method Detail

get

public ConversionReportItem get(ComicToConvert comicToConvert)

get

public ConversionReportItem get(int index)

getColumnClass

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

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface javax.swing.table.TableModel

getColumnName

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

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface javax.swing.table.TableModel

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Specified by:
getValueAt in interface javax.swing.table.TableModel

clear

public void clear()

put

public void put(ComicToConvert comicToConvert)

size

public int size()
Number of items in the report.


stateChanged

public void stateChanged(javax.swing.event.ChangeEvent event)
Called when one of the report items has changed to reflect the state in the table model.

Specified by:
stateChanged in interface javax.swing.event.ChangeListener