Class FxFormKit
java.lang.Object
privbot.ui.fx.FxFormKit
Layout and styling helpers for PrivBot JavaFX settings pages.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classWraps aTextAreain a column with a bottom drag grip so the user can resize height (compact default; does not auto-grow with text — content scrolls inside until extended). -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddFormRow(javafx.scene.layout.GridPane grid, int row, String labelText, javafx.scene.Node field) Adds a right-aligned label in column 0 andfieldin column 1 ofrow.static voidapplyFastVerticalScroll(javafx.scene.control.ScrollPane scroll, double speedMultiplier) Makes the outer pageScrollPanerespond faster to mouse wheel / trackpad (studio-wide).static voidapplyToggleStyle(javafx.scene.control.ToggleButton tb) Sets the on/off style class from the toggle's selected state; call it after each change.static javafx.scene.layout.VBoxbuildPageWithScroll(String title, String subtitle, javafx.scene.Node body, javafx.scene.Node footer) Page chrome: title, subtitle, scrollable body, optional footer below the scroll area.static javafx.scene.layout.GridPaneformGrid()An empty two-column label/field grid foraddFormRow(javafx.scene.layout.GridPane, int, java.lang.String, javafx.scene.Node).static booleanisMultilineField(javafx.scene.Node field) True for aTextAreaor aresizableListEditor(double, double, double)wrapper.static StringCollapse newlines/extra spaces so config stays one-line comma lists (multi-line editor friendly).static FxFormKit.ResizableMultilineresizableListEditor(double minHeight, double prefHeight, double maxHeight) static javafx.scene.layout.VBoxsectionCardShell(String title, String subtitle) A whitesection-cardwith a title and wrapped subtitle; add rows to its children.static <T> voidsetSpinnerValueIfNotEditing(javafx.scene.control.Spinner<T> spinner, T value) Updates spinner value only when the spinner/editor is not actively focused.static voidsetTextIfNotFocused(javafx.scene.control.TextInputControl field, String value) Updates text only when the control is not actively focused by the user.
-
Method Details
-
normalizeInlineList
-
setTextIfNotFocused
Updates text only when the control is not actively focused by the user. -
setSpinnerValueIfNotEditing
public static <T> void setSpinnerValueIfNotEditing(javafx.scene.control.Spinner<T> spinner, T value) Updates spinner value only when the spinner/editor is not actively focused. -
formGrid
public static javafx.scene.layout.GridPane formGrid()An empty two-column label/field grid foraddFormRow(javafx.scene.layout.GridPane, int, java.lang.String, javafx.scene.Node). Build JavaFX nodes on the FX thread. -
addFormRow
public static void addFormRow(javafx.scene.layout.GridPane grid, int row, String labelText, javafx.scene.Node field) Adds a right-aligned label in column 0 andfieldin column 1 ofrow. Inputs stretch to the column width; labels keep their natural width; multi-line fields align to the top. -
isMultilineField
public static boolean isMultilineField(javafx.scene.Node field) True for aTextAreaor aresizableListEditor(double, double, double)wrapper. -
resizableListEditor
public static FxFormKit.ResizableMultiline resizableListEditor(double minHeight, double prefHeight, double maxHeight) - Parameters:
minHeight- floor height when dragging smaller (px)prefHeight- initial height (px)maxHeight- ceiling when dragging larger (px)
-
applyFastVerticalScroll
public static void applyFastVerticalScroll(javafx.scene.control.ScrollPane scroll, double speedMultiplier) Makes the outer pageScrollPanerespond faster to mouse wheel / trackpad (studio-wide). -
sectionCardShell
-
applyToggleStyle
public static void applyToggleStyle(javafx.scene.control.ToggleButton tb) Sets the on/off style class from the toggle's selected state; call it after each change. -
buildPageWithScroll
-