Navigation:  Programming Cookbook > Creating GUI Applications > Creating MVP Components >


Previous pageReturn to chapter overviewNext page

The presenter is the "hub" of the component. All components will have their own presenter class that brings together a model with an appropriate view to display it. When we talk about a component, we are really talking about a particular presenter.

Here are some examples in the image:


Presenter class


Text editing


Depending what sort of view is used, a TextPresenter can be used to edit single line or multiline text.

Number editing


Depending on the view used, a NumberPresenter can be used to edit/display numbers in a variety of forms e.g. as text, as a slider, as a spin button, as a progress bar etc.

Date editing


Depending on the view used, a DataPresenter can be used to edit/display dates as text or as a calendar picker etc.

List display


Depending on the view used, a ListPresenter can display sequenceable collections of objects in a single column listbox, in a multicolumn list view, as a series of tabs etc