A new Swixml version has been released and is available for download at the
Swixml Web site at http://www.swixml.org
0.83 includes bug fixes and minor improvements, i.e.:
Documentation:
JavaDoc now links directly into J2SDK's and JDOM's javadoc.
TagDoc now links directly into the declaring class' javadoc.
Localization:
Not all attributes that are used in Swixml XML-Descriptor need or should be
made available for localization. I.e. there is really no need to translate
an "id" or "use" attribute, in fact localizing those could result in some
unwanted behavior.
Moreover, sometimes you don't want to have text attributes localized, think
about pre-filling a user-id filled with "administrator" etc.
The new version (0.83) of the SwingEngine will only try to localize the
following attributes (all converted into lowercase):
static {
LOCALIZED_ATTRIBUTES.add( "label" );
LOCALIZED_ATTRIBUTES.add( "mnemonic" );
LOCALIZED_ATTRIBUTES.add( "name" );
LOCALIZED_ATTRIBUTES.add( "text" );
LOCALIZED_ATTRIBUTES.add( "title" );
LOCALIZED_ATTRIBUTES.add( "titleat" );
LOCALIZED_ATTRIBUTES.add( "titles" );
LOCALIZED_ATTRIBUTES.add( "tooltiptext" );
}
(Please let me know if you think that we should extended this vector -
However, the vector is public so your code can modify it.)
Moreover, if the "text" attribute is used, like here:
<label id="lbl_0" text="Label0"/>
Label0 would be used as a key to find an entry in the provided Resource
bundle (based on the default or set locale).
If the alternative syntax is used:
<label id="lbl_0">
Label0
</label>
then localization will _not_ be attempted.
(Localization has been pushed out of the parser and into the StringConverter
class.)
Dialog:
Dialogs are now being "adopted" by an already rendered frame.
This is, when a frame is rendered, a reference is captured and stored in a
static field in the SwingEngine. This frame is then used as a parent, every
time a new dialog is instantiated. There are setter and getter methods
available to modify this behavior.
Bring your own Constants:
When writing XML descriptors the use of constants is often helpful. The
PrimitiveConverter in the converters package for instance, enables the use
of all Swing Constants, Gridbag constants, etc.
You may now add your own classes or interfaces, which provide constants.
public static void addConstantProvider(final Class type)
This method in PrimitiveConverter takes a class and makes its public fields
available to the parser.
Wolf.
--
Wolf Paulus
C a r l s b a d C u b e s
mailto:[EMAIL PROTECTED]
CONFIDENTIALITY NOTICE:
This message is intended only for the use of the individual or entity to
which it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.
If you are not the intended recipient, please contact the sender by reply
email and destroy all copies of the original message.