ilog.ds.adapter
Class IlTableDS2AbstractListModelAdapter
java.lang.Object
|
+--ilog.ds.adapter.IlAbstractAdapter
|
+--ilog.ds.adapter.IlAbstractListModelAdapter
|
+--ilog.ds.adapter.IlTableDS2AbstractListModelAdapter
- All Implemented Interfaces:
- BatchListener, DataSourceListener, EventListener, IlFreezableAdapter, IlPluggableAdapter, ListDataListener, TableDSListener
- Direct Known Subclasses:
- IlTableDS2DefaultComboBoxModelAdapter, IlTableDS2DefaultListModelAdapter
- public abstract class IlTableDS2AbstractListModelAdapter
- extends IlAbstractListModelAdapter
- implements TableDSListener
This class adapts the events from the IlTableDataSource to a Swing
AbstractListModel. It does not implement how objects are created
or updated, that is, how the properties from the data source are mapped to
the Object themselves. This class supports the mapping between the
data source objects and the model objects. It stores the data source
reference.
- See Also:
IlTableDataSource
,
AbstractListModel
Methods inherited from class ilog.ds.adapter.IlAbstractAdapter |
addDispatchListener, addDSEvent, clearDSEvents, dispatchBatchedEvents, endBatch, firePostDispatchBatchedEventsEvent, firePreDispatchBatchedEventsEvent, GetColor, getSynchronizationStrategy, internalDataSourceChange, isFrozen, isInBatchedEvents, isInTransaction, postDispatchBatchedEvents, preDispatchBatchedEvents, removeDispatchListener, setFrozen, setSynchronizationStrategy, startBatch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_model
protected IlTableColumnInfo[] _model
_tds
protected IlTableDataSource _tds
_column
protected int _column
IlTableDS2AbstractListModelAdapter
public IlTableDS2AbstractListModelAdapter()
containsDSRow
public boolean containsDSRow(Object element)
getDSRow
public Object getDSRow(Object element)
containsElement
public boolean containsElement(Object dsRow)
getElement
public Object getElement(Object dsRow)
createElement
protected abstract Object createElement(IlTableCellInfo cellInfo)
- Method called to create an element in the list model.
- Parameters:
cellInfo
- The cellinfo from the data source corresponding to the list
element- Returns:
- the newly created Object, corresponding to the
parameters.
updateElement
protected abstract void updateElement(Object element,
IlTableCellInfo cellInfo)
- Method called to update an element in the list model.
- Parameters:
element
- the Object to updatecellInfo
- The updated cellinfo from the data source corresponding to the
list element
getTableDataSource
public IlTableDataSource getTableDataSource()
- Gets the IlTableDataSource in use by this adapter.
getDSMappedColumn
public int getDSMappedColumn()
- Returns the column source used in the IlTableDataSource to
fill the AbstractListModel.
setDSMappedColumn
public void setDSMappedColumn(int column)
- Defines the source column in the IlTableDataSource used to
fill the AbstractListModel.
setTableDataSource
public void setTableDataSource(IlTableDataSource tds)
- Sets the IlTableDataSource to use.
setTableDataSource
public void setTableDataSource(IlTableDataSource tds,
int column)
- Sets the IlTableDataSource and the column to use to fill the
list model.
modelCreated
public void modelCreated(TableModelEvent evt)
- Sets the IlTableDataSource to use. / public void
setListDataSourceEditor(IlTableDataSourceEditor tdse) { _tdse = tdse; }
/** TableDSListener implementation
- Specified by:
modelCreated
in interface TableDSListener
- Following copied from interface:
ilog.ds.TableDSListener
- Parameters:
e
- The corresponding event.- See Also:
TableModelEvent
,
IlTableColumnInfo
columnChange
public void columnChange(ColumnEvent evt)
- Description copied from interface:
TableDSListener
- A column property is changed.
- Specified by:
columnChange
in interface TableDSListener
- Following copied from interface:
ilog.ds.TableDSListener
- Parameters:
e
- The corresponding event.- See Also:
ColumnEvent
rowChange
public void rowChange(RowEvent evt)
- Description copied from interface:
TableDSListener
- A row is added, updated, or removed.
- Specified by:
rowChange
in interface TableDSListener
- Following copied from interface:
ilog.ds.TableDSListener
- Parameters:
e
- The corresponding event.- See Also:
RowEvent
internalColumnChange
protected void internalColumnChange(ColumnEvent e)
- Internal code called in the Swing event thread
internalModelCreated
protected void internalModelCreated(TableModelEvent e)
internalRowAdded
protected abstract void internalRowAdded(RowEvent evt)
internalRowRemoved
protected abstract void internalRowRemoved(RowEvent evt)
internalRowUpdated
protected abstract void internalRowUpdated(RowEvent evt)
dispatchBatchedEvent
protected void dispatchBatchedEvent(EventObject event)
- Overrides:
dispatchBatchedEvent
in class IlAbstractAdapter
plugDataSource
public void plugDataSource(IlDataSource dataSource)
- Description copied from interface:
IlPluggableAdapter
- Verify data source type, adapter stores and listens to data source.
plugDataSourceEditor
public void plugDataSourceEditor(IlDataSourceEditor dataSourceEditor)
- Description copied from interface:
IlPluggableAdapter
- Verify data source editor type, adapter stores data source editor.
unplugDataSource
public void unplugDataSource(IlDataSource dataSource)
- Description copied from interface:
IlPluggableAdapter
- Adapter cancels storing and stops listening to data source.
unplugDataSourceEditor
public void unplugDataSourceEditor(IlDataSourceEditor dataSourceEditor)
- Description copied from interface:
IlPluggableAdapter
- Adapter cancels storing of data source editor.