Introduction

In the MVC architecture, the controller is responsible for handling the user input and modifying the model accordingly. The controller makes sure that any changes in the model or in the graphic view configuration are reflected appropriately to the user. The controller is defined by the interface IlpGraphicController. This interface provides methods to:
  • Retrieve the application context
  • Retrieve the graphic view being controlled
  • Retrieve the view interactor
  • Retrieve interactors for specific representation objects and attributes
The controller has various roles:
  • It manages view interactors, which operate on the view as a whole, and object interactors. For more information, see Interacting with the graphic components.
  • It creates the graphic view configuration and sets it to the graphic view. The graphic view configuration is created based on the application context.
  • It makes it possible for external components to register for events triggered when the user interacts with the graphic components or when the model is modified.
  • The controller also provides filtering and sorting capabilities. It can insert a filter between the model and the view to display only representation objects that satisfy specified conditions and can set a sorter that defines the order in which representation objects are to appear within the view.
    Note
    Sorting is available only for the table and the tree component.
JViews TGO supplies default implementations of controllers for each one of the predefined graphic components. These are:
For more information, see the information on each graphic component.