Skip to content

ebayedq/swing-beansbinding

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

622 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beans Binding (JSR 295)

This is a fork of the JSR-295 reference implementation.

This version (which I called 1.3.0) includes two notable differences to the latest release (1.2.1) you can find on maven central:

1. Performance improvements

After the 1.2.1 release, a significant performance improvement was added (see here for details) that was never released.

2. Conditional JTable cell enablement

Previously you would bind your JTable like so:

List<Person> persons = createList();
JTableBinding<Person, List<Person>, JTable> tableBinding = SwingBindings.createJTableBinding(READ_WRITE, persons, table);

tableBinding.addColumnBinding(BeanProperty.create("firstName"))
    .setColumnName("First name")
    .setEditable(true); //or false

tableBinding.bind();

That means, that you could only make entire columns editable or not editable. Now it is possible to define this per row element using a Predicate:

tableBinding.addColumnBinding(BeanProperty.create("firstName"))
    .setColumnName("First name")
    .setEditableWhen(Person::isMale);

About

Beans Binding (JSR 295) reference implementation

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Java 96.4%
  • HTML 3.6%