The toolkit provides a sample XML file, desktop.xml, which describes a desktop layout, and a Document Type Definition file, desktop.dtd, for all XML documents that describe desktop layouts. The DTD file describes the scope of the elements defined in the XML file. It describes the relationships between elements, the attributes for each element, and the default values for the attributes.
Since the DTD file is generic for any XML desktop document, it contains descriptions for all the elements that might be handled by a desktop. In contrast, the XML document contains only the definitions for the elements that are implemented in the sample Desktop.
Normally, the initialization of the Desktop is done once the toolkit has already been initialized, and the Desktop obtains some configuration settings from the toolkit configuration file. If the toolkit has not been initialized, then the Desktop tries to find the settings information in its set of resources, following the standard Java™ mechanism.
All the visual components of the Desktop are defined in the Desktop definition file, but there are three classes of the Desktop package that are not defined in this file because they are only created after the Desktop has been initialized. These classes are defined in the toolkit configuration file (dse.ini).
The following is the list of definitions in the toolkit configuration file (dse.ini) used by the Desktop:
<kColl id="files"> ..... (other definitions) <field id="desktop" value="desktop.xml" /> </kColl> <kColl id="paths"> ..... (other definitions) <field id="desktop" value="desktopFilePath" /> <field id="bookmarkArea" value="bookmarkAreaFilePath" /> </kColl> <kColl id="desktop"> ..... (other definitions) <field id="TaskButton" value="com.ibm.dse.desktop.DSETaskButton" /> <field id="ExternalTaskButton" value="com.ibm.dse.desktop.ExternalTaskButton" /> <field id="NavigationController" value="com.ibm.dse.desktop.DSENavigationController" /> </kColl>
where desktopFilePath is one of the following:
The kcoll desktop defines the name of the class that you want to have instantiated using the specified tag.
The bookmarkAreaFilePath is the path where the BookmarkArea file is located.
<field id="showProgressBar" value="yes" />You can directly change this setting in the Desktop by using the following setter:
setShowProgressBar(boolean)
In addition to the settings from the dse.ini file, the Desktop needs the set of resource files specified in the XML file, such as the icons to be used for each component. These files must be located where the classes can find them, either in a local disk path included in the classpath or inside a JAR file.
See DTD file layout for the layout of information found in a DTD, and Desktop DTD and XML definitions for the definition of each component.