You are hereAria User Guide / Appendix / What's new in version 3.0

What's new in version 3.0


By luano - Posted on 14 January 2009

The Juice project (the codename for Aria and Aria 3.0) made a very large number of additions to the two platforms and the associated IDE plugins. This chapter presents some of the new features and details of the changes you will need to make to upgrade your application.

New features

All of the features covered here are also covered in greater depth throughout this manual. The following is a compilation of these features designed to give you an overview of what is new and enhanced.

New Aria features

The features presented below are listed in the order in which they were added to Aria.

Added support for multiple page loaders

Previously only a single page loader could be used and normally this was the AriaBuilder class. By adding support for multiple loaders we can support multiple file formats, including html via additional builders. The individual builders can check the file types and attempt to load the requested pages. This change involves a number of modifications to the interface including renaming the PageManager.setSecondaryLoader method to PageManager.addSecondaryLoader and adding a return value to the PageLoader.loadFrames method

Modified the build and the ContentHolder interface

The build and the source for the full set of JDKs/compiles has been modified. Previously the ContentHolder interface was modified to as the return type checking prevented the getComponent method from returning an Object instead of a Component (which would not work for the SWT/HTML components).

Replaced Flexdoc with a new docking framework

The flexdock framework has been replaced with a new docking framework based upon the MultiSplitLayout from Hans Muller/ SwingLabs. The new framework features drag and drop, zooming, docking etc... and should be considerably more flexible and reliable. The docking framework does not rely on other parts of Aria and can be used independantly.

Added an HTML Builder

The HTML builder makes it possible to load pages from HTML and generate a Swing user interface from those pages. The builder makes uses of a set of prototype tag handlers that instantiate Swing components for the the HTML elements and add them to the page. TableLayout is used for handling tables and this library is added o the libs folder. This new feature also makes use of the new support for multiple page loaders so that it is not necessary to specify whether or not a page is XML or HTML, whichever is found will be loaded. As the AriaBuilder is the initial builder it will get preference and will make the first attempt to load the page. An HTML builder can be installed or configured by startup parameters.

Toolbar support added

A new element in the framsets file has been added to provide support for toolbars. The toolbars will be treated as a special page and docked into the application frame. A new widget, the ToolbarButton has also been added to help implement toolbars. The toolbar buttons can take both text and icons.

New splash screen functionality

New splash screen functionality has been added with the SplashWindow class, based on work by Werner Randelshofer. The new class is set as the main entry point, loads and then invokes the Aria start class proper. This new splash functionality appears alot quicker than the previously documented method of creating a splash screen. The functionality of this splash screen is available across all JDKs and is independent of the new splash screen functionality in Mustang.

Component registration extended

An extended method of registering components has been added. Now by specifying the reflect="true" parameter for a component it is possible to register a component in a single line. Any subsequent access of a component attribute will use reflection to find the appropriate accessor method, and these accessors are then cached for reuse. To register swing components for example all that is needed is the following in the project's components.xml file:

Reflective component property registration

  1. <Component name="JButton" class="javax.swing.JButton" reflect="true"/>

In addition to this extended registration, the editor now adds references to the Jar file used by the components as they are added to a project and therefore editing the component registration is only necessary if you are adding new or third party components, or if you need to do some special customization. In most cases the component writer will take care of registration.

Extended localization support

A set of new classes for loading resource bundles has been added. Of these, the new EncodedLanguageResourceBundleLoader class allows an additional file, a '.propety_encoding' file to be specified for each language. The file can include a value for the associated properties file endcoding and a set of font maps for that language. The font map can be used to replace fonts on a face-by-face basis, or as a combination of face name and point size.

Added support for multiple projects

A set of new classes for loading resource bundles has been added. Of these, the new EncodedLanguageResourceBundleLoader class allows an additional file, a '.propety_encoding' file to be specified for each language. The file can include a value for the associated properties file endcoding and a set of font maps for that language. The font map can be used to replace fonts on a face-by-face basis, or as a combination of face name and point size.

Added input validation feedback

Input fields can now display feedback based upon the success or failure of input validations. So far the validation feedback styles are set on a global basis via the BaseValidator.setValidationColors method.

System colors support added

Support for the system colors has now been added and the named colors can be used in the style files. For example a value can now be specified. See the java.awt.SystemColor class for more details

