Package com.digitizer.ui
Class MainWindow
java.lang.Object
com.digitizer.ui.MainWindow
Main window for the Graph Digitizer application.
Responsible for creating and arranging the high-level UI: menu bar, toolbar,
canvas area, dataset control panel and status bar. This class wires user
interactions (file open, calibration flow, export) to core functionality
and coordinates cross-component communication (e.g., updating the
StatusBar).
Note: The availability of the Auto Trace feature is controlled by a runtime
feature flag. Use the Actions -> "Enable Auto Trace" menu toggle to enable
or disable the Auto Trace button and menu item while the feature is being
refined.
-
Constructor Summary
ConstructorsConstructorDescriptionMainWindow(javafx.stage.Stage primaryStage, CalibrationState calibration, List<Dataset> datasets, int maxDatasets, String[] defaultColors) Constructs a new MainWindow. -
Method Summary
Modifier and TypeMethodDescriptionGets the canvas panel.Gets the status bar for displaying messages.voidInitializes the main window and displays it.
-
Constructor Details
-
MainWindow
public MainWindow(javafx.stage.Stage primaryStage, CalibrationState calibration, List<Dataset> datasets, int maxDatasets, String[] defaultColors) Constructs a new MainWindow.- Parameters:
primaryStage- the JavaFX Stagecalibration- the calibration statedatasets- the datasets to managemaxDatasets- maximum number of datasets alloweddefaultColors- default color palette
-
-
Method Details
-
initialize
public void initialize()Initializes the main window and displays it.Creates
CanvasPanel,ControlPanel, andStatusBarand configures menus, accessibility, keyboard shortcuts and persistent themes. This method must be called from the JavaFX application thread. -
getStatusBar
Gets the status bar for displaying messages.- Returns:
- the StatusBar component
-
getCanvasPanel
Gets the canvas panel.- Returns:
- the CanvasPanel component
-