Commons, version 1.0.1 released


dejv bio photo By dejv

While working on my recent JavaFX stuff, I’ve gathered a couple of classes general enough to make them potentially re-usable by virtually any JavaFX project, so I decided to extract them into a separate bundle.

Some of these classes can be used as a replacement of standard JavaFX geometry classes, like javafx.geometry.Point2D or javafx.geometry.Bounds, but with observable coordinates, while others offer enhanced binding possibilities (for example they can apply a custom function on a DoubleExpression dependency), and some of them provide more complex functionality, like CompositeObservableBounds, which can take multiple javafx.geometry.Bounds properties, and unite them in a single, dynamically updated, observable bounds.

Currently, the jfx.commons library consists of the following classes:

package dejv.jfx.commons.binding

FunctionDoubleBinding

  • Applies a provided Function on a DoubleExpression dependency

ReductionDoubleBinding

  • Reduces multiple DoubleExpression dependencies with a provided BinaryOperator

package dejv.jfx.commons.geometry

ObservableBounds

  • Replacement to Bounds with observable properties

CompositeObservableBounds

  • Unites multiple Bounds properties into single, observable bounds

ObservableDimension2D

  • Replacement to Dimension2D with observable properties

ObservablePoint2D

  • Replacement to Point2D with observable properties