|
|||||||||
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 Map |
_ds2model
|
protected Map |
_model2ds
|
protected 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 Object |
createLink(String tag,
Object parent,
Object from,
Object to,
Map properties)
Method called to create a link in the sdm model. |
protected abstract Object |
createNode(String tag,
Object parent,
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(EventObject event)
|
protected void |
dispatchBatchedEvents(ArrayList batchedEvents)
|
Object |
getDSLink(Object link)
|
Object |
getDSNode(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. |
Object |
getSDMLink(Object dsLink)
|
Object |
getSDMNode(Object dsNode)
|
protected 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(ArrayList events)
|
protected void |
preDispatchBatchedEvents(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(Object link,
Map properties)
Method called to update a link in the sdm model. |
protected abstract void |
updateNode(Object node,
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 LinkedList _refEvents
protected Map _model2ds
protected Map _ds2model
protected IlSDMDataSource _sds
protected IlSDMDataSourceEditor _sdse
protected ilog.views.sdm.IlvSDMModel _sdm
Constructor Detail |
public IlAbstractSDMModelAdapter()
Method Detail |
protected Object getSynchronizationObject()
IlAbstractAdapter
getSynchronizationObject
in class IlAbstractAdapter
ilog.ds.adapter.IlAbstractAdapter
public final Object getDSNode(Object node)
public final Object getDSLink(Object link)
public final Object getSDMNode(Object dsNode)
public final Object getSDMLink(Object dsLink)
protected abstract Object createNode(String tag, Object parent, 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(Object node, Map properties)
node
- the node to updateproperties
- The updated properties from the data sourceprotected abstract Object createLink(String tag, Object parent, Object from, Object to, 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(Object link, 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.DataSourceListener
e
- The eventDataSourceEvent
public void nodeChange(SDMNodeEvent e)
SDMDataSource
.nodeChange
in interface SDMDSListener
e
- The eventSDMNodeEvent
,
IlSDMDataSource
public void linkChange(SDMLinkEvent e)
SDMDataSource
.linkChange
in interface SDMDSListener
e
- The eventSDMLinkEvent
,
IlSDMDataSource
protected void internalDataSourceChange(DataSourceEvent e)
internalDataSourceChange
in class IlAbstractAdapter
protected void internalNodeAdded(SDMNodeEvent e)
e
- The node event.SDMNodeEvent
protected void internalNodeUpdated(SDMNodeEvent e)
e
- The node event.SDMNodeEvent
protected void internalNodeRemoved(SDMNodeEvent e)
e
- The node event.SDMNodeEvent
protected void internalLinkAdded(SDMLinkEvent e)
e
- The link event.LinkEvent
protected void internalLinkUpdated(SDMLinkEvent e)
e
- The link event.LinkEvent
protected void internalLinkRemoved(SDMLinkEvent e)
e
- The link event.LinkEvent
protected void preDispatchBatchedEvents(ArrayList events)
IlAbstractAdapter
preDispatchBatchedEvents
in class IlAbstractAdapter
protected void postDispatchBatchedEvents(ArrayList events)
postDispatchBatchedEvents
in class IlAbstractAdapter
protected void dispatchBatchedEvent(EventObject event)
dispatchBatchedEvent
in class IlAbstractAdapter
protected void dispatchBatchedEvents(ArrayList batchedEvents)
dispatchBatchedEvents
in class IlAbstractAdapter
protected boolean checkAdjustment(ilog.views.sdm.event.SDMModelEvent event)
public void adjustmentFinished(ilog.views.sdm.event.SDMModelEvent event)
adjustmentFinished
in interface ilog.views.sdm.event.SDMModelListener
public void dataChanged(ilog.views.sdm.event.SDMModelEvent event)
dataChanged
in interface ilog.views.sdm.event.SDMModelListener
public void linkDestinationChanged(ilog.views.sdm.event.SDMModelEvent event)
linkDestinationChanged
in interface ilog.views.sdm.event.SDMModelListener
public void linkSourceChanged(ilog.views.sdm.event.SDMModelEvent event)
linkSourceChanged
in interface ilog.views.sdm.event.SDMModelListener
public void objectAdded(ilog.views.sdm.event.SDMModelEvent event)
objectAdded
in interface ilog.views.sdm.event.SDMModelListener
public void objectRemoved(ilog.views.sdm.event.SDMModelEvent event)
objectRemoved
in interface ilog.views.sdm.event.SDMModelListener
public void propertyChanged(ilog.views.sdm.event.SDMPropertyChangeEvent event)
propertyChanged
in interface ilog.views.sdm.event.SDMPropertyChangeListener
protected void processRefEvents()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |