|Package xu uses an XML file to define menus, toolbar, etc.|
Developer merely defines and 'registers' swing actions;
don't have to define or see menu items, buttons, etc.
XML attributes are accessible to actions when invoked,
making all types of configurable processing very easy
|All the work is done by the xu element classes|
Any start-up processing can be invoked if elements registered;
xt loads JDBC drivers using the DatabaseDriver element
[Demo: Edit xt_XmlTestbed.xml -
see attributes specifying XML parser classes and look-and-feel classes]
There are several applications publicly available which use an XML file to define their menus, toolbars and so on - and in that respect, the xu package is nothing new. The main characteristic of xu, however, is its ease of use: in most situations, a developer does not have to deal with the user interface components themselves (menu items, buttons, button groups, etc., and all the fiddly coding associated with them). A developer has to do no more than code the awt actions which he or she needs, and then register them with a 'FrameConfigManager'. Actions supported by standard swing components (such as text areas) can be registered en masse (cut, copy, paste, select all). The remaining work goes into writing the XML document: to associate menu items and toolbar buttons with the actions.
All XML attributes defined in the configuration file for a menu item
or button are made available to the swing action at the time it is invoked.
With this, the configuration goes much further than merely controlling
the appearance of the application. Examples of this used in the xt application