JDNC

Playground

Experimenting a bit...

  • Some coded thoughts...
  • BeanDataModel - using JGoodies Binding Framework


Some Coded Thoughts...

The "wrapping text" and discussion (maybe :-) is on the javadesktop jdnc forum.

I moved the code to the jdnc-incubator project on javadesktop. There it's accessible via cvs. The old version still is on this site, but will not evolve further. It replaces the code examples below.


BeanDataModel

A DataModel represents a list of objects. The "records" are assumed to be "reasonably similar" beans, the fields are properties of the bean.

The implementation is backed by JGoodies Binding. The list is wrapped into a SelectionInList which allows to easily control vertical navigation, selection and replacing the controlling list itself. Property adaption is delegated to a BeanAdapter.

The sources:

  • BeanDataModel
  • Navigation - encapsulate vertical navigation (along a DataModel's recordIndex). Note: the DataModel interface is changed to expose the recordIndex as a bound property. AbstractDataModel is changed to manage the propertyChangeListeners.
  • SampleController, DataObject, CountryCodeResolver - some sample controller/data beans.
  • MasterDetailList - a test driver for BeanDataModel, using the sample data. Note: the name is as misleading as the masterDetail.jdnc :-) But it could be made a "real" master/detail, by controlling the SampleController's list - changing list content by some rule can simulate the "master" function. BeanDataModel will be automatically updated.


© Content 2003, 2004 Jeanette Winzenburg
Contact: formbuilder@swingempire.de

Entry: http://www.swingempire.de/palace/jdnc
Modified: $Date: 2004/09/22 16:41:16 $

© Webdesign 2003, 2004 Linda Radecke
Contact: design@swingempire.de