Dialogs and Controls

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 12:53, 15 February 2008 by Ccornell (Talk | contribs)

Jump to: navigation, search



The com.sun.star.awt module provides a set of services specifying UNO components that can be used within dialogs. The controls as well as the dialog itself, follow the Model-View-Controller (MVC) paradigm, which separates the component into three logical units, the model, view, and controller. The model represents the data and the low-level behavior of the component and has no specific knowledge of its controllers or its views. In practice this separation is not always strictly followed. The UNO control models can contain information about the visual display of the controls.

The view manages the visual display of the state represented by the model. The controller manages the user interaction with the model. Toolkit controls combine the view and the controller into one logical unit that forms the user interface for the component. For example, the text field model is implemented by the com.sun.star.awt.UnoControlEditModel service that extends the com.sun.star.awt.UnoControlModel service. All aspects of the model are described as a set of properties which are accessible through the com.sun.star.beans.XPropertySet interface. The view is responsible for the display of the text field and its content.

The controller handles the user input provided through the keyboard and mouse. If the user changes the text in a text field, the controller updates the corresponding model property. The controller also updates the view. For example, when the user selects some text in a text field and presses the delete key on the keyboard, the marked text in the text field is deleted.

A more detailed description of the MVC paradigm can be found in The Model-View Paradigm.

The base for all the Toolkit controls is the com.sun.star.awt.UnoControl service that exports the following interfaces:

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools