Class FxStudioShell.Builder
java.lang.Object
privbot.ui.fx.FxStudioShell.Builder
- Enclosing class:
FxStudioShell
Describes a studio;
build() creates the window (hidden) on the EDT. Defaults: title
"Settings", brand "PrivBot / Studio", 920 x 780, Done-only footer unless
onSave/onCancel are set.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddConfigSections(net.runelite.client.config.Config config, net.runelite.client.config.ConfigManager configManager) One generated page per@ConfigSection, or a single Settings page.addFxSection(String id, String navLabel, String pageTitle, String pageSubtitle, Supplier<javafx.scene.Node> fxBodySupplier, boolean wrapInScrollPane) A JavaFX page (e.g.addSwingSection(String id, String navLabel, String pageTitle, String pageSubtitle, JComponent swingBody, boolean wrapInScrollPane) A legacy Swing page; the shell draws its heading and frames the panel.Masthead:brandTitlebecomes the mark and name,brandSubtitlethe product line.build()Creates the shell and assembles its window on the EDT (waiting when called elsewhere).footerText(String footerText) The note shown in the footer, e.g.modal(boolean modal) Ignored — the studio is always non-modal.Runs on the Swing EDT before the window is closed.Runs on the Swing EDT before the window is closed.Ignored — the studio is always a non-modalJFrame.runningIndicator(BooleanSupplier running) Shows an "Automation running / stopped" pill in the masthead, polled once a second on the FX thread.size(int width, int height) Window size in pixels; preferstandardSize().windowTitle(String windowTitle) The OS window title; must not be null.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
owner
Ignored — the studio is always a non-modalJFrame. Kept for source compatibility. -
modal
Ignored — the studio is always non-modal. Kept for source compatibility. -
windowTitle
The OS window title; must not be null. -
brand
Masthead:brandTitlebecomes the mark and name,brandSubtitlethe product line. -
size
Window size in pixels; preferstandardSize(). -
standardSize
-
runningIndicator
Shows an "Automation running / stopped" pill in the masthead, polled once a second on the FX thread. Pass a supplier that reads published state (e.g.plugin::isEnabled), never the client. -
addConfigSections
public FxStudioShell.Builder addConfigSections(net.runelite.client.config.Config config, net.runelite.client.config.ConfigManager configManager) One generated page per@ConfigSection, or a single Settings page. -
onSave
Runs on the Swing EDT before the window is closed. Adds a Save action to the footer. -
onCancel
Runs on the Swing EDT before the window is closed. -
addSwingSection
public FxStudioShell.Builder addSwingSection(String id, String navLabel, String pageTitle, String pageSubtitle, JComponent swingBody, boolean wrapInScrollPane) A legacy Swing page; the shell draws its heading and frames the panel. -
addFxSection
public FxStudioShell.Builder addFxSection(String id, String navLabel, String pageTitle, String pageSubtitle, Supplier<javafx.scene.Node> fxBodySupplier, boolean wrapInScrollPane) A JavaFX page (e.g.FxFormKitcards). The supplier runs on the JavaFX thread the first time the section is shown. The shell drawspageTitle/pageSubtitle; the body should not repeat them. -
build
Creates the shell and assembles its window on the EDT (waiting when called elsewhere). The window stays hidden untilFxStudioShell.show().- Throws:
IllegalStateException- with no sections or a duplicate section id
-