Specifying a system colour

  1. <color_fore value="activeCaption"/>
Extended style support added

Styles including values other than the basic font and color attributes can now be created. The styles are created as instances of StyleEx instead of the basic Style and these new styles can have any style attribute. When the styles are loaded storage is added for any style name. Once the style has loaded it is marked as closed and further styles can not be (by default) added.

This extension of the style system will make it possible to handle far more component attributes as styles and therefore further consistency can be added to applications. For the built in components the extra style attributes can be used to control values such as alignment, indents, and many other attributes. When the style is being applied to a component following construction the extra attribute values will be set either via the AttributedComponent interface or via reflection, if the particular component does not support that interface.

In the example below, the extended style is indicated by the extended="true" attribute of the style element, the extra property is specified as the alignment element

Extended styles

  1. <style name="label" extended="true">
  2. <color_back value="ffffff"/>
  3. <font_face value="Arial"/>
  4. <font_size value="11"/>
  5. <font_weight value="0"/>
  6. <font_italic value="0"/>
  7. <alignment value="right"/>
  8. <style name="bold">
  9. <font_weight value="1"/>
  10. </style>
  11. </style>
Validations triggered on page transition

Added a TriggerValidations startup properties that is set to true by the new project wizard - and therefore older projects will be unaffected. The flag is read by the PageManager and if true causes the validations to be checked prior to page transition. If the validations fail the page transition will be blocked such that the user must review and correct the reported validation errors.

An exception handler has been added to the attribute evaluator

An exception handler has been added to the attribute evaluator. The handler gets called in case of an exception and can override the result returned by the attribute evaluator. The evaluator may be of use in case, for example, an evaluation depends on a list selection and where that list may not have a selected values - the list would otherwise return a value such as null or -1 to indicate the error and this is probably not a valid value for the evaluated attribute. Say a path of a/b/${c}/d/e is enetered and ${c} depends on say a list selection and that list is not fully initialized.

SWT support enhanced and extended

A major revision and implementation of the SWT widget set has taken place. The most important widgets are now wrapped and usable in Aria. The applet/application has also been updated to share the very latest Aria infrastructure. A number of helpers, utilities and layout components have also been included. Along with the core SWT development a sample SWT application manager has been included, the Aria International Soccer Manager, demonstrates how to build a complete application using Aria and SWT.

The home page is now optional

The home page can now be excluded by specifying a value of NONE if the startup properties. Preventing the home page from loading may be desireable in the case of framesets or other application types where the frames file may also contain a specification for the home page.

Annotation support added

Added annotation support such that the page class can have the following annotations

Annotations

  1. @Page( "foobar" )
  2. class MyClass extends Page
  3. {
  4. @Find
  5. private Button myBtn;</P>
  6. </TD>
  7. </TR>
  8. <TR>
  9. <TD ROWSPAN="1" COLSPAN="1">
  10. <P>
  11. @Bind( "a/b/c" )
  12. private Edit myInput;</P>
  13. </TD>
  14. </TR>
  15. <TR>
  16. <TD ROWSPAN="1" COLSPAN="1">
  17. <P>
  18. @Validate( "CreditCardRule" )
  19. private Edit cardNumber;</P>
  20. </TD>
  21. </TR>
  22. <TR>
  23. <TD ROWSPAN="1" COLSPAN="1">
  24. <P>
  25. @Event( method="doProcessing", type="ActionHandler" )
  26. private Button processBtn;
  27. </P>
  28. </TD>
  29. </TR>
  30. <TR>
  31. <TD ROWSPAN="1" COLSPAN="1">
  32. <P>
  33. ...
  34.  
  35. public void doProcessing()
  36. {
  37. ...
  38. }
  39.  
  40. ...
  41. }
Extended the shutdown hook and application lifecycle listeners

The Shutdown hook has been extended to support multiple lifecycle listeners. The lifecycle listener gives an application the opportunity to perform cleanup and shutdown activities before the JVM exits. Typically an application may wish to close file or database connections or free up resources before exiting. A new listener, the DataBaseLifecycleListener has been added as ahelper for those

applications using a database like HSQLDB in in-memory or standalone mode that requires the database to be shutdown via a SHUTDOWN query.

A LayerLayout has been added

