Class MainView
- java.lang.Object
-
- com.palmer.billingstatementgenerator.views.MainView
-
public class MainView extends java.lang.ObjectThe main application view, responsible for assembling the full UI layout. Manages the tab pane, header, button bar, and navigation between tabs. Owns the shared Previous, Clear, and Next buttons and rewires them reactively as the user navigates between tabs.
-
-
Constructor Summary
Constructors Constructor Description MainView()Constructs the main view by creating tabs, the button bar, the layout, and wiring tab selection behavior.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.scene.ParentasParent()Returns the root node of the main view for embedding in aScene.voidfitWindowToLargestTab()Sizes the application window to fit the largest tab by iterating through all tabs, measuring their rendered size, and setting the stage dimensions to the maximum observed width and height.voidskipInstructions()Skips the Instructions tab and selects the Service Information tab directly.voidwireKeyNav(javafx.scene.Scene scene)Wires Alt+Left / Alt+Right to navigate between tabs at the scene level, so the shortcuts work regardless of which control has focus.
-
-
-
Method Detail
-
asParent
public javafx.scene.Parent asParent()
Returns the root node of the main view for embedding in aScene.- Returns:
- the root
Parentnode
-
skipInstructions
public void skipInstructions()
Skips the Instructions tab and selects the Service Information tab directly. Called on non-first launches.
-
wireKeyNav
public void wireKeyNav(javafx.scene.Scene scene)
Wires Alt+Left / Alt+Right to navigate between tabs at the scene level, so the shortcuts work regardless of which control has focus.- Parameters:
scene- the main applicationScene
-
fitWindowToLargestTab
public void fitWindowToLargestTab()
Sizes the application window to fit the largest tab by iterating through all tabs, measuring their rendered size, and setting the stage dimensions to the maximum observed width and height.
-
-