Class MainWindow

java.lang.Object
com.digitizer.ui.MainWindow

public class MainWindow extends Object
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 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 Stage
      calibration - the calibration state
      datasets - the datasets to manage
      maxDatasets - maximum number of datasets allowed
      defaultColors - default color palette
  • Method Details

    • initialize

      public void initialize()
      Initializes the main window and displays it.

      Creates CanvasPanel, ControlPanel, and StatusBar and configures menus, accessibility, keyboard shortcuts and persistent themes. This method must be called from the JavaFX application thread.

    • getStatusBar

      public StatusBar getStatusBar()
      Gets the status bar for displaying messages.
      Returns:
      the StatusBar component
    • getCanvasPanel

      public CanvasPanel getCanvasPanel()
      Gets the canvas panel.
      Returns:
      the CanvasPanel component