The LayerLayout is intented for use with pages and panels where you want to overlay one set of components with another. All the children of the container with the LayerLayout are given the same size and hence overlay one another. The components are located in the order in which they are created. An application may have to set the opaque property of the panels added to the layers so that the layers appear as expected.

The layering is intended to allow things like background decorations to be added and controlled easily. Layering may also be used to implement features such as overlays and modal/lock-out behavior, say for example overlaying a progress animation during a long running operation.

A ColumnLayout has been added

The column layout is a layout in which you can define columns of components. The components are added in rows, but align to the columns. An example usage is in creating forms where a left hand column may contain labels or captions while the right hand column may contain the input fields. Indentation, spacing and padding may be added to control the layout and define the location of individual compoents.

Repeat syntax support extended

The Repeat syntax has been extended to support bindings and events, this should improve the ability to create templates containing bindings and events.

Component customization support added

A new facility for customizing components has been added such that a collection of method calls can be made to customize a component and set properties on that component. The facility is itself customizable, supporting adapters to control how the properties are applied to the component. The customizations can be applied post creation of the component are just before activation of the page, when the component has been populated. For example in the case of a table the property may apply to the table columns rather than the table itself.

In the example below a table is customized in this way:

A customized component

  1. <ScrollPane>
  2. <Table2 name="currentAED" .... customizer="tableCustomizer"/>
  3. </ScrollPane>

the customizer attribute refers to a customization specified in the customizations.xmlfield. The customization file is as follows:

Specifying customizations

  1. <customizer>
  2. <Adaptors>
  3. <Adaptor name="ColumnAdaptor" class="org.formaria.registry.TableColumnCustomizer"/>
  4. </Adaptors></P>
  5. </TD>
  6. </TR>
  7. <TR>
  8. <TD ROWSPAN="1" COLSPAN="1">
  9. <P>
  10. <PropertySets>
  11. <PropertySet name="tableCustomizer" when="1">
  12. <AutoCreateColumnsFromModel args="false"/>
  13. <GridColor args="white"/>
  14. <ViewportBackground args="white"/>
  15. <Background target="parent" value="white"/>
  16. <HeaderRenderer adaptor="ColumnAdaptor"
  17. scope="*" class="org.formaria.swing.table.TableHeaderRenderer"
  18. args="getTableHeader()"/>
  19. <CellRenderer adaptor="ColumnAdaptor"
  20. scope="0-6"
  21. class="org.formaria.swing.table.AltRowTableCellRenderer">
  22. <VerticalAlignment args="1"/><!--SwingConstants.TOP -->
  23. <AltUnselectedColors args="0,0,102;252,252,255"/>
  24. </CellRenderer></P>
  25. </TD>
  26. </TR>
  27. <TR>
  28. <TD ROWSPAN="1" COLSPAN="1">
  29. <P>
  30. <CellRenderer
  31. adaptor="ColumnAdaptor"
  32. scope="N" class="org.formaria.swing.table.AltRowTableCellRenderer">
  33. <VerticalAlignment args="1"/><!--SwingConstants.TOP -->
  34. <AltUnselectedColors args="0,0,102;252,252,255"/>
  35. <WrapsText args="true"/>
  36. </CellRenderer>
  37. <AutoResizeMode args="1"/><!--JTable.AUTO_RESIZE_NEXT_COLUMN -->
  38. </PropertySet>
  39. </PropertySets>
  40. </customizer>

The results of this customization is a table like the following, with row striping and customized header:

Painter replaced with SwingX Painter

The painter classes have been refactored to extend the SwingX Painter class. The SwingX interface was very close to the Aria interface and by using the SwingX version we will have access to a wider range of painters.

POJO support added

Support for using POJOs as a backing for the Aria data model has been added. POJOs can be configured from a variety of sources, including hibernate. Most of the configuration takes place automatically via reflection and little needs to be done other than pointing Aria at the root of the POJO model.

POJOs or Plain Old Java Objects support has been added in Aria 3.0. The new support for using POJOs as a backing for the Aria data model means that POJOs can be bound to user interface components just as easily as static data or database data. The POJO model may be home grown or generated with tools such as JDO or Hibernate. Most of the configuration takes place automatically via reflection and little needs to be done other than pointing Aria at the root of the POJO model.

Here's a sample configuration, showing how some POJO properties are overridden and some finders are refined.

