Java Data Sources > Java Data Source Adapters > Using IlsGraphDS2IlvGrapherAdapter
 
Using IlsGraphDS2IlvGrapherAdapter
An instance of IlsGraphDS2IlvGrapherAdapter is connected both to an IlsGraphDataSource object and to an IlvGrapher object through the methods setGraphDataSource/setGraphDataSourceEditor and setModel). Then, the adapter subscribes to all the events sent from the data source.
Unlike the adapters IlsTreeDS2JTreeAdapter and IlsTableDS2JTableAdapter, IlsGraphDS2IlvGrapherAdapter has no graph model to listen for. Therefore, the updates that occur on the IlvGrapher object must be explicitly notified to the adapter or directly to the data source (see the interface IlGraphDataSourceEditor). In fact, the graph model and the graphic representation are combined in the single class IlvGrapher.
The methods nodeChange and linkChange are called on a connected instance of IlsGraphDS2IlvGrapherAdapter to create, update, or delete nodes or links in the graph. Updates on the graph properties are notified through a call to the method graphChange.
To map representation objects to graphical objects in the IlvGrapher gadget, use the methods getDSNode, getDSLink, and getIlvGraphic.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.