Releases: int4-org/FX
Release list
0.6.1
0.6
Full Changelog: 0.5...0.6
Highlights of this release:
Validation rules and UI support
Domains can now contain Rule predicates: predicates that are associated with a Template describing why a value is not part of the domain. This allows domains to provide validation feedback that can be displayed directly in the UI.
All built-in Domain factory methods now provide default validation messages, making it possible to surface meaningful feedback without additional configuration. Combined with ValidationEvent, which is emitted by controls bound to domain-aware Models, and the new ValidationMarkerPane, validation errors can now be propagated and presented with minimal effort.
Atomic updates and consistent multi-value observation
UpdatableValue introduces support for coordinated updates through set(...) and batch(...).
When multiple values are updated together, all values are updated before notifications are delivered. This guarantees that observers never see intermediate states and always receive a consistent view of the data.
This works particularly well with Observe.values(...).subscribe(...).
Combined with Observe.values(...).subscribe(...), it becomes straightforward to react to changes across multiple values without worrying about duplicate processing or transient invalid states. While individual value changes may generate multiple notifications internally, Observe.values(...).subscribe(...) suppresses redundant callbacks when the effective set of observed values has not changed.
UpdatableValue<String> firstName = UpdatableValue.of();
UpdatableValue<String> lastName = UpdatableValue.of();
Observe.values(firstName, lastName)
.subscribe((fn, ln) -> updateDisplay(fn + " " + ln));
UpdatableValue.set(
firstName, "John",
lastName, "Smith"
);In this example, updateDisplay(...) is invoked only once after both values have been updated, ensuring that observers never receive a partially updated state.
Java 25 baseline
FX Flow now requires Java 25. Build pipelines, CI workflows, and published artifacts have been updated accordingly.
New Features
- Added
ValidationMarkerPaneand its base typeAbstractMarkerPanefor attaching visual markers to any JavaFX control. - Added
ValidationEvent, a general-purpose event type primarily emitted by controls bound to domain-aware models, but also usable by external components to publish validation-related state that can be picked up by aValidationMarkerPaneor any other interested ancestor. - Added
PaneBuilderandPanes.pane(...)for fluent construction of JavaFXPaneinstances. - Added
UpdatableValue, a value container supporting atomic multi-value updates with guaranteed end-state-only notifications to listeners. - Added multi-value subscription support to
Observe.values(...), enabling observation of combined value tuples via a singlesubscribe(...)callback.
API Changes
Domain.where(...)instead ofDomain.of(...)Domain.inapplicable()instead ofDomain.empty()model::setDomaininstead of direct domain property mutation.
0.5
Full Changelog: 0.4...0.5
This release enhances FX Flow with a more flexible, strategy-driven builder model, enabling build-time customizable resolution of text, formatting, and child nodes.
Context‑Aware Build Strategy Infrastructure
A major addition is the build context and strategies framework. This allows builder behavior to be customized and overridden without changing the builders themselves. It introduces:
BuildContext,BuildContexts, andBuildStrategyto represent, compose, and resolve strategy implementations.- Thread‑local and global root contexts for scoped strategy application.
- Support for override of strategies such as text formatting (
TextStrategy), content resolution (ContentStrategy) and children handling (ChildrenStrategy). This enables advanced use‑cases such as localization and custom node resolution.
Below is an example how text accepting builder methods can be (globally) overridden to do localization:
ChoiceModel<Locale> locales = ChoiceModel.of(Locale.ENGLISH, Locale.GERMAN);
BuildContexts.root(
BuildContext.of(TextStrategy.class, (node, input, setter) -> {
if (locales.get().equals(Locale.GERMAN)) {
setter.accept(Objects.toString(input).toUpperCase());
}
else {
setter.accept(Objects.toString(input));
}
})
);The example:
- Creates a new
BuildContextwith an overriddenTextStrategy - Sets the newly created
BuildContextas the root context for builders to use
Generalized text inputs
The text, promptText, and accessibleText builder methods now accept Object instead of String. Values are passed to the active TextStrategy, with the default behavior calling toString(). This enables richer use cases such as enum-based localization, custom formatting, and late or dynamic text resolution without changing builder APIs.
Simplified ComboBox and Spinner typing
ComboBox and Spinner builders no longer require an explicit type witness. The new raw/typed builder split allows the item type to be inferred naturally from methods that supply a type (eg. items(...), value(...), model(...), or comparator(...)), reducing boilerplate while preserving full type safety once the type is established. For example:
FX.comboBox() // type is ComboBoxBuilder.Raw
.items(List.of("A", "B", "C") // type is now ComboBoxBuilder.Typed<String>
.comparator( ... ) // accepts Comparator<String> only now
.build();0.4
Full Changelog: 0.3...0.4
This release expands the fluent JavaFX builder API with better coverage of core JavaFX primitives and improved model integration.
Shapes
A new Shapes entry point adds fluent builders for JavaFX shapes such as Circle, Line, Rectangle, and Path, allowing shapes to participate fully in declarative UI composition.
Circle circle = Shapes.circle("avatar").radius(24).build();Group
The Panes API now includes a builder for javafx.scene.Group, enabling lightweight node grouping with styling support.
Group group = Panes.group("overlay").nodes(node1, node2);Minor changes
SliderBuildernow supports integer and long models.AbstractRegionBuildernow provides single axis size methods such asminWidth,prefHeight, andmaxWidth.- Added and refined Javadoc across the builders and values modules.
- Improved module-level documentation (module-info.java) to clarify API surface and exported packages.
- Minor API cleanups and refactorings in abstract builder base classes for consistency and maintainability.