|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
org.jcreme.swing.table.AbstractSortableTableModel
org.jcreme.swing.reporting.ReportTableModel
This is an implementation of an AbstractSortableTableModel based on the TableReport interface. This model enables to present a TableReport in a sortable way.
Field Summary |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
ReportTableModel(Report report)
Creates new BondPositionReportTableModel |
Method Summary | |
void |
fireTableDataChanged()
Override the original method to provide a more precise behaviour when the change originates in the report (partial change). |
java.lang.Class |
getColumnClass(int columnIndex)
Gives access to the class of the values that are in a column. |
int |
getColumnCount()
Gives access to the number of columns in the report. |
java.lang.String |
getColumnName(int column)
Gives access to the name of a column. |
protected java.lang.Object |
getOriginalValueAt(int row,
int column)
This method returns the value at the original (non sorted) row. |
int |
getRowCount()
Gives access to the number of rows in the report. |
protected boolean |
isOriginalCellEditable(int row,
int column)
This method enables to determine if the value at the original (non sorted) row can be modified. |
void |
reportChanged(ReportChangeEvent e)
This method enables to transform the changes in the report into event that report changes in the model. |
protected void |
setOriginalValueAt(java.lang.Object value,
int row,
int column)
This method enables to change the value at the original (non sorted) row. |
Methods inherited from class org.jcreme.swing.table.AbstractSortableTableModel |
compare, compareRowsByColumn, getOriginalRow, getSortingColumns, getValueAt, initConverterArray, isCellEditable, originalIntervalToSortedIntervals, setValueAt, shuttleSort, sort |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
addTableModelListener, removeTableModelListener |
Constructor Detail |
public ReportTableModel(Report report)
report
- the report to be displayed in a JTable.Method Detail |
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
protected java.lang.Object getOriginalValueAt(int row, int column)
getOriginalValueAt
in class AbstractSortableTableModel
row
- the row for which the value is requested.column
- the column for which the value is requested.
protected void setOriginalValueAt(java.lang.Object value, int row, int column)
setOriginalValueAt
in class AbstractSortableTableModel
value
- the value to set these coordinates in the original model.row
- the row number in the original model.column
- the column in the model.public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.String getColumnName(int column)
getColumnName
in interface javax.swing.table.TableModel
column
- the index of the column for which we want the name.
public void reportChanged(ReportChangeEvent e)
reportChanged
in interface ReportChangeListener
e
- the event sent by the report.public void fireTableDataChanged()
public java.lang.Class getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
columnIndex
- the column for which we want the type.
protected boolean isOriginalCellEditable(int row, int column)
AbstractSortableTableModel
isOriginalCellEditable
in class AbstractSortableTableModel
row
- the row number in the original model.column
- the column in the model.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |