Skip to content
InspireNXEPublic

About

Strata is a GUI library for Java that works with any engine

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Strata logo

Strata

Strata is a GUI library for Java that works with any engine. You build screens from layout panels and a full set of controls, style them with themes, and a thin adapter draws them and feeds them input on your engine. The same screen runs everywhere Strata has an adapter.

  • Five layout panels: anchor, stack, grid, absolute and scroll.
  • Controls from labels and buttons to text fields, lists, tables, trees, menus, date pickers and dialogs.
  • One event system for input and for every change to a control. Handlers can cancel or rewrite what the user asks for.
  • Themes that map style keys to colors, gradients and sprites, written in code or JSON and resolved in layers.

Platforms

Platform Repository Versions
Java2D Strata-Swing Java 25
Minecraft Strata-Minecraft 26.3 on NeoForge, Forge, Fabric and SpongeVanilla
Your engine Writing an adapter

Every artifact is published to Maven Central under the group org.inspirenxe. Until 0.1.0 is released, there are snapshots only, in Central's snapshot repository. Installation has the setup.

A screen

public final class SettingsScreen implements Screen {
    @Override
    public Component<?> build(final ComponentFactory factory) {
        final Label status = factory.label("Ready");
        final Button save = factory.button("Save").onEvent(Button.PRESSED, e -> status.setText("Saved"));
        final StackPanel column = factory.stackPanel().setSpacing(4).setPadding(8).add(status).add(save);
        return factory.anchorPanel().add(column.setAnchor(Anchor.CENTER)).setAnchor(Anchor.FILL);
    }
}

Open it with Strata.screens().open(new SettingsScreen()) on any platform.

Modules

Module What it is
api What developers compile against: the factory, controls, panels, events, themes and extension points.
spi What engine adapters implement and drive, plus contract tests for adapters.
core The implementation. Only adapters use it directly.

Building

Building needs JDK 25.

./gradlew build

Strata-Swing, Strata-Minecraft and Strata-Gallery build against a Strata checkout beside them when there is one, so a change here reaches them at once. Without one they take Strata from Maven Central. Strata-Docs builds its Javadoc and design pages from the checkouts, so it needs Strata and Strata-Swing beside it.

Documentation

The documentation site has the guides, the reference and the Javadoc. Its source is in Strata-Docs. To try every control, run Strata-Gallery.

License

Strata is released under the Apache License, Version 2.0. See LICENSE and NOTICE.

About

Strata is a GUI library for Java that works with any engine

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages