Venice 0.751beta

nz.org.venice.ui
Class MixedQuoteModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended bynz.org.venice.ui.AbstractTableModel
          extended bynz.org.venice.ui.AbstractQuoteModel
              extended bynz.org.venice.ui.MixedQuoteModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class MixedQuoteModel
extends AbstractQuoteModel

Table model to display a mixture of end of day and intra-day quotes to the user. This model tells a table how to display the quotes by describing the columns and how to populate the table with quotes using data from a quote bundle.

Author:
Andrew Leppard
See Also:
AbstractTable, Column, ExpressionColumn, MixedQuoteBundle, Serialized Form

Field Summary
static int ACTIVITY_COLUMN
          Activity column number.
static int ASK_COLUMN
          Day low column number.
static int BID_COLUMN
          Day low column number.
static int DATE_COLUMN
          Date column number.
static int DAY_HIGH_COLUMN
          Day high column number.
static int DAY_LOW_COLUMN
          Day low column number.
static int DAY_OPEN_COLUMN
          Day open column number.
static int LAST_COLUMN
          Day close column number.
static int PERCENT_CHANGE_COLUMN
          Percent change column number.
static int POINT_CHANGE_COLUMN
          Point change column number.
static int SYMBOL_COLUMN
          Symbol column number.
static int TIME_COLUMN
          Time column number.
static int VOLUME_COLUMN
          Volume column number.
 
Fields inherited from class nz.org.venice.ui.AbstractQuoteModel
EXPRESSION_COLUMN_COUNT
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
MixedQuoteModel(QuoteBundle quoteBundle, java.util.List quotes, int displayDate, int displaySymbol)
          Create a new mixed quote model.
 
Method Summary
 java.lang.Object getValueAt(int row, int column)
          Return the value at the given table cell.
 
Methods inherited from class nz.org.venice.ui.AbstractQuoteModel
getColumn, getColumnCount, getExpressionColumns, getQuotes, getRowCount, setExpressionColumns, setQuotes
 
Methods inherited from class nz.org.venice.ui.AbstractTableModel
getColumnClass, getColumnName, setColumns
 
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

SYMBOL_COLUMN

public static final int SYMBOL_COLUMN
Symbol column number.

See Also:
Constant Field Values

DATE_COLUMN

public static final int DATE_COLUMN
Date column number.

See Also:
Constant Field Values

TIME_COLUMN

public static final int TIME_COLUMN
Time column number.

See Also:
Constant Field Values

LAST_COLUMN

public static final int LAST_COLUMN
Day close column number.

See Also:
Constant Field Values

POINT_CHANGE_COLUMN

public static final int POINT_CHANGE_COLUMN
Point change column number.

See Also:
Constant Field Values

PERCENT_CHANGE_COLUMN

public static final int PERCENT_CHANGE_COLUMN
Percent change column number.

See Also:
Constant Field Values

BID_COLUMN

public static final int BID_COLUMN
Day low column number.

See Also:
Constant Field Values

ASK_COLUMN

public static final int ASK_COLUMN
Day low column number.

See Also:
Constant Field Values

DAY_OPEN_COLUMN

public static final int DAY_OPEN_COLUMN
Day open column number.

See Also:
Constant Field Values

DAY_HIGH_COLUMN

public static final int DAY_HIGH_COLUMN
Day high column number.

See Also:
Constant Field Values

DAY_LOW_COLUMN

public static final int DAY_LOW_COLUMN
Day low column number.

See Also:
Constant Field Values

VOLUME_COLUMN

public static final int VOLUME_COLUMN
Volume column number.

See Also:
Constant Field Values

ACTIVITY_COLUMN

public static final int ACTIVITY_COLUMN
Activity column number.

See Also:
Constant Field Values
Constructor Detail

MixedQuoteModel

public MixedQuoteModel(QuoteBundle quoteBundle,
                       java.util.List quotes,
                       int displayDate,
                       int displaySymbol)
Create a new mixed quote model.

Parameters:
quoteBundle - Quote bundle
quotes - A list of Quote which contain the quote symbols and dates to table.
displayDate - Display the date column? Either Column.HIDDEN, Column.VISIBLE or Column.ALWAYS_HIDDEN.
displaySymbol - Display the symbol column? Either Column.HIDDEN, Column.VISIBLE or Column.ALWAYS_HIDDEN.
Method Detail

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
Return the value at the given table cell.

Parameters:
row - Row number.
column - Column number.
Returns:
Value to display in cell.

Venice 0.751beta