What's new in Jigloo version 4.0


Mac support for Swing

Swing now works on a Mac, and now there is full Mac OSX support - tested on an Intel MacBook.

Libraries added to projects automatically

When libraries (native and java) are required for a feature (ie SWT, GroupLayout - pre Java 6, and Swing Application Framework)  then they will be automatically copied into the project and added to the classpath.

Support for Swing Application Framework:

Please note:
In order to use the Swing Application Framework you need to use Java 6.0  to run Eclipse and to compile and run the applications.
  • Two new options for creating SingleFrameApplications have been added under "New->GUI Forms->Swing App Framework". You can create a sample application with menu bar and tool bar, or an empty single-frame appliation. 
  • The form editor has been changed by the addition of a "Properties" tab, which shows the properties file used by the application. This file is updated automatically and can also be manually edited, with changes being reflected in the form.

 

Actions:
  • Actions are implemented for AppFramework applications by using the annotation method for defining action handlers. By default there are four actions pre-defined by the framework - cut/copy/paste and delete. To add a new action use the "Abstract Action" icon under the Swing palette "More components". If one of these is dropped anywhere on the form it will create a new action, not yet connected to a visual element. If it is dropped directly on an element (say, a JButton or JMenuItem) then it will be created and immediately associated with that element.

  • You will see the action under the "Extra components node in the Outline view, and to set this action for a button or other Swing element, simply drag and drop it on the component. You can also set the action by selecting one of the actions from the drop-down for the "action" property in the "Property editor" view.

  • Actions are also implemented for normal Swing applications. They are manipulated in the same way as for Application Framework applications, but the code generated does not use annotations.

Surround by: There is a new "surround by" right-click option, which allows you to surround Swing or SWT elements with a new container component. This is useful if, say, you realise your text component needs to be inside a scroll panel, or a set of elements need to be displayed inside a tab of a new tabbed panel.

GroupLayout support enhanced:
  • Improved GroupLayout support - UNRELATED gaps are now supported, as well as linkSize code generated when elements are made the same width or height
  • Intelligent anchoring and expanding - for example if an element is docked onto the right side of the container it will be anchored RIGHT, and if it is stretched between the left side of the container and a right-anchored element it will expand horizontally
  • Support for Java 6 javax.swing.GroupLayout - check the new option in the Jigloo preferences "Code generation" page.

Multiple "root" elements: Support for multiple "root" components (eg, JDialogs or other non-contained containers such as JPanels which are not the main class and have not been added to any other component).
Simply drop a JDialog (or JPanel etc) onto the form outside of the current root component. It will appear as a new root node in the Outline view. To make this new component appear as the root node, select it in the Outline view. Use the Outline view to switch between root components.

Enhancements for absolute-type layouts:
  • For Swing and SWT absolute-type layouts (SWT Form, Swing Anchor, and Absolute), alignment lines (the same as are used for Swing GroupLayout) are used instead of grid lines to position components relative to one another.
  • It is also possible to move controls (in absolute-type layouts) using arrow keys

Component palette:

Import and export of component palette - two new buttons on the "Component palette" preference page. These save and load encoded text files and allow palettes to be distributed

Mnemonics and Accelerators

Property editors for these properties have been improved - for mnemonics, just hit the key you want to be the mnemonic for a button etc, and for accelerators, hold the keys down that you want to define the accelerator - eg, pressing CTRL+N will result in an accelerator key stroke of "ctrl N"