加载中...
HOME > Community > Projects > form

Matisse GUI Builder: JavaOne Update for NetBeans 5.0

This update brings all GUI building features currently available in NetBeans 6.0 development builds to NetBeans 5.0. So besides using daily development builds or q-builds you can now get the latest features (as of June 2006) into your last stable release! See more details below. See also the roadmap for a longer term outlook.

   Installation

   New Features

1. Automatic Internationalization
2. Visual Localization
3. Preview with Look and Feel
4. Relative Font Definition
5. Context Sensitive Help Bar
6. Reorganized Palette
7. Dragging Components from Projects Explorer
8. Support for Java 6 Layout
9. Bugfixes

 

Installation Steps for NetBeans 5.0

Having NetBeans IDE 5.0 running, follow these steps:

  1. from main menu invoke Tools | Update Center,
  2. in the table of known update centers check NetBeans Update Center Beta (uncheck the others),
  3. click Next, the IDE will connect to the update center and show all available updates,
  4. find Matisse Update Pack for NetBeans 5.0 under Features node, select it and push Add button (all necessary modules will appear in the Include to Install list),
  5. click Next and accept the license,
  6. wait until the modules are downloaded, proceed with Next button,
  7. make sure all modules are selected for installation (left column with check boxes),
  8. press Finish button and let the IDE restart.

After the IDE restarts, the installation is complete and you can start using the new features.

Uninstallation

If you ever wanted to uninstall this update, you can do it manually by removing the files listed below.

$userdir$/config/Modules/
    org-jdesktop-layout.xml
    org-netbeans-modules-form.xml
    org-netbeans-modules-i18n.xml
    org-netbeans-modules-i18n-form.xml
    org-netbeans-modules-properties.xml
$userdir$/config/org-netbeans-api-project-libraries/libraries-timestamps.properties
$userdir$/modules/
    org-jdesktop-layout.jar
    org-netbeans-modules-form.jar
    org-netbeans-modules-i18n.jar
    org-netbeans-modules-i18n-form.jar
    org-netbeans-modules-properties.jar
$userdir$/modules/ext/
    AbsoluteLayout.jar
    swing-layout-1.0.1.jar

Note: $userdir$ refers to the user directory location where all the settings are stored. You can learn where your user dir is located in Help | About -> Details.

 

New Features


1. Automatic Internationalization

Once turned on, this feature takes care about internationalizing the designed GUI form automatically. All texts in the form are moved to a properties file and appropriate code is generated that uses ResourceBundle API for obtaining the text based on the actual locale.

To turn this feature on, select the root node of the form in the Inspector and check the Automatic Internationalization property.

 

2. Visual Localization

The GUI form can be translated to a different language directly in the designer. The GUI builder allows you to switch the locale used for design, and also to create a new locale. Besides comfortable translation this is also useful for previewing the GUI appearance and behavior in different localizations. This can be done via the Design Local property of the root form node; see the picture above. New locale can be created by clicking the [...] button.

See also this short internationalization demo.

 

3. Preview with Look and Feel

This feature allows to preview the designed GUI form in various look and feels, both standard and custom ones.

A custom look and feel can be installed to the palette from a JAR file. This can be done the same way as installing JavaBeans components; the only difference is that the look and feels are not displayed in the palette. To get this you need to install them to the Look and Feels category in the palette manager.

    

 

4. Relative Font Definition

This feature allows to define font by deriving it from the default font. The generated code does not contain the full definition (that includes the font type which depends on platform/look and feel) but only changes you made. This way you can have the modified font consistent on all platforms. For example, if you want a bold font, the following code is generated:

    label.setFont(label.getFont().deriveFont(label.getFont().getStyle() | Font.BOLD);

To use the relative font definition, just check the Derive the font from the default font check box in the font property editor.

 

5. Context Sensitive Help Bar

This is a new component in the GUI designer displaying various hints based on context (e.g. type of component selected, type of actual operation, how a component is dragged, etc). It can be quite useful for discovering features available in various situations.

 

6. Reorganized Palette

The palette has been reorganized for better discoverability of components. There are separate categories for common controls, containers, windows and menu components now. Natural names of components are used instead of class names (e.g. Tabbed Pane instead of JTabbedPane). Under Beans category, there is a special Choose Bean item that allows to pick arbitrary component class that is available on the classpath.

The way of installing components to palette has not changed. So you can right click the palette and invoke Palette Manager..., or achieve the same from the main menu via Tools | Palette Manager | Swing/ AWT Components.

Note that often you don't need to install your own components to palette, you can just drag them from your project. See the next feature.

       

 

7. Dragging Components from Projects Explorer

This is a small, but very useful feature. If you have developed a component, you can drag it directly from the Projects explorer and drop it onto a form. (Note the component must be compiled.) You don't need to package and install the component to palette if you don't plan to use it often or in more projects.

 

8. Support for Java 6 Layout

With Java 6 (Mustang), Matisse is able to generate code that uses only standard JDK classes. The additional Swing Layout Extensions library containing necessary classes (GroupLayout and related) is no longer needed since all the classes were added to Mustang recently.

Note that all existing GUI forms will keep using the library, but you can change the code generation style if you move your project to Java 6 platform. The corresponding property is available on the root node of the form in the Inspector. All newly created forms will generate Java 6 code preferentially (if the project is targeted to Java 6).

 

The layout library will continue to be used for older JDK versions (5 or 1.4.x). The library was recently updated to version 1.0.1 which is functionally equivalent to the Mustang version. For more information see http://swing-layout.dev.java.net. The new library version is also part of this update pack.

 

9. Bugfixes

Here is a list of bugs fixed for this update.