JavaFXComposerNewInM8

Revision as of 13:14, 2 August 2010 by Msandor (Talk | contribs)

Contents

New Data Source API

Classes

Structure

Filter

Location

Location is new concept in M8 API and defines a precise location of a particular data or value, it's like a pointer to a variable. Once you have a Location you simply get and set the value it points to by calling get() and set() method on the Location object which makes sure the appropriate Record's attribute is accessed. You get a Location object by calling Record.getLocation(locationSpec: String) method. The locationSpec string has two parts:

  • a filter specification (see previous paragraph) that locates a Record
  • an attribute specification; can be empty in which case the Location will point to the Records' direct value, rather that one of its attributes' value

Here are examples of location specifications:

  • /bookstore/address/#zip - "/bookstore/address" navigates to the "address" Record and "#zip" selects the "zip" attribute of the "address" Record
  • /rss/channel/title - "/rss/channel/title" navigates to the "title" Record and since there is no attribute specification the Location will get/set the value of the "title" Record

Write Support

Unlike in the previous API version, every Record is now read/write. Attributes of a Record can be modified using the setAttr() method and its value can be changed with the setValue() method. Even more convenient is to get a Location object for the value you want to work with (read and/or modify) and use get() and set() methods on the Location object. All changes are propagated to the original Record. Whenever data in a Record change, the Record is marked dirty, see the next paragraph.

Dirty Flag

When a Record is modified it is marked dirty and all its parent Records are marked dirty as well. Dirty flag is a synthetic attribute of a Record and can be read and written by getDirty() and setDirty() methods. Calling setDirty(true) marks all parents dirty and setDirty(false) marks all descentants clean. You can check the dirty flag to see whether it is necessary to commit changes, ie. synchronize in-memory data with the original data source.

Data Source Customizer

New Data Source Components

Sequence-based Controls

The DSListView, DSChoiceBox controls are working with a sequence of the Records taken from a specified DataSource and Filter.

Item-based Controls

The DSCheckBox, DSLabel, DSPasswordBox, DSTextBox controls are working with a single attribute value specified by a Location within a DataSource.

New Validation Component

Form Customizer Improvements

Design usability improvements

  • The behavior of image placeholder has changed, allowing user to switch between standard and placeholder view.
  • Improved and simplified guidelines to lower confusion
  • Added new handlers to allow easily move parent container if child is selected.

Palette

Some categories in the Palette are collapsed initially, so only Layouts, Controls, new Data Sources and Templates categories are expanded.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo