GraphController Creation

In this section, you will learn how to create and use a specific GraphController.

A GraphController instance is created by requesting a particular controller “type” from the factory, as the code below illustrates.

Example 4.1. GraphController Creation

// Create client-server graph controller        
GraphControllerFactory cFactory= 
    GraphControllerFactory.newInstance();
graphController= 
    cFactory.newClientServerGraphController(graphModel);

In the method above, you should note that a GraphController instance is always coupled to a model Graph. This is not true for graph views, however, as we will see next.