Pojo mappings

  1. <Pojos id="beaumont">
  2. <context class="org.formaria.clinic.ClinicInstance" config="pojoConfig.xml"/>
  3. <overrides>
  4. <pojo id="patient" class="org.formaria.clinic.Patient">
  5. <!--identifier id="id" method="getPatientId"/-->
  6. <collection id="patientId" method="getPatients"/>
  7. </pojo>
  8. <pojo id="clinic" class="iorg.formaria.clinic.ClinicDAO">
  9. <property id="id" getter="getClinicId"/></P>
  10. </TD>
  11. </TR>
  12. <TR>
  13. <TD ROWSPAN="1" COLSPAN="1">
  14. <P>
  15. <finder id="patients" getter="getPatients" class="org.formaria.clinic.Patient">
  16. <key id="name" method="getName()"/>
  17. </finder>
  18. <property id="name" getter="getClinicName" setter="setClinicName"/>
  19. </pojo>
  20. </overrides>
  21. <root id="pojo" class="org.formaria.clinic.ClinicDAO">
  22. <param class="String" value="Clinic"/>
  23. </root>
  24. </Pojos>

The POJOs are then attched via the root object that serves to connect the Aria model and POJO hierarchy. A sample usage is as follows:

Pojo binding

  1. <Page class="org.formaria.swing.Dialog" title="Test POJOs" padding="0">
  2. <Components>
  3. <Label name="clinicName" x="10" y="10" w="200" h="20" style="stripe"/>
  4. </Components>
  5. <Data>
  6. <Bind target="clinicName" source="pojo/patients@idx=[1]/name"/>
  7. </Data>
  8. </Page>

where pojo/patients@idx=[1]/name refers to the second item returned by the getPatients() method of the root object. The root object as specified in the configuration is an instance of the ClinicDAO class. The root instance can be parametrized or alternatively it can be instantiated by the POJO context class.

Data bindings refactored

The data bindings in Aria 3.0 have been significantly refactored to work off a common interface. Not only does this unify and simplify the constuction of bindings, but it also makes it possible to have greater control over the creation of bindings and the provision of diagnostic services. See the DataBindingFactory page for more details.

Similar refactorings have taken place in the event handling and validation support.

Set startup objects

Multple startup objects can now be added simply by adding startup property entries in the form:

Listing the startup objects

  1. StartupObject<N>=Name;className
  2. StartupObject<N>=Name;className;Project

where is a counter starting from 0. In the second example the object is constructed via a constructor that takes an instance of the project as an argument

While this may seem like an insignificant change it opens up the possiblity of having multiple applications running within the same JVM and it means that an application can be built from modular elements, elements that can exist as standalone applications or as integrated modules.

Drag and drop support added

Drag and drop supported has been added for selected Swing components. Support is enabled by adding dragEnabled="true" as an attribute. Additional support can be registered by adding a transferhandlers.xml file to the project. The setup is similar to that of the setup of data bindings.

Unknown attributes now set reflectively

f there is no way of setting the attributes of a component directly, or through the AttributedComponent interface, or through a ComponentAdapter then reflection will be used to set the properties. The methods signatures are

parameter types are set using the JVM type signature syntax, for example

Reflective property

  1. <List name="sourceList" x="10" y="11" w="305" h="251" dragEnabled="[Ztrue]"/>
Map page names

A page name can now be paramaterized or mapped, so that a frames file or startup.properties file can specify a key instead of a page name. This key can then be mapped to a specific page depending on the context or on startup parameters.

Mapped page names

  1. // In startup.properties specifc the Lifecycle object
  2. LifeCycleListener=org.formaria.beaumont.ProjectListener
  3.  
  4.  
  5. // In that object map the "START_PAGE" page name
  6. public class ProjectListener implements LifeCycleListener
  7. {
  8. /**
  9.   * Called when the application/applet has been created and initialized.
  10.   * @param project the owner project
  11.   */
  12. public void initialize( Project p )</P>
  13. </TD>
  14. </TR>
  15. <TR>
  16. <TD ROWSPAN="1" COLSPAN="1">
  17. <P>
  18. {
  19.  
  20. String[] args = (String[])project.getObject( "StartupArgs" );
  21. // Set the start page to the 3rd command-line parameter
  22. p.getPageManager().mapPageName( "START_PAGE", args[ 3 ] );
  23. }
  24. } </P>
  25. </TD>
  26. </TR>
  27. <TR>
  28. <TD ROWSPAN="1" COLSPAN="1">
  29. <P>
  30. // In the frames.xml include the "START_PAGE" key
  31. <Frame name="content" constraint="content" width="500" height="200"
  32. content="START_PAGE" title="Home"
  33. icon="ac0036-16.png" sidebar="west"/>
