|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--ilog.ds.adapter.IlAbstractAdapter
|
+--ilog.ds.adapter.IlAbstractSDMModelAdapter
This class adapts the events from the IlSDMDataSource to a JViews IlvSDMModel. It does not implement how elements are created or updated, that is, how the properties from the data source are mapped to the IlvMutableSDMLink, and IlvMutableSDMNode themselves. This class supports the mapping between the data source objects and the model objects. It stores the data source reference.
IlSDMDataSource,
IlSDMDataSourceEditor,
IlvMutableSDMNode,
IlvMutableSDMLink| Inner Class Summary | |
protected class |
IlAbstractSDMModelAdapter.SDMRefEvent
|
| Field Summary | |
protected boolean |
_alreadyAdjusting
|
protected java.util.Map |
_ds2model
|
protected java.util.Map |
_model2ds
|
protected java.util.LinkedList |
_refEvents
|
protected ilog.views.sdm.IlvSDMModel |
_sdm
|
protected IlSDMDataSource |
_sds
|
protected IlSDMDataSourceEditor |
_sdse
|
| Fields inherited from class ilog.ds.adapter.IlAbstractAdapter |
_dispatchListeners, _events, _frozenEvents, _inBatchedEvents, _inTransaction, _isFrozen, _syncStrategy |
| Constructor Summary | |
IlAbstractSDMModelAdapter()
|
|
| Method Summary | |
void |
adjustmentFinished(ilog.views.sdm.event.SDMModelEvent event)
|
protected boolean |
checkAdjustment(ilog.views.sdm.event.SDMModelEvent event)
|
protected abstract java.lang.Object |
createLink(java.lang.String tag,
java.lang.Object parent,
java.lang.Object from,
java.lang.Object to,
java.util.Map properties)
Method called to create a link in the sdm model. |
protected abstract java.lang.Object |
createNode(java.lang.String tag,
java.lang.Object parent,
java.util.Map properties)
Method called to create a node in the sdm model. |
void |
dataChanged(ilog.views.sdm.event.SDMModelEvent event)
|
void |
dataSourceChange(DataSourceEvent e)
DataSourceListener implementation |
protected void |
dispatchBatchedEvent(java.util.EventObject event)
|
protected void |
dispatchBatchedEvents(java.util.ArrayList batchedEvents)
|
java.lang.Object |
getDSLink(java.lang.Object link)
|
java.lang.Object |
getDSNode(java.lang.Object node)
|
ilog.views.sdm.IlvSDMModel |
getModel()
Gets the IlvSDMModel in use by this adapter. |
IlSDMDataSource |
getSDMDataSource()
Gets the IlSDMDataSource in use by this adapter. |
IlSDMDataSourceEditor |
getSDMDataSourceEditor()
Gets the IlSDMDataSourceEditor in use by this adapter. |
java.lang.Object |
getSDMLink(java.lang.Object dsLink)
|
java.lang.Object |
getSDMNode(java.lang.Object dsNode)
|
protected java.lang.Object |
getSynchronizationObject()
|
protected void |
internalDataSourceChange(DataSourceEvent e)
Internal code called in the Swing event thread |
protected void |
internalLinkAdded(SDMLinkEvent e)
Internal method called when dispatching events. |
protected void |
internalLinkRemoved(SDMLinkEvent e)
Internal method called when dispatching events. |
protected void |
internalLinkUpdated(SDMLinkEvent e)
Internal method called when dispatching events. |
protected void |
internalNodeAdded(SDMNodeEvent e)
Internal method called when dispatching events. |
protected void |
internalNodeRemoved(SDMNodeEvent e)
Internal method called when dispatching events. |
protected void |
internalNodeUpdated(SDMNodeEvent e)
Internal method called when dispatching events. |
void |
linkChange(SDMLinkEvent e)
This method is invoked when a link has been added, removed, or updated in the SDMDataSource. |
void |
linkDestinationChanged(ilog.views.sdm.event.SDMModelEvent event)
|
void |
linkSourceChanged(ilog.views.sdm.event.SDMModelEvent event)
|
void |
nodeChange(SDMNodeEvent e)
This method is invoked when a node has been added, removed, or updated in the SDMDataSource. |
void |
objectAdded(ilog.views.sdm.event.SDMModelEvent event)
|
void |
objectRemoved(ilog.views.sdm.event.SDMModelEvent event)
|
protected void |
postDispatchBatchedEvents(java.util.ArrayList events)
|
protected void |
preDispatchBatchedEvents(java.util.ArrayList events)
|
protected void |
processRefEvents()
|
void |
propertyChanged(ilog.views.sdm.event.SDMPropertyChangeEvent event)
|
void |
setModel(ilog.views.sdm.IlvSDMModel sdm)
Sets the IlvSDMModel to use |
void |
setSDMDataSource(IlSDMDataSource sds)
Sets the IlSDMDataSource to use. |
void |
setSDMDataSourceEditor(IlSDMDataSourceEditor sdse)
Sets the IlSDMDataSourceEditor to use. |
protected abstract void |
updateLink(java.lang.Object link,
java.util.Map properties)
Method called to update a link in the sdm model. |
protected abstract void |
updateNode(java.lang.Object node,
java.util.Map properties)
Method called to update a node in the sdm model. |
| Methods inherited from class ilog.ds.adapter.IlAbstractAdapter |
addDispatchListener, addDSEvent, clearDSEvents, endBatch, firePostDispatchBatchedEventsEvent, firePreDispatchBatchedEventsEvent, GetColor, getSynchronizationStrategy, isFrozen, isInBatchedEvents, isInTransaction, removeDispatchListener, setFrozen, setSynchronizationStrategy, startBatch |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean _alreadyAdjusting
protected java.util.LinkedList _refEvents
protected java.util.Map _model2ds
protected java.util.Map _ds2model
protected IlSDMDataSource _sds
protected IlSDMDataSourceEditor _sdse
protected ilog.views.sdm.IlvSDMModel _sdm
| Constructor Detail |
public IlAbstractSDMModelAdapter()
| Method Detail |
protected java.lang.Object getSynchronizationObject()
IlAbstractAdaptergetSynchronizationObject in class IlAbstractAdapterilog.ds.adapter.IlAbstractAdapterpublic final java.lang.Object getDSNode(java.lang.Object node)
public final java.lang.Object getDSLink(java.lang.Object link)
public final java.lang.Object getSDMNode(java.lang.Object dsNode)
public final java.lang.Object getSDMLink(java.lang.Object dsLink)
protected abstract java.lang.Object createNode(java.lang.String tag,
java.lang.Object parent,
java.util.Map properties)
tag - The symbolic type of the element.parent - The parent of the node, may be null.properties - The properties of the node from the data source.
protected abstract void updateNode(java.lang.Object node,
java.util.Map properties)
node - the node to updateproperties - The updated properties from the data source
protected abstract java.lang.Object createLink(java.lang.String tag,
java.lang.Object parent,
java.lang.Object from,
java.lang.Object to,
java.util.Map properties)
tag - The symbolic type of the element.parent - The parent of the link, may be null.from - The origin of the linkto - The target of the linkproperties - The properties of the link from the data source.
protected abstract void updateLink(java.lang.Object link,
java.util.Map properties)
link - the link to updateproperties - The updated properties from the data sourcepublic void setModel(ilog.views.sdm.IlvSDMModel sdm)
public ilog.views.sdm.IlvSDMModel getModel()
public IlSDMDataSource getSDMDataSource()
public IlSDMDataSourceEditor getSDMDataSourceEditor()
public void setSDMDataSource(IlSDMDataSource sds)
public void setSDMDataSourceEditor(IlSDMDataSourceEditor sdse)
public void dataSourceChange(DataSourceEvent e)
ilog.ds.DataSourceListenere - The eventDataSourceEventpublic void nodeChange(SDMNodeEvent e)
SDMDataSource.nodeChange in interface SDMDSListenere - The eventSDMNodeEvent,
IlSDMDataSourcepublic void linkChange(SDMLinkEvent e)
SDMDataSource.linkChange in interface SDMDSListenere - The eventSDMLinkEvent,
IlSDMDataSourceprotected void internalDataSourceChange(DataSourceEvent e)
internalDataSourceChange in class IlAbstractAdapterprotected void internalNodeAdded(SDMNodeEvent e)
e - The node event.SDMNodeEventprotected void internalNodeUpdated(SDMNodeEvent e)
e - The node event.SDMNodeEventprotected void internalNodeRemoved(SDMNodeEvent e)
e - The node event.SDMNodeEventprotected void internalLinkAdded(SDMLinkEvent e)
e - The link event.LinkEventprotected void internalLinkUpdated(SDMLinkEvent e)
e - The link event.LinkEventprotected void internalLinkRemoved(SDMLinkEvent e)
e - The link event.LinkEventprotected void preDispatchBatchedEvents(java.util.ArrayList events)
IlAbstractAdapterpreDispatchBatchedEvents in class IlAbstractAdapterprotected void postDispatchBatchedEvents(java.util.ArrayList events)
postDispatchBatchedEvents in class IlAbstractAdapterprotected void dispatchBatchedEvent(java.util.EventObject event)
dispatchBatchedEvent in class IlAbstractAdapterprotected void dispatchBatchedEvents(java.util.ArrayList batchedEvents)
dispatchBatchedEvents in class IlAbstractAdapterprotected boolean checkAdjustment(ilog.views.sdm.event.SDMModelEvent event)
public void adjustmentFinished(ilog.views.sdm.event.SDMModelEvent event)
adjustmentFinished in interface ilog.views.sdm.event.SDMModelListenerpublic void dataChanged(ilog.views.sdm.event.SDMModelEvent event)
dataChanged in interface ilog.views.sdm.event.SDMModelListenerpublic void linkDestinationChanged(ilog.views.sdm.event.SDMModelEvent event)
linkDestinationChanged in interface ilog.views.sdm.event.SDMModelListenerpublic void linkSourceChanged(ilog.views.sdm.event.SDMModelEvent event)
linkSourceChanged in interface ilog.views.sdm.event.SDMModelListenerpublic void objectAdded(ilog.views.sdm.event.SDMModelEvent event)
objectAdded in interface ilog.views.sdm.event.SDMModelListenerpublic void objectRemoved(ilog.views.sdm.event.SDMModelEvent event)
objectRemoved in interface ilog.views.sdm.event.SDMModelListenerpublic void propertyChanged(ilog.views.sdm.event.SDMPropertyChangeEvent event)
propertyChanged in interface ilog.views.sdm.event.SDMPropertyChangeListenerprotected void processRefEvents()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||