Class SwingFormKit
java.lang.Object
privbot.ui.SwingFormKit
Swing form layout + button styling helpers shared across plugins (sidebar panels, Swing dialogs).
Delegates grid form layout to
ModernTheme where possible.-
Method Summary
Modifier and TypeMethodDescriptionstatic intaddFormRow(JPanel form, int row, String labelText, JComponent component) ModernTheme.addFormRow(javax.swing.JPanel, int, java.lang.String, javax.swing.JComponent): adds a label + input row and returns the next row index.static JPanelstatic JPanelcreateInlineField(String label, JComponent field) Label + field on one row (used by gear delay grids).static JScrollPanecreateScrollPane(Component view) static JPanelstatic JLabelcreateValueLabel(String text) A body-text label for read-only values.static voidsetSpinnerValueIfNotEditing(JSpinner spinner, int value) Setsvalueunless the user is typing in the spinner, so a periodic refresh does not overwrite a half-entered number.static voidstyleDangerButton(JButton btn) Restyles a plainJButtonas a red danger button.static voidstyleInput(JComponent component) static voidRestyles a plainJButtonas a primary (indigo) button.static voidRestyles a plainJButtonas an outlined secondary button.static voidstyleToggle(JComponent toggle) Input styling for a toggle button or checkbox; other components getstyleInput(javax.swing.JComponent).static JComponentwrapSectionBlock(JComponent component)
-
Method Details
-
createFormPanel
-
addFormRow
ModernTheme.addFormRow(javax.swing.JPanel, int, java.lang.String, javax.swing.JComponent): adds a label + input row and returns the next row index. -
wrapSectionBlock
-
createSectionBody
-
createScrollPane
-
createValueLabel
-
createInlineField
Label + field on one row (used by gear delay grids). -
styleInput
-
styleToggle
Input styling for a toggle button or checkbox; other components getstyleInput(javax.swing.JComponent). -
stylePrimaryButton
-
styleSecondaryButton
-
styleDangerButton
-
setSpinnerValueIfNotEditing
Setsvalueunless the user is typing in the spinner, so a periodic refresh does not overwrite a half-entered number.
-