Minimal http server embedded

A minimal http server is now embedded at org.formaria.http.HttpServer. When customized this server will allow a server appplication to signal a client via a http request. By customizing the server with a response handler the application can then respond with special actions, such as a wake-up or by requesting updates/new data from the server.

SystemTray support added

Support for the system tray or launch area has been added. When a system tray icon is added the application can choose to stay resident in memory after the main window has been closed by setting the "ExitOnClose" startup property to false. The advantage of doing this is that the data model does not need to be reinitialized if the main window is just being redisplayed. This initialization can be significantly quicker than normal startup as all

the classes needed by the JVM are already loaded. If remote data is used the startup gain may be even greater as network access may not be required.

The tray icon provides two menu items, one to open the window and the second to close the window and exit the JVM.

This version of the class uses the SwingLabs version of the tray support and is therefore limited to Swing. If JDK 6 or later is being used then the JVM's tray support could be used for non Swing applications.

The system tray/stay resident option may be particularly valuable when used in conjunction with an embedded webserver, as a remote server could thereby signal the application to wake up and display new data or alerts as when such data becomes available by simply making a request to the client application's server. The same process could also be used to provide a tighter integration between a web page/web application and a Aria application.

To use this support the application must add an instance of the org.formaria.swing.deploy.SystemTrayManager class. A good place to do this is in a LifeCycleListener implementation

Using the system tray

  1. public class ProjectListener implements LifeCycleListener
  2. {
  3. private static SystemTrayManager sysTray;
  4.  
  5. /**
  6.   * Called when the application/applet has been created and initialized.
  7.   * @param project the owner project
  8.   */
  9. public void initialize( Project proj )
  10. {
  11. final Project project = proj;
  12. if ( sysTray == null ) {
  13. sysTray = SystemTrayManager.getInstance( project );
  14.  
  15. // Do remaining initialization and network access
  16. }
  17. }</P>
  18. </TD>
  19. </TR>
  20. <TR>
  21. <TD ROWSPAN="1" COLSPAN="1">
  22. <P>
  23. /**
  24.   * Called when the application/applet has been shutdown and is about to exit
  25.   */
  26. public void shutdown()
  27. {
  28. }
  29. }
AriaProxy added to ease Aria-Swing integration

The proxy can be used in place of an applet class where the Aria fraction of an application needs to be integrated with an existing or legacy Swing application. The proxy extends JPanel and encapsulates the Aria elements of the project. An example application is included in the Aria source tree.

Collection support added for tables

The modelling of tables has been refactored so that more generic implementations can be provided, the first of which is construction of tables from ArrayLists and vectors. The new class CollectionTableModel supports the new TableModel, RowModel and FieldModel setup. For example. Using Java arrays with table bindings

  1. public class MyTable extends Page
  2. {
  3. ...
  4.  
  5. public MyTable()
  6. {
  7. String[] names =
  8. { "ID", "Title", "Author" };
  9.  
  10. String[][] rawData = {
  11. { "0", "Moby Dick", "Herman Melville" },
  12. { "1", "The Hunchback of Notre Dame", "Victor Hugo" },
  13. { "2", "The Idiot", "Fyodor Dostoevsky" },
  14. { "3", "Ulysses", "James Joyce" },
  15. { "4", "Thus Spake Zarathustra", "Friedrich Nietzsche" },
  16. { "5", "Bleak House", "Charles Dickens" },
  17. { "6", "Mansfield Park", "Jane Austen" },
  18. { "7", "Alice's Adventures in Wonderland", "Lewis Carroll" },
  19. { "8", "The Republic", "Plato" },
  20. { "9", "Kidnapped", "Robert Louis Stevenson" },
  21. { "10", "On the Duty of Civil Disobedience", "Henry David Thoreau" },
  22. { "11", "The Jungle Book", "Rudyard Kipling" },
  23. { "12", "The Picture of Dorian Gray", "Oscar Wilde" },
  24. { "13", "The Rime of the Ancient Mariner", "Samuel Taylor Coleridge" },
  25. { "14", "Catcher in the Rye", "J. D. Salinger" },
  26. { "15", "The Glass Bead Game", "Herman Hesse" },
  27. };</P>
  28. </TD>
  29. </TR>
  30. <TR>
  31. <TD ROWSPAN="1" COLSPAN="1">
  32. <P>
  33. ArrayList fieldNames = new ArrayList();
  34. for ( String n : names )
  35. fieldNames.add( n );
  36.  
  37. ArrayList data = new ArrayList();
  38. for ( String[] row : rawData ) {
  39. ArrayList rowList = new ArrayList();
  40. for ( String field : row ) {
  41. rowList.add( field );
  42. }
  43. data.add( rowList );
  44. }
  45.  
  46. CollectionTableModel ctm = new CollectionTableModel( project,
  47. "CollectionTable",
  48. fieldNames,
  49. data );
  50. rootModel.append( ctm );
  51. }
  52. ...
  53. }

