-
Notifications
You must be signed in to change notification settings - Fork 0
Core Concepts
PrinceOfCookies edited this page Jun 5, 2026
·
1 revision
DervaFX wraps normal JavaFX nodes. Each DervaFX element owns a JavaFX node internally and exposes a chainable API for common UI setup.
DervaElement<T> is the base type for almost everything in the library.
It provides shared helpers such as:
position(x, y)size(width, height)minSize(width, height)maxSize(width, height)padding(...)spacing(...)align(...)fillWidth()fillHeight()text(...)visible(...)enabled(...)cssClass(...)style(...)anchorFill()
Each element has:
- A wrapper root node returned by
getNode() - An internal content node used by the implementation
This matters for layout and drag behavior. For example, DervaWindow moves its wrapper root rather than the internal VBox.
DervaFX is the entry point for constructing components:
DervaFX.root();
DervaFX.window("Title");
DervaFX.vbox();
DervaFX.hbox();
DervaFX.panel();
DervaFX.label("Text");
DervaFX.button("Click");Themes are applied per JavaFX Scene:
DervaFX.applyTheme(scene);Theme changes can also be pushed globally through:
DervaFX.setTheme(DervaTheme.dark());