The controller

The IlpTreeController class represents the controller module of the MVC architecture. It can be attached to a tree view by using the following code.

How to attach a controller to the tree view

IlpTreeView treeView = new IlpTreeView();
IlpTreeController treeController = new IlpTreeController();
treeView.setController(treeController);
Note that a controller is automatically attached to a tree view when a tree component is instantiated:
IlpTree treeComponent = new IlpTree();
IlpTreeController controller = treeComponent.getController();
// treeComponent.getView().getController() == controller
The tree controller is responsible for storing and setting the interactors to the view and to the objects.
When a controller is attached to a tree view, it listens to the keyboard, mouse, and focus events that occur in the tree and transfers them to the view interactor set to the controller.
For more details, see Interacting with the tree view.
There can be one and only one controller per view.