Creating the GUI of the Options Page

From Apache OpenOffice Wiki
Jump to: navigation, search



The GUI of an options page needs to be created by the dialog editor of OpenOffice.org. Exporting the dialog will result in saving a .xdl file and perhaps multiple .properties files. The xdl file contains the description of the dialog in XML whereas the properties files contain localized strings. For example, if the dialog is named Dialog1 and it contains strings which are localized for German and US – English, then you will obtain these files:

  • Dialog1.xdl
  • Dialog1_de_DE.properties
  • Dialog1_en-US.properties

Please make sure that you have set the property “With title bar” to “no” for the whole dialog. Note that the maximum size that the dialog may have in the options page is a width of 260 and a height of 185.

The exported files can be anywhere in the extensions, except in META-INF. They must also be in the same directory.

The options dialog will use the service com.sun.star.awt.ContainerWindowProvider to create the options pages. The service constructors takes an URL to the xdl file and an an event handler component. The latter will be used to process events which have been defined in the dialog editor for particular controls. It is also used for saving and loading the data of the controls which are on the options pages.

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