combines with the XML to bind the collection to the ' collectTable ' table component.:

Binding to a Java array

  1. <Page class="aria.projects.sqltables.MyTable" layout="border">
  2. <Components>
  3. <Label name="title" content="Table Demo" alignment="center"
  4. constraint="north" style="Heading"/>
  5. <TabPanel constraint="center" >
  6. ...
  7. <ScrollPane title="Collections">
  8. <Table2 name="collectionTable" title="collection"
  9. interactive="true" headingStyle="TableHeading"
  10. style="TableData" selectionStyle="TableSelection"
  11. horizontal_scrollbar="as needed"
  12. updateModel="true"/>
  13. </ScrollPane>
  14. </TabPanel></P>
  15. </TD>
  16. </TR>
  17. <TR>
  18. <TD ROWSPAN="1" COLSPAN="1">
  19. <P>
  20. ...
  21. </Components>
  22. <Events>
  23. ...
  24. </Events>
  25. <Data>
  26. ...
  27. <Bind target="collectionTable" source="CollectionTable" output="tables/ct" />
  28. </Data>
  29. </Page>

New AriaEditor features

Added support for SWT

The NewProject wizard has been modified to include support for SWT widgets. The wizard now provides options for Swing, AWT and SWT, and a new startup property (WidgetSet) is output.

Added a list of superclass methods

Added a list of super class methods and the methods in the current class so that they can be selected for reuse in event handlers. Also added a check for the presence of the superclass method (in case it's not in the immediate superclass) and pop up a warning asking if the method should be overloaded.

In-situ editing added

In-situ editing, or the ability to edit component properties in the location where the component is located has been added. As the mouse is moved over a component a translucent property sheet is displayed next to the component. The property sheet can be used purely for information purposes or to modify the properties of a component. The in-situ editing operates in a number of modes, one with a full property sheet, a second minimal mode, and a third mode with showing selected property values. Clicking on these hints gives access to a single property editor for that property.

Support for evaluated attributes added

Support for evaluated attributes within the AriaEditor editor has been added. Almost all properties may now be set as evaluated attributes. The expression will insert full expressions reference methods of the page or if a new expression is entered the stub of that new method will be inserted into the page class.

Dialog size preview added

When a dialog is opened in the page designer a preview of the packed size is overlaid on the designer. The packed size is equal to the size that will include all the components, plus the padding. The size of the dialog, including the headers and borders is also displayed.

Design time support for includes added

Support for includes has been added to the page designer. Included component can now be edited and manipulated as though they are part of the page, and upon save the included file is also saved. Multiple instances of included file(s) can be used.

Locking of components added

A new popup menu has been added that allows components to be locked so that they are not accidentally moved by the mouse. When a component is locked the cursor no longer chenges as the mouse moves over the grab handles, nor does the component move when it is dragged. A small red X is shown in the centre of locked components.

Support for Includes and Repeats

Support for 'include' and 'repeat elements has been added. When a repeat or include element is selected in the inspector a custom property sheet is shown. For convenience the inspector also allows all children of an included or repeat element to be selected so that the user can see what is 'owned' by the element.

Preferred Page Size dialog added

A preferred page size dialog has been added to configure the page size for editing. The dialog shows the sizes that are defined by the frames setup and also allows selection of customs sizes. When the page is subsequently loaded it is displayed at the specified size.

New Aria features

Standalone Language Editor

The language editor is a standalone version of the translation tool that licensees can distribute to translators without having to distribute the whole NetBeans platform.

PDF Exporter

A new PDF export feature has been added, the export package can now export or print HTML, Excel XLS and PDF.

Enhanced Question Manager

Many new features including new question types, templates and expression types.

GenericBuilder

A generic builder has been added. The builder allows a variety of file formats to be mapped to Aria pages, including data and event bindings. The builder does not require a one to one mapping and an element of one format can be mapped to multiple Aria components, or multiple elements within the source file can operate on a single component.

PojoFormBuilder

Extending the GenericBuilder, the POJO form builder inspects a POJO and builds a form based on the available properties. The form can be customized with the same decoration layers as used by the generic builder and by the same type of mappings.

Pojo Visualization

PojoModel objects visualization has been added to the Data Visualizer.

The generic builder also makes use of Aria's new layered pages so that static content can be added to the new page as a background layer to provide visual queues and eye candy to help improve the appearance of the generated pages.

New Components

Aria 3.0 adds many new components, some of which are listed below. Many other components are also enhanced and improved.

New Components

Component

Description

Calendar

An outlook calendar component allowing you to add and interact with dates and appointments. The calendar includes day, week and month views and allows easy navigation from one date to another

Rollup

An outlook like rollup bar. Each category within the rollup bar is a panel, allowing you complete control of the bar's content.

TimeChooser

A drop down list for choosing the time of day, a length of time or a start/end time.

BreadcrumbBar

Displays a list of links to previous pages in the page navigation history.

Wizard

A dialog class that can display and manage the pages of a Wizard.

CheckCombo

A combo box that shows a list of options that can be toggled using combo boxes

New in 3.1

Aria 3.1 is mostly a maintenance release with numerous tweaks and fixes but the most notable changes are listed below. detailed information is available in SVN and in the SourceForge tracker systems.

AriaEditor 3.1 Changes

Styles reparsed

Styles are reparsed if the styles.xml file if modified outside of the editor. On switching back to the editor the modified file is automatically reloaded (if open) and the user is prompted as to whether or not the styles should be reloaded. Normally the styles file is only parsed on startup.

Color Wheel now supports the MouseWheel

The ColorWheel color chooser now supports the MouseWheel, allowing the hue, saturation and brightness to be adjusted using the mouse wheel. Holding the CTRL key down while doing so allows the colors within the wheel to be adjusted for saturation and brightness. There are some videos of this in action at http://www.Formaria.com/aria/videos

Drag to select

A drag to select gesture has been added to the page designer in the IDE plugins. To select multiple components hold down the CTRL key and Drag. A rectangle is drawn showing the selection area and any component intersecting with the rectangle when the mouse is released is selected. Multiple drags can be combines as the drag selection adds to the current selection, unless the SHIFT key is also held down, in which case the intersecting components are removed from the current selection.

To further assist the component selection some keyboard shortcuts have been added.

  • Ctrl + A selects all the components
  • Ctrl + U clears/unselects all the components

This should be a big productivity gain!

Drag and Drop database form generation

A last minute addition to AriaEditor 3.1 is drag and drop form generation for databases. Within NetBeans select the runtime view, configure a database connection and then drag a table on to a page and a form complete with data bindings and validations will be created. The database table will also be registered as part of the Aria data model as part of this action and in can be viewed using the data visualizer.

Aria 3.1 Changes

PageAnnotationProcessor extended

The annotation processor has been extended so that it searches for annotations of superclasses if the superclass implements the new AnnotatedPage interface. The change is designed to allow creation of common page classes that are then customized within an application. The base class can now use annotations.

An example of this is included in the MetroBank example in the aria/samples folder

MouseWheel support added to the ColorWheel

Mouse wheel support has been added to the ColorWheel. The sliders and the color wheel itself now respond to the mouse wheel.

DatabaseTable constructor widened to take a project reference

The DatabaseTable class constructor was widened so as to be consistent with its other constructors, and the dependant classes were updated accordingly (DatabaseTableModel and CachedDatabaseTable)

Added an isAvailable/setAvailable method to ServiceProxy

This allows the proxy to be included or excluded from a call and to record a common state value other than the return value.

ServiceHelper added

A simple helper class to facilitate access to services

commit and setAutoCommit methods added

These new database methods will make it possible to do batch updates with the database connection and database table models.

Alignment options ignores case

The alignment options for the Edit component are now case insensitive.

Drag and drop support refactored

Drag and drop support has been refactored to make it more extensible and to implement the inspector transfer handlers

DataConnection refactored

Synchronization fixes added and then refactored. This is part of a larger work in refactoring the synchronization support in Aria - more to follow

Tree extended with findNearestPath

This new method searches a tree and attempts to select/highlight the given path. The method is designed to be used after a tree binding has updated the tree. In this scenario the tree nodes may be different from the original tree model nodes and therefore the normal methods for selecting a tree path will fail.

Multiple selection support added for lists

Multiple selection support has been added for list components implementing the ListHolder interface. The ListBinding has also been updated to save list selections for multiple selection lists. If a list allows multiple selections then the output node of the binding will contain an array of Objects corresponding to the selection.

Warning added for unclosed connection

A warning has been added for unclosed connections. The executeQuery returns result set and this needs to be closed before another statement can be used on the same connection. Unlike previous versions the connection will be closed prior to opening a new statement and therefore it is advisable to explicitly close the statement using the matching closeQuery call before making another call. Prior to this change the success of such queries varied with the database being used.

Debug message time logged

The time of a debug message is now logged by default. This behavior can be turned of with DebugLogger.setLogMessageTime( false );

Added an exclusive mode for the docking app

Added an exclusive mode for page display so that a docking app can display an initial page without sidebars so that a logon page can be displayed.

Vertical text alignment options added

Extra alignment options have been added so that text in labels and other components can be aligned vertically.

Support for submenus added

Menus can now have nested submenus. These menus can be created with the usual menu XML.

From the International Soccer Manager example:

Sample Menus

  1. <Page layout="Border">
  2. <MenuBar>
  3. <Menu content="File">
  4. <MenuItem content="New Country..." image="menu/new.png"/>
  5. <MenuItem/>
  6. <MenuItem content="Open Country..." image="menu/open.png"/>
  7. <MenuItem/>
  8. <MenuItem content="Save Coutry" image="menu/save.png"/>
  9. <MenuItem content="Save Coutry As..." image="menu/saveas.png"/>
  10. <MenuItem/>
  11. <MenuItem name="exitMI" content="Exit" image="menu/exit.png"/>
  12. </Menu> </P>
  13. </TD>
  14. </TR>
  15. <TR>
  16. <TD ROWSPAN="1" COLSPAN="1">
  17. <P>
  18. <Menu content="Country">
  19. <MenuItem name="belgiumMI" content="Belgium" image="menu/belgium.png"/>
  20. <MenuItem name="englandMI" content="England" image="menu/england.png"/>
  21. <MenuItem name="franceMI" content="France" image="menu/france.png"/>
  22. <MenuItem name="germanyMI" content="Germany" image="menu/germany.png"/>
  23. <MenuItem name="irelandMI" content="Ireland" image="menu/ireland.png"/>
  24. <MenuItem name="italyMI" content="Italy" image="menu/italy.png"/>
  25. <MenuItem name="netherlandMI" content="Netherland" image="menu/netherland.png"/>
  26. <MenuItem name="portugalMI" content="Portugal" image="menu/portugal.png"/>
  27. <MenuItem name="scotlandMI" content="Scotland" image="menu/scotland.png"/>
  28. <MenuItem name="spainMI" content="Spain" image="menu/spain.png"/>
  29. <MenuItem name="switzerlandMI" content="Switzerland" image="menu/switzerland.png"/>
  30. </Menu>
  31. <Menu content="About">
  32. <MenuItem name="applicationMI" content="The Application" image="menu/application.png"/>
  33. <MenuItem name="authorMI" content="The Author" image="menu/author.png"/>
  34. <Menu content="Help">
  35. <MenuItem name="contentsMI" content="Contents" />
  36. <MenuItem name="faqMI" content="FAQ"/>
  37. </Menu>
  38. </Menu>
  39. </MenuBar>
Painters moved and refactored

The painters now use the SwingX painters interface (slightly different from the original version used by Aria). However, since the SwingX version uses generics it has been necessary to add an extra version of the interface to the API. The extra version simply forwards the call to the existing methods. As part of this cleanup the painter classes in Aria's Swing package have been moved to the org.formaria.swing.painters subpackage.