Class Ui
java.lang.Object
io.github.jbastgen.stemma.app.ui.widget.Ui
Small factory helpers for the controls used throughout the UI.
-
Method Summary
Modifier and TypeMethodDescriptionstatic javafx.scene.control.Buttonstatic javafx.scene.control.ButtonA button with an icon in front of its text; the icon follows the text colour of the variant.static javafx.scene.layout.RegionA round dot in a colour of the theme.static javafx.scene.control.Labelellipsis(javafx.scene.control.Label l) A label that shrinks with an ellipsis instead of forcing its container wider.static javafx.scene.layout.Regionfixed(double w, double h) A region of a fixed size.static StringStyle string for custom nodes (inputs etc.).static javafx.scene.layout.HBoxhbox(double gap, javafx.geometry.Pos pos, javafx.scene.Node... children) A row of nodes.static javafx.scene.control.ButtoniconButton(String path, double iconSize, String variant, String tooltip, Runnable action) A button with an icon only; the variant names the style, the tool tip is not translated here.static javafx.scene.control.TextFieldA one-line input with a translated prompt.static javafx.scene.control.LabelA translated label in the Geist font; the token names the colour of the theme.static voidRegisters the bundled Geist fonts.static javafx.scene.control.LabelA label in the monospaced font; not translated.static javafx.scene.layout.StackPanesearchField(javafx.scene.control.TextField field, double width) Search field with a leading magnifier icon.static javafx.scene.layout.Regionspacer()A region that takes the room that is left in a row.static javafx.scene.control.ProgressIndicatorspinner(double size) A small spinner that shows something runs in the background.static javafx.scene.layout.Regionvline(double h, double hMargin) A thin vertical line.
-
Method Details
-
loadFonts
public static void loadFonts()Registers the bundled Geist fonts. Safe to call repeatedly. -
label
A translated label in the Geist font; the token names the colour of the theme. -
mono
A label in the monospaced font; not translated. -
font
Style string for custom nodes (inputs etc.). -
ellipsis
public static javafx.scene.control.Label ellipsis(javafx.scene.control.Label l) A label that shrinks with an ellipsis instead of forcing its container wider. -
spacer
public static javafx.scene.layout.Region spacer()A region that takes the room that is left in a row. -
fixed
public static javafx.scene.layout.Region fixed(double w, double h) A region of a fixed size. -
vline
public static javafx.scene.layout.Region vline(double h, double hMargin) A thin vertical line. -
hbox
public static javafx.scene.layout.HBox hbox(double gap, javafx.geometry.Pos pos, javafx.scene.Node... children) A row of nodes. -
button
- Parameters:
variant- one of "primary", "secondary", "ghost", "danger-ghost"
-
spinner
public static javafx.scene.control.ProgressIndicator spinner(double size) A small spinner that shows something runs in the background. -
button
public static javafx.scene.control.Button button(String text, String variant, String iconPath, Runnable action) A button with an icon in front of its text; the icon follows the text colour of the variant. -
iconButton
public static javafx.scene.control.Button iconButton(String path, double iconSize, String variant, String tooltip, Runnable action) A button with an icon only; the variant names the style, the tool tip is not translated here. -
input
A one-line input with a translated prompt. -
searchField
public static javafx.scene.layout.StackPane searchField(javafx.scene.control.TextField field, double width) Search field with a leading magnifier icon. -
dot
A round dot in a colour of the theme.
-