![]() |
![]() don't have to define or see menu items, buttons, etc. |
![]() making all types of configurable processing very easy |
![]() |
![]() xt loads JDBC drivers using the DatabaseDriver element |
[Demo: Display Style view - apply
stylesheet to sample database schema]
Narrative
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
are: