ilog.ds.adapter
Class IlListDS2AbstractListModelAdapter
java.lang.Object
|
+--ilog.ds.adapter.IlAbstractAdapter
|
+--ilog.ds.adapter.IlAbstractListModelAdapter
|
+--ilog.ds.adapter.IlListDS2AbstractListModelAdapter
- All Implemented Interfaces:
- BatchListener, DataSourceListener, EventListener, IlFreezableAdapter, IlPluggableAdapter, ListDataListener, ListDSListener
- Direct Known Subclasses:
- IlListDS2DefaultComboBoxModelAdapter, IlListDS2DefaultListModelAdapter
- public abstract class IlListDS2AbstractListModelAdapter
- extends IlAbstractListModelAdapter
- implements ListDSListener
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
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 |
_lds
protected IlListDataSource _lds
_ldse
protected IlListDataSourceEditor _ldse
IlListDS2AbstractListModelAdapter
public IlListDS2AbstractListModelAdapter()
containsDSElement
public boolean containsDSElement(Object element)
getDSElement
public Object getDSElement(Object element)
containsElement
public boolean containsElement(Object dsElement)
getElement
public Object getElement(Object dsElement)
createElement
protected abstract Object createElement(Map properties)
- Method called to create an element in the list model.
- Parameters:
properties
- The properties from the data source- Returns:
- the newly created Object, corresponding to the
parameters.
updateElement
protected abstract void updateElement(Object element,
Map properties)
- Method called to update an element in the list model.
- Parameters:
properties
- The updated properties from the data sourcedsElement
- the Object to update
getListDataSource
public IlListDataSource getListDataSource()
- Updates an element in the data source
- Parameters:
dsElement
- The element to update in the data sourceelement
- The corresponding Object / protected abstract void
updateDSElement(Object dsElement, Object element);
/** Gets the IlListDataSource in use by this adapter.
getListDataSourceEditor
public IlListDataSourceEditor getListDataSourceEditor()
- Gets the IlListDataSourceEditor in use by this adapter.
setListDataSource
public void setListDataSource(IlListDataSource lds)
- Sets the IlListDataSource to use.
setListDataSourceEditor
public void setListDataSourceEditor(IlListDataSourceEditor ldse)
- Sets the IlListDataSource to use.
elementChange
public void elementChange(ElementEvent e)
- ListDSListener implementation
- Specified by:
elementChange
in interface ListDSListener
- Following copied from interface:
ilog.ds.ListDSListener
- Parameters:
e
- The event- See Also:
ElementEvent
,
IlListDataSource
internalElementAdded
protected abstract void internalElementAdded(ElementEvent evt)
- Internal code called in the Swing event thread
internalElementUpdated
protected abstract void internalElementUpdated(ElementEvent evt)
internalElementRemoved
protected abstract void internalElementRemoved(ElementEvent evt)
dispatchBatchedEvent
protected void dispatchBatchedEvent(EventObject event)
- Overrides:
dispatchBatchedEvent
in class IlAbstractAdapter
contentsChanged
public void contentsChanged(ListDataEvent e)
- Overrides:
contentsChanged
in class IlAbstractListModelAdapter
intervalAdded
public void intervalAdded(ListDataEvent e)
- Overrides:
intervalAdded
in class IlAbstractListModelAdapter
intervalRemoved
public void intervalRemoved(ListDataEvent e)
- Overrides:
intervalRemoved
in class IlAbstractListModelAdapter
plugDataSource
public void plugDataSource(IlDataSource dataSource)
throws IllegalDataSourceException
- Description copied from interface:
IlPluggableAdapter
- Verify data source type, adapter stores and listens to data source.
unplugDataSource
public void unplugDataSource(IlDataSource dataSource)
- Description copied from interface:
IlPluggableAdapter
- Adapter cancels storing and stops listening to data source.
plugDataSourceEditor
public void plugDataSourceEditor(IlDataSourceEditor dataSourceEditor)
throws IllegalDataSourceEditorException
- Description copied from interface:
IlPluggableAdapter
- Verify data source editor type, adapter stores data source editor.
unplugDataSourceEditor
public void unplugDataSourceEditor(IlDataSourceEditor dataSourceEditor)
- Description copied from interface:
IlPluggableAdapter
- Adapter cancels storing of data source editor.