Beans Binding 0.6.1 Release Available
Taking into consideration the feedback that I've received since yesterday's blog on the 0.6 release of Beans Binding, I've just released 0.6.1 with simpler and more intuitive method names and constants. It's available at http://beansbinding.dev.java.net
Full details, straight from the release notes:
API Changes/Additions
UpdateStrategy.READ_FROM_SOURCEhas been renamed to the shorterUpdateStrategy.READTextChangeStategyis now a top-level enum. In addition, the valuesCHANGE_ON_TYPE,CHANGE_ON_ACTION_OR_FOCUS_LOSTandCHANGE_ON_FOCUS_LOSThave been shortened toON_TYPE,ON_ACTION_OR_FOCUS_LOST,ON_FOCUS_LOST.Binding.Parameterhas been renamed toBinding.ParameterKeyandBinding.setValue/getValuehave been given the more appropriate namesBinding.putParameter/getParameter.All Swing
ParameterKeys are now in a top-levelParameterKeysclass. They've been renamed as appropriate to reflect the fact that they are constants. A few have also been shortened.SwingBindingSupporthas been removed. Documentation for Swing binding is now in the package-level documentation.
To see how some of these changes affect you, let's look at two examples:
Before:
Binding b = new Binding(list, null, table, "elements");
b.addChildBinding("${firstName}, null)
.setValue(SwingBindingSupport.TableColumnParameter, 0)
.setValue(SwingBindingSupport.TableColumnClassParameter, String.class);
After:
Binding b = new Binding(list, null, table, "elements");
b.addChildBinding("${firstName}, null)
.putParameter(ParameterKeys.COLUMN, 0)
.putParameter(ParameterKeys.COLUMN_CLASS, String.class);
Likewise, before:
Binding b = new Binding(object, "${property}", textField, "text");
b.setValue(SwingBindingSupport.TextChangeStrategyParameter,
SwingBindingSupport.TextChangeStrategy.CHANGE_ON_TYPE);
After:
Binding b = new Binding(object, "${property}", textField, "text");
binding.putParameter(ParameterKeys.TEXT_CHANGE_STRATEGY,
TextChangeStrategy.ON_TYPE);
- Login or register to post comments
- Printer-friendly version
- shan_man's blog
- 1353 reads





