Desktop DTD and XML definitions

The desktop itself is defined in the DTD file of the Desktop component as follows:
Table 1. Desktop definition
DTD Tag Description
<!ELEMENTDesktop (BookmarkArea?, CustomizableArea*, ScenarioArea?, CustomizableArea*,  (WorkingArea | TaskArea | SplitArea | CustomizableArea | TaskInfo)*) > A Desktop can consist of zero or many CustomizableAreas (anywhere in the Desktop), zero or one ScenarioAreas, one WorkingArea, one TaskArea, and zero or many TaskInfo objects
<!ATTLIST Desktop
    title CDATA "desktop_title"
    width CDATA "800"
    height CDATA "600"
    lookAndFeel CDATA #IMPLIED
    finalizerClass CDATA #IMPLIED
    finalizerMethod CDATA #IMPLIED
    helpFileURL CDATA #IMPLIED
    initializerClass CDATA #IMPLIED
    initializerMethod CDATA #IMPLIED
    rebuilderClass CDATA #IMPLIED
    rebuilderMethod CDATA #IMPLIED
    multiTasking (true|false) "false"
    onInitialize CDATA #IMPLIED
    orientation CDATA "LEFT_TO_RIGHT"
    packages CDATA #IMPLIED>
Attribute list
Table 2. Desktop attributes
Attribute Description
title Title of the main window
width Width of the Desktop
height Height of the Desktop
bookmarkId Identifier for the customized file of bookmarks. This file contains the list of bookmarks defined by the user. For example, if the value is set to XXX, the file would be named BMAXXX.xml.
lookAndFeel Look and feel associated with the Desktop. This value can be any look and feel class supported by Java™ Swing. The default for the Desktop is the CrossPlatformLookAndFeel.
finalizerClass Along with the static finalizerMethod, specifies a process to be executed when the Desktop is closed, after the final dialog box confirmation
finalizerMethod See finalizerClass
helpFileURL Path and name of the help file to be used by the Desktop to show the help information for a specific identifier
initializerClass Along with the static initializerMethod, specifies a process to be executed right after the Desktop has been initialized. This is an opportunity to initialize the base toolkit (if it was not done before starting the Desktop) and to update the Desktop with the required information gathered from the application's context hierarchy.
initializerMethod See initializerClass
rebuilderClass Along with the static rebuilderMethod, specifies a process to be executed when the Desktop is rebuilt. Use this class if something must be done when the Desktop is rebuilt.
rebuilderMethod See rebuilderClass
multiTasking Whether to accept the execution of many operations at a time
onInitialize Java script to be executed when the Desktop has been initialized. It can contain many lines of Java code.
orientation Orientation of all the visual components in the Desktop
packages List of package names where the classes for the elements defined in the Desktop configuration files are located. A package name must end with a period, and multiple packages must be separated by commas.
The following is an example of a Desktop definition in an XML file:
<DesktopinitializerClass="com.ibm.bankproject.StartUpProcess" 
    initializerMethod="initialDesktopUpdate" 
    finalizerClass="com.ibm.bankproject.ShutDownProcess" 
    finalizerMethod="aboutToQuitDesktop"
    rebuilderClass="com.ibm.bankproject.OpenDesktop"
    rebuilderMethod="rebuild" 
    width="977" 
    height="630" 
    helpFileURL="file///c:/bankproject/onlineinfo/onlinehelp.hs"
    title="Bank Project Desktop" 
    <ScenarioArea >
        .......
        .......
    </ScenarioArea>
    <WorkingArea iconName="/bank.gif" defaultIcon="/logo.gif"/>
    <TaskArea width="400" ... taskHeight="25" maxNumberOfTasks="5" />
    <CustomizableArea width="45" height="82">
        ........
        ........
    </CustomizableArea>
</Desktop>