swing-dsl

DSL for creating swing GUIs

MIT License

Stars
8

Swing DSL

Note: This library is still in an early phase and the API may change drastically between versions.

A standalone library port of the IntelliJ plugin api UI builder dsl.

See https://plugins.jetbrains.com/docs/intellij/kotlin-ui-dsl.html for more information.

This library doesn't implement the full DSL as available in the IntelliJ API as this library was created to meet my own demands for a DSL, and I did need the additional functionality. If there is interest in some specific features fell free to create an issue for it.

The other main difference to the IntelliJ API is the usage of Text instead of String for displayed text content (although 'String' is still supported). To support content localization without having to rebuild the entire UI or manually update all components one can make use of the InternationalizedText.

Currently, the produced layout is only tested with Darklaf however it should also work with almost all other LaFs. For better layout results LaFs can implement VisualPaddingProvider for their borders.

To provide more flexibility with the kind of components used for the UI one can specify a custom ComponentFactory.

Package Rankings
Top 31.16% on Repo1.maven.org
Badges
Extracted from project README
CI Autostyle Maven Central