public abstract class SelfUpdatingTableModel extends DefaultTableModel
columnIdentifiers, dataVector
listenerList
Constructor and Description |
---|
SelfUpdatingTableModel() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
catchException(Exception e)
This method is called whenever an exception is encountered in a separate
thread.
|
protected void |
dataMissingAtRow(int row)
Calling this method indicates that data is missing at the given row.
|
boolean |
isSelfUpdating()
Indicates whether the table is in self update mode.
|
void |
loadColumnsContent(ArrayList<Integer> columns,
String waitingContent,
WaitingHandler waitingHandler)
Loads the content of a column without updating the table.
|
protected abstract void |
loadDataForColumn(int column,
WaitingHandler waitingHandler)
Loads the data for a column.
|
protected abstract int |
loadDataForRows(int start,
int end,
boolean interrupted)
Loads the data needed for rows between start and end (inclusively).
|
boolean |
needsUpdate(int column,
String waitingContent)
Indicates whether the given column needs an update, i.e.
|
void |
setSelfUpdating(boolean selfUpdating)
Sets whether the table is in self update mode.
|
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, isCellEditable, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
protected abstract int loadDataForRows(int start, int end, boolean interrupted)
start
- the number of the first row to loadend
- the number of the last row to loadinterrupted
- a boolean indicating whether the loading shall be
stoppedprotected abstract void loadDataForColumn(int column, WaitingHandler waitingHandler)
column
- the column numberwaitingHandler
- a waiting handler used to display progress to the
user or interrupt the processprotected abstract void catchException(Exception e)
e
- the exception encounteredprotected void dataMissingAtRow(int row) throws InterruptedException
row
- the row numberInterruptedException
public boolean isSelfUpdating()
public void setSelfUpdating(boolean selfUpdating)
selfUpdating
- if false the table will not automatically updatepublic boolean needsUpdate(int column, String waitingContent)
column
- index of the column of interestwaitingContent
- the waiting content of this tablepublic void loadColumnsContent(ArrayList<Integer> columns, String waitingContent, WaitingHandler waitingHandler) throws InterruptedException
columns
- the column of interestwaitingContent
- the content of a cell indicating that loading is
not completedwaitingHandler
- waiting handler for display of the progress or
loading interruption (can be null)InterruptedException
Copyright © 2013. All Rights Reserved.