Graph Controllers

Graph controllers manage the views that are active for a given Graph. They do this by notifying these views about model and view changes. Different controllers are available in the Tensegrity Graph API that vary the way in which model and view exchange messages. In the following sections we discuss the different GraphController implementations that are accessible through the GraphControllerFactory.

ClientServerGraphController

This controller propagates user commands directly to a view.

The class ClientServerGraphController manages a typical (simple) client and server scenario, where there is one privileged master view (server) and one to many client views. The client views are read-only and simply reflect the current state of the master view. These client views are often distributed on different computers and need to synchronize their output with the output of the master view.

ModelBasedGraphController

This controller propagates user commands directly to a model.

Class ModelBasedGraphController manages a typical model-based scenario in which changes to the model are automatically reflected by specific predefined visual operations. This controller is also responsible for automatically inserting visual elements into a view whenever model elements are created and inserted into a Graph.