Skip to content

API Reference

PrinceOfCookies edited this page Jun 6, 2026 · 2 revisions

DervaFX

Factory and theme entry point.

Factory Methods

  • root()
  • panel()
  • vbox()
  • hbox()
  • window(String title)
  • label(String text)
  • button(String text)
  • textField()
  • textArea()
  • checkBox(String text)
  • comboBox()

Theme Methods

  • theme()
  • setTheme(DervaTheme theme)
  • applyTheme(Scene scene)

DervaElement<T>

Base class for chainable UI elements.

Common Methods

  • getNode()
  • position(double x, double y)
  • size(double width, double height)
  • minSize(double width, double height)
  • maxSize(double width, double height)
  • padding(Insets insets)
  • padding(double value)
  • spacing(double value)
  • align(Pos pos)
  • fillWidth()
  • fillHeight()
  • text(String value)
  • visible(boolean value)
  • enabled(boolean value)
  • cssClass(String className)
  • style(String inlineStyle)
  • anchorFill()

DervaRoot

Root overlay/container element backed by AnchorPane.

Methods

  • getPane()
  • add(DervaElement<?> child)
  • remove(DervaElement<?> child)
  • clear()

DervaPanel

Simple vertical panel backed by VBox.

Methods

  • add(DervaElement<?> child)
  • remove(DervaElement<?> child)
  • clear()

DervaVBox

Vertical layout backed by VBox.

Methods

  • add(DervaElement<?> child)
  • remove(DervaElement<?> child)
  • clear()
  • spacing(double value)
  • padding(Insets padding)
  • padding(double value)
  • alignment(Pos alignment)

DervaHBox

Horizontal layout backed by HBox.

Methods

  • add(DervaElement<?> child)
  • remove(DervaElement<?> child)
  • clear()
  • spacing(double value)
  • padding(Insets padding)
  • padding(double value)
  • alignment(Pos alignment)

DervaLabel

Thin wrapper around JavaFX Label.

DervaButton

Thin wrapper around JavaFX Button.

Methods

  • onClick(Runnable action)

DervaTextField

Thin wrapper around JavaFX TextField.

Methods

  • text(String value)
  • value()
  • prompt(String value)
  • editable(boolean value)

DervaTextArea

Thin wrapper around JavaFX TextArea.

Methods

  • text(String value)
  • value()
  • prompt(String value)
  • editable(boolean value)
  • wrap(boolean value)

DervaCheckBox

Thin wrapper around JavaFX CheckBox.

Methods

  • text(String value)
  • selected()
  • selected(boolean value)

DervaComboBox

Thin wrapper around JavaFX ComboBox<String>.

Methods

  • items(Collection<String> values)
  • item(String value)
  • value()
  • value(String value)
  • prompt(String value)
  • editable(boolean value)

DervaWindow

Floating window wrapper with a title bar, close button, and drag support.

Methods

  • text(String value)
  • draggable(boolean value)
  • add(DervaElement<?> child)
  • remove(DervaElement<?> child)
  • clear()
  • padding(Insets padding)
  • spacing(double value)
  • align(Pos alignment)
  • fillWidth()
  • size(double width, double height)

DervaTheme

Theme descriptor for stylesheet-based scene theming.

Methods

  • of(String name)
  • dark()
  • name()
  • stylesheetResource()
  • stylesheetResource(String stylesheetResource)