home
products
education
support
partners
company

introduction

get started

articles

manual

tutorials

reference docs

case studies

knowledge base

goodies

screenshots

demos

echoes

Carousel zone


SourceForge.net Logo

home

forums

downloads

bugs

mailing list
XUI Zone - articles

number of ratings 0
average rating 0.00

XUI CHANGE LOG

Although as point release v2.0.6 of XUI is largely a collection of fixes and tweaks some new features are included. The following article describes some of these new features.

V2.0.6

Changes the XImage component for better animation

The image component now supports animated gifs. Carousel further extends animation support to include Audio and Video clips, plus animation of Charts and extended image components like the XReflectImage component that renders an image and adds a graduated reflection.


Illustration 1: Carousel's ReflectedImage component

Alpha channel support

With the styles file styles can now be specified with an alpha channel value and/or as decimal RGB

Refinements in the XPanel

The XPanel now includes some minor enhancements to allow setting of double buffering, rounding of corners and translucency. More screenshots of this article can be found here along with a webstartable demo and source code for the application. When combined with the new alpha channel color support we can achieve some nice effects with XUI as seen below:


Illustration 2: double buffering, rounded corners, translucency

Added Docking window support and internal frames support

Flexdock support has been added in the incubator. The support relies on the new common application stub with very little code being specific to the docking support. Two forms of docking are supported, one with defined areas and the other with sliding windows. As Flexdock is only at version 0.4 and since some work needs to be done on this feature the code resides in the incubator for now.

Further support has been added for Swing's Internal Frames and this is somewhat more complete than the FlexDock application type. In both instances the application is controlled by the frames file with extra attributes being specified for each frame to dictate how it is constructed.

XUI original handling of frames is of course still in place and this allows you to segment the display are and change the content of frames independantly of one another. The new support is an alternative to the original frame handle intended to allow support for other application types.

The use of each of these application types is controlled by the startup application and thereafter startup follows the normal pattern. The following applications have identical source code and only differ in the application stub used for startup.


Illustration 3: Internal Frames: Start with incubator.net.xoetrope.swing.XDesktopApp


Illustration 4: Flexdock: Start with incubator.net.xoetrope.swing.XDockingApp


Illustration 5: Sliding Windows: Start with incubator.net.xoetrope.swing.XDockingApp

Updated the implementation of the XSvgCanvas for the latest TinyLine library

The latest version of TinyLine's SVG component is now supported meaning that SVG Tiny vector images can be displayed with a XUI application. SVG Tiny also supports animation of images.


Illustration 6: Tgirl.svg in the bottom left with video playing in the window background

Added net.xoetrope.swing.util.XGradientHeaderPanel

Added a new gradient panel for things like custom table headers and dialogs.


Illustration 7: Custom table headers using the new gradient panels

Changed the rendering of the Swing XDialog header and frame

The dialog title bar has been revised in the Swing version for a smaller header and border with 3D effects, including a gradient. The decorations are also drawn dynamically and are therefore consistent with the selected styles. The background area of the dialog no longer flashes when the dialog is first displayed.


Illustration 8: Enhanced appearance for dialog decorations

Added MessageBox options

The message box methods have been enhanced to include speciifcation of OK/Cancel and Yes/No buttons.


Illustration 9: New YES/NO dialog options

Added support for negative guide constraints

The guide layout (reference) has been enhanced to allow the specification of negative guide constraints. Negative constraints are useful if for instance you want to specify coordinates left of say the center line or the right hand side of a window. A logon dialog for instance often uses this type of layout with the edit/input fields' left edge bound to the centre line and the prompts for those field left of the centre line -but with a small gap. Previously specification of this type of constraint was difficult with the GuideLayout. Kalideoscope, the NetBeans plug-in for XUI also supports specification of negative constraints.


Illustration 10: Negative guide constraints

NetBeans 5.0 support

Kalideoscope (and Carousel) the NetBeans plug-in for creation and editing of XUI applications now supports NetBeans 5.0. We expect the full release of XUI 2.0.6 and its tools to coincide with the full release of NetBeans 5.0.

Added an XTranslator interface and implemented in with XDefaultTranslator (store in the project as the "Translator" object )

This change makes the translator more widely available and simplifies the translation of certain resources within a project. Centralizing this facility provides added support for consistent localization of an application and easy switching of languages. The resource bundles used for translations can be stored in various encodings (not just the default ASCII) and additional properties can be associated with a language to say for instance specify the font family and size to use for a particular language if different than the normal application font styles.


Illustration 11: Carousel's translation editor

Carousel extends the translation support to include localized data bindings (both for localization of text and numeric quantities (ft,inch,lbs etc...). Carousel also includes an editor for these translations that allows you scan an application for localizable texts, spell check, and employ machine translation (the quality of results varies). The editor also allows the translation to be previewed i.e. any substitutions of substrings will be made and an idication of the original text length will be provided. The editor also runs standalone and can export/import to databases and excel sheets and can includes translator's hints (explaining the contextual use of a given string).

Added an 'editable' attribute to Swing comboboxes

Now combo boxes can accept user input values as well as the predefined values. The feature can be switched on with the editable=”true” xml attribute. The attribute/feature only aplies to the Swing version of the component.

Added a 'search' attribute to the Swing comboboxes

The combobox also searches its list as the user types a value – useful for very long lists. As the user types a value the search is refined rather than just searching on the first letter of the item. The feature can be switched on with the 'search=”true” xml attribute. The attribute/feature only aplies to the Swing version of the component.

Changed the setup of the bindings for XTable types to be more flexible

Generation of page declarations using screen scraping

One of the upcoming features added to Carousel during the development of the SugarCRM Rich Client application is the ability to specify a URL in order to 'scrape' its contents. For example the contact form shown below was used as the basis for it's rich client counterpart.


Illustration 12: The SugarCRM contact form

The scraping wizard can now be pointed at the url in order to retrieve it's form information as shown below.


Illustration 13: The Screen Scraping wizard

And the preview page allows you to preview the form and to generate it into a XUI page using various options as shown below.


Illustration 14: The Screen Scraping preview and generate page

Added ability to specify an attribute for storage in the state binding

Now consistent with the XTextBinding so that checkboxes can be bound easily to a specified attribute of the the Xmodel. This came up as a requirement during the development of the SugarCRM Rich Client application. Now checkboxes can be bound easily to data segments as shown in the Xmodel data below.

do_not_call=”on” do_not_email=”off”>

This data can be bound using the binding declarations shown below.

 
  ...
  

The resulting page can be seen below


Illustration 15: The Rich SugarCRM contacts page

Added further support for library methods as event handlers

Extended the use of evaluated attributes and library functions in the XML to cover the specification of event handlers. Now an event can be specified as a library function and in this way it is possible to build and employ reusable event handlers, i.e. event handlers that do not need to be in a subclasss of XPage. The syntax for the evaluated attribute is

method=”${myClass.myMethod()}”

as with other evaluated attributes the specification can also include references to specific class instances or static classes, see the evaluated attributes documentation for more details.

Removed some redundant code in the event handler

Some legacy code predating the NetBeans plugin has been removed, streamlining the editor's codebase

Widened the XTarget and frameset setup calls for the extra parameters for other application types (XInternalFrames, XDockingFrames).

A consequence of the support for internal frames is that extra parameters are needed to control the various elements of the internal frames (width, height, location, decorations etc...). The constructors for the targets areas (the containers for the frames) had therefore to be widened to accomodate the extra information.

Widened the XPageLoader interface to take a classloader parameter

An internal change to facilitate loading of page classes from Jars specified on the class path.

Added html rendering to the Swing version of XLabel

The label component can now employ Swing's HTML rendering in addition to the existing rendering.

Translated the message box title and text automatically

Internal change to translate the message box titles.

Fixed listbinding to enable bind to model attributes

As with the XstateBinding, the XlistBinding has been updated to as to be consistent with the Xtextbinding to enable model attributes to be specified in the binding declaration.

Overrode the setRenderer on the combo to preserve the style settings when a new renderer is set

The combobox style setting is now preserved when a custom renderer is set.

Changed access to the loadUI method in the XApplet to allow subclassing.

This allows a custom applet to be created so that custom applet code can be used.

Fixed evaluated paths so that the evaluation text ( "${callback}" ) does not create a node in the model

If an evaluation of an attribute fails it no longer adds a value to the model. In future versions this error handling will be customizable to allow recording of errors and other behaviors. This type of error normally occurs when one bound component depends on the selection of another and the other component does not have a valid selection (e.g. a combobox or list box with an undefined state).

Add a new queue logger

As an optional feature for later JDKs the debug logger can be set to run in a background thread with blocking, this gives better debug performance. Normally an application should be developped using the debug version of the XUI libraries and then deployed with the non-debug versions. The debugging calls have been compiled out in the non-debug version resulting in smaller Jars and better performance.

Extended the event handling for custom event types with the XEventAdapter interface

Unknown event types can now be declared using this mechanism

Added support for includes within Kalideoscope

The NetBeans plugin can now load includes and save the owner page without outputing the contents of the include to the page.

Fixed a bug in the event handler dealing with library functions.

Moved code from the set method of the XTextBinding to enable subclasses to manipulated data before it is set and retrieved from the model

This is in the case where the text displayed is not actually what is in the model but is looked up based on the value in the model.

Added on and off values to the XStateBinding to allow subclasses to set custom on and off values

In some cases the checkboxes need to output values other than those in the XstateBinding so two protected variables 'on' and 'off' now exist with respective values of '1' and '0'. A subclassed statebinding can now override these values in the constructor.

Model Visualizer integrated with NetBeans

The Visualizer has been fully integrated into the NetBeans plugin for Carousel enabling easy visualization of the model as a project is running.


Illustration 16: The model represented within the visualizer in NetBeans

V2.0.5 changes and fixes:

Added the ability to load a resource from a URL within the XProject.getInputStream method.

The showPage method can now accept a URL which means that a page can be dynamically loaded from a remote source, for example a web server.

Added support for text on the XimageButton

The XimageButton component can now draw text over the various images it uses to render the component.

Added a hashtable of dialogs to the project as the object DialogList qualified by the page name

This facility makes it possible to look up a dialog (particularly a modeless dialog) at any stage. Some users have employed dialogs for toolbar like facilities or monitors.

Added reset method to the XStyleManager to initialise all of the style information. For loading of a different styles file in a session

This enables the opening of different style files at runtime making it easy to brand and skin applications. The screenshots below show a sudoku application using different style files from the 'Style' menu.

Illustration 17: Restyling of applications while running

Added the XListenerHelper interface to the swing XList so that selection events can be declared in XML.

List selection events were missing from the core package so have been added for convenience

Added an XImagePainter class and integrated it with the Swing XPanel to paint background images/watermarks

A custom painter can now be assigned to a panel. See the SugarCRM screenshots above.

Added an extra check for-non existant files when reading

Added support for the Substance LAF

The Substance look and feel (reference) can be selected from the NetBeans plugin. The substance LAF now uses the XUI Color Chooser.


Illustration 18: Out of the box support for several LAFs

Added a removeObject method to the XProject class

Changed the base class for XEdit in the swing package to JFormattedTextField and added support for specification of some limited formats

Formatted input fields such a number and date fields are now supported.

XTabPanel modified to translate the content of the tab titles.

XBasicDataBindingFactory modified to handle custom data bindings.

Can now specify custom bindings for components using the 'custom' attribute and implementing the XcustomDataBinding interface.

Changed the XProject.registerBindingFactory to take a parameter dictating the position of the new binding factory

Changed the addPage methods for wizard support

Changed the XRegisteredComponentFactory to log a warning in DEBUG mode instead of throwing an UnsupportedOperationException as it gave a different behavior

Fixed bug in the XBaseModel.removeChild( String ) function whereby all values were getting reordered before the model being sought was found.

Removed left over resetStyleManager method from the XProject class. Made redundant by removal of static classes

Fixed problems with Applet startup sequence

Changed up some getWidth() calls to getSize().width for 1.1 compatibility

Merged XModelNodeHelper into XModelHelper and removed the singleton constructor

Changed XComponentFactory to allow addition of components when no parent container has been set.

Changed the XDefaultAttributeEvaluator class to be able to process library function calls for events as well as bindings.

comments


If you were logged in you could rate this article or add a comment.