Großmarkt

market.swing
Class HistoryEntryModel

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--market.swing.HistoryEntryModel
All Implemented Interfaces:
Serializable, TableModel

public class HistoryEntryModel
extends AbstractTableModel

TableModel for tables that display HistoryEntries.

See Also:
Serialized Form

Field Summary
static int ORDER_HISTORY
           
static int PRICE_HISTORY
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
HistoryEntryModel(List data, int type)
           
 
Method Summary
 Class getColumnClass(int column)
           
 int getColumnCount()
           
 String getColumnName(int i)
           
 int getRowCount()
           
 Object getValueAt(int row, int column)
           
 
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

PRICE_HISTORY

public static final int PRICE_HISTORY
See Also:
Constant Field Values

ORDER_HISTORY

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

HistoryEntryModel

public HistoryEntryModel(List data,
                         int type)
Parameters:
data - the history to be displayed
type - the kind of history:
Method Detail

getColumnName

public String getColumnName(int i)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel
Parameters:
i - the affected column.
Returns:
columns' names.

getRowCount

public int getRowCount()
Returns:
the number of the table's rows.

getColumnCount

public int getColumnCount()
Returns:
the number of the table's columns.

getColumnClass

public Class getColumnClass(int column)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel
Parameters:
column - the affected column.
Returns:
columns' classes. They indicate how column's values should be aligned.

getValueAt

public Object getValueAt(int row,
                         int column)
Parameters:
row - the affected row.
column - the affected column.
Returns:
the table cell's value.

Großmarkt