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.
There can be one and only one controller
per view.