Difference between revisions of "Documentation/DevGuide/Forms/Models and Views for Form Controls"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (FINAL VERSION FOR L10N)
m (just little text correction)
Line 8: Line 8:
 
  {{DISPLAYTITLE:Models and Views for Form Controls}}
 
  {{DISPLAYTITLE:Models and Views for Form Controls}}
 
<!--<idltopic>com.sun.star.awt.UnoControl;com.sun.star.awt.UnoControlModel</idltopic>-->
 
<!--<idltopic>com.sun.star.awt.UnoControl;com.sun.star.awt.UnoControlModel</idltopic>-->
Form controls follow the model-view paradigm. This means if you have a form document that contains a control, there is a model describing the control's behavior and appearance, and a view that is the component the user is sees.
+
Form controls follow the model-view paradigm. This means if you have a form document that contains a control, there is a model describing the control's behavior and appearance, and a view that is the component the user sees.
  
{{Documentation/Note|Note that the term "control" is ambiguous here. Usually, from the user's perspective, it is what is seen in the document. As the model-view paradigm may not be obvious to the user, the user tends to consider the visible representation and the underlying model of the control as one thing, that is, a user who refers to the control usually means the combination of the view and the model.As opposed to the user's perspective, when the UNO API for the form layer refers to a control, this means the view of a form element, if not stated otherwise.}}
+
{{Documentation/Note|Note that the term "control" is ambiguous here. Usually, from the user's perspective, it is what is seen in the document. As the model-view paradigm may not be obvious to the user, the user tends to consider the visible representation and the underlying model of the control as one thing, that is, a user who refers to the control usually means the combination of the view and the model. As opposed to the user's perspective, when the UNO API for the form layer refers to a control, this means the view of a form element, if not stated otherwise.}}
  
 
The base for the controls and models used in the form layer are found in the module <idlmodule>com.sun.star.awt</idlmodule>, the <idl>com.sun.star.awt.UnoControl</idl> and <idl>com.sun.star.awt.UnoControlModel</idl> services. As discussed later, the model hierarchy in <idlmodule>com.sun.star.form.component</idlmodule> extends the hierarchy of <idlmodule>com.sun.star.awt</idlmodule>, whereas the control hierarchy in <idlmodule>com.sun.star.form.control</idlmodule> is small.
 
The base for the controls and models used in the form layer are found in the module <idlmodule>com.sun.star.awt</idlmodule>, the <idl>com.sun.star.awt.UnoControl</idl> and <idl>com.sun.star.awt.UnoControlModel</idl> services. As discussed later, the model hierarchy in <idlmodule>com.sun.star.form.component</idlmodule> extends the hierarchy of <idlmodule>com.sun.star.awt</idlmodule>, whereas the control hierarchy in <idlmodule>com.sun.star.form.control</idlmodule> is small.

Revision as of 09:10, 10 March 2010



Form controls follow the model-view paradigm. This means if you have a form document that contains a control, there is a model describing the control's behavior and appearance, and a view that is the component the user sees.

Template:Documentation/Note

The base for the controls and models used in the form layer are found in the module com.sun.star.awt, the com.sun.star.awt.UnoControl and com.sun.star.awt.UnoControlModel services. As discussed later, the model hierarchy in com.sun.star.form.component extends the hierarchy of com.sun.star.awt, whereas the control hierarchy in com.sun.star.form.control is small.

Everything from the model-view interaction for form controls is true for other UNO controls and UNO control models, as well. Another example for components that use the model-view paradigm are the controls and control models in OpenOffice.org Basic dialogs (Dialog Controls).

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