|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.gui.components.table.QueueTableModelInterceptor
public class QueueTableModelInterceptor
QueueTableModelInterceptor
wraps around TableModel
and intercepts update events. All events are queued and dispatched in AWT
thread. Similar events are integrated into one event. This makes updates
from delegate GUI thread safe and prevents table to be updated unnecessary.
Tu use interceptor, create your model, create interceptor and pass your
model as parameter, then add to the table interceptor as model. Listen to
model events directly on your model and not on interceptor or on model,
which is rerturned from the table (except if QueueTable
becouse it completly hides the interceptor).
Constructor Summary | |
---|---|
QueueTableModelInterceptor(javax.swing.table.TableModel delegate)
Creates a new QueueTableModelInterceptor object. |
Method Summary | |
---|---|
void |
addTableModelListener(javax.swing.event.TableModelListener l)
|
protected javax.swing.event.TableModelEvent |
dequeue()
|
void |
destroy()
Clears internal interceptor thread. |
protected void |
enqueue(javax.swing.event.TableModelEvent e)
|
protected void |
fire(javax.swing.event.TableModelEvent e)
|
java.lang.Class<?> |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
java.lang.String |
getColumnName(int columnIndex)
|
javax.swing.table.TableModel |
getDelegate()
The model which is wrapped by this interceptor. |
int |
getRelaxationTime()
Returns minimum time betwean two table updates interceptor will wait. |
int |
getRowCount()
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
boolean |
isDestroyed()
Returns true after destroy was called. |
void |
removeTableModelListener(javax.swing.event.TableModelListener l)
|
void |
run()
|
void |
setRelaxationTime(int relaxationTime)
Sets minimum time betwean two table updates interceptor will wait. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
|
void |
tableChanged(javax.swing.event.TableModelEvent e)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueueTableModelInterceptor(javax.swing.table.TableModel delegate)
delegate
- the wrapped modelMethod Detail |
---|
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface javax.swing.table.TableModel
public java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
public void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
setValueAt
in interface javax.swing.table.TableModel
public java.lang.String getColumnName(int columnIndex)
getColumnName
in interface javax.swing.table.TableModel
public void addTableModelListener(javax.swing.event.TableModelListener l)
addTableModelListener
in interface javax.swing.table.TableModel
public void removeTableModelListener(javax.swing.event.TableModelListener l)
removeTableModelListener
in interface javax.swing.table.TableModel
public javax.swing.table.TableModel getDelegate()
public void tableChanged(javax.swing.event.TableModelEvent e)
tableChanged
in interface javax.swing.event.TableModelListener
protected void fire(javax.swing.event.TableModelEvent e)
protected void enqueue(javax.swing.event.TableModelEvent e)
protected javax.swing.event.TableModelEvent dequeue()
public void run()
run
in interface java.lang.Runnable
public int getRelaxationTime()
public void setRelaxationTime(int relaxationTime)
relaxationTime
- public boolean isDestroyed()
true
after destroy was called.
true
if destroyedpublic void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |