JavaFX · FXML · Groovy · GroovyFX

Controls to
extend FXML

GrooveFX adds flow controls to FXML: iteration, conditionals, and multi-case branching directly in XML markup. No DSL. No FXML replacement.

Java 17+ Apache Groovy 4 JavaFX 17+ GraalVM / GluonFX Apache 2.0
<?import page.codeberg.rrangelo.groovefx.IterablePane?>

<VBox>
    <IterablePane items="{myList}">
        <HBox>
            <Label text="{item.name}" />
            <Label text="{item.email}" />
        </HBox>
    </IterablePane>
</VBox>
<?import page.codeberg.rrangelo.groovefx.ConditionalPane?>

<ConditionalPane test="{condition}">
    <then>
        ...
    </then>
    <else>
        ...
    </else>
</ConditionalPane>
<?import page.codeberg.rrangelo.groovefx.DynamicPane?>

<DynamicPane test="{user.role}">
    <when value="ADMIN">
        ...
    </when>
    <when value="USER">
        ...
    </when>
    <default>
        ...
    </default>
</DynamicPane>
// In-memory
PaginatedList<User> paginated = new PaginatedList<>(allUsers);
paginated.setPage(0, 10);

// Database
PaginatedList<User> paginated = new PaginatedList<>();
paginated.setAction((page, size, filters, sort) -> {
    Page<User> result = userRepository.findAll(
        PageRequest.of(page, size)
    );
    paginated.setTotalItems((int) result.getTotalElements());
    paginated.setTotalPages(result.getTotalPages());
    return result.getContent();
});
paginated.setPage(0, 10);

reactivity

JavaFX bindings

Components listen to ObservableValue and update automatically on state changes.

pagination

PaginatedList

Ready-to-use pagination model, compatible with in-memory lists and any ORM or database repository.

compatibility

No stack restrictions

Works with Java, Groovy, and GroovyFX. Compatible with GraalVM and GluonFX. No DSL, no reflection hacks.

IterablePane

Iterates a list using the parent container's layout.

ConditionalPane

Boolean branching with <then> and <else> branches.

DynamicPane

Multi-case with <when> and <default>.

PaginatedList

Pure data model for in-memory or DB pagination.

ConditionPane

Base class with shared deepClone and render.

PaginateAction

Interface implementable as a lambda in Java or a closure in Groovy.

Java

17 or later (LTS)

Apache Groovy

4.x

JavaFX

17 or later

provided by the application

GraalVM / GluonFX

Compatible

optional

<dependency>
    <groupId>page.codeberg.rrangelo</groupId>
    <artifactId>groovefx</artifactId>
    <version><!-- version --></version>
</dependency>

If you find GrooveFX useful, consider supporting its development.