ilog.ds.adapter
Class IlAbstractListModelAdapter

java.lang.Object
  |
  +--ilog.ds.adapter.IlAbstractAdapter
        |
        +--ilog.ds.adapter.IlAbstractListModelAdapter
All Implemented Interfaces:
BatchListener, DataSourceListener, EventListener, IlFreezableAdapter, IlPluggableAdapter, ListDataListener
Direct Known Subclasses:
IlListDS2AbstractListModelAdapter, IlTableDS2AbstractListModelAdapter

public abstract class IlAbstractListModelAdapter
extends IlAbstractAdapter
implements ListDataListener, IlPluggableAdapter

This class adapts the events from the IlListDataSource 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:
IlListDataSource, AbstractListModel

Inner Class Summary
 class IlAbstractListModelAdapter.Element
           
 
Field Summary
protected  Map _ds2model
           
protected  AbstractListModel _lm
           
protected  Map _model2ds
           
 
Fields inherited from class ilog.ds.adapter.IlAbstractAdapter
_dispatchListeners, _events, _frozenEvents, _inBatchedEvents, _inTransaction, _isFrozen, _syncStrategy
 
Constructor Summary
IlAbstractListModelAdapter()
           
 
Method Summary
 void contentsChanged(ListDataEvent e)
           
 void dataSourceChange(DataSourceEvent e)
          DataSourceListener implementation
 AbstractListModel getModel()
          Gets the AbstractListModel in use by this adapter.
protected  Object getSynchronizationObject()
           
 void intervalAdded(ListDataEvent e)
           
 void intervalRemoved(ListDataEvent e)
           
 void setModel(AbstractListModel lm)
          Sets the ListModel to use
 
Methods inherited from class ilog.ds.adapter.IlAbstractAdapter
addDispatchListener, addDSEvent, clearDSEvents, dispatchBatchedEvent, 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
 
Methods inherited from interface ilog.ds.adapter.IlPluggableAdapter
plugDataSource, plugDataSourceEditor, unplugDataSource, unplugDataSourceEditor
 

Field Detail

_model2ds

protected Map _model2ds

_ds2model

protected Map _ds2model

_lm

protected AbstractListModel _lm
Constructor Detail

IlAbstractListModelAdapter

public IlAbstractListModelAdapter()
Method Detail

getSynchronizationObject

protected Object getSynchronizationObject()
Description copied from class: IlAbstractAdapter
Gets the object to synchronize in the synchronization strategy used by this adapter.
Overrides:
getSynchronizationObject in class IlAbstractAdapter
Following copied from class: ilog.ds.adapter.IlAbstractAdapter
Returns:
this by default, the data model generally (in subsclasses)

setModel

public void setModel(AbstractListModel lm)
Sets the ListModel to use

getModel

public AbstractListModel getModel()
Gets the AbstractListModel in use by this adapter.

dataSourceChange

public void dataSourceChange(DataSourceEvent e)
DataSourceListener implementation
Following copied from interface: ilog.ds.DataSourceListener
Parameters:
e - The event
See Also:
DataSourceEvent

contentsChanged

public void contentsChanged(ListDataEvent e)
Specified by:
contentsChanged in interface ListDataListener

intervalAdded

public void intervalAdded(ListDataEvent e)
Specified by:
intervalAdded in interface ListDataListener

intervalRemoved

public void intervalRemoved(ListDataEvent e)
Specified by:
intervalRemoved in interface ListDataListener