java.lang.Object
de.seggebaeing.sqlanalyzer.presentation.uielements.window.TitledInitializableWindow
All Implemented Interfaces:
javafx.fxml.Initializable
Direct Known Subclasses:
BDOWindow, EvaluationSettingsController, GenerationSettingsController, HelpWindow, HomeController, WorkerWindow

public abstract class TitledInitializableWindow extends Object implements javafx.fxml.Initializable
Abstract base class for titled JavaFX FXML controllers/windows. Provides common wiring for an optional “help” control, window closing, and convenient access to the root node and owning Stage. Subclasses must supply a title via getTitle() and are expected to declare root and (optionally) helpControl in their FXML. Use on the JavaFX Application Thread.
Since:
1.0
Author:
Felix Seggebäing
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected javafx.scene.layout.Region
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Requests this window to close by firing a WindowEvent.WINDOW_CLOSE_REQUEST on the owning Stage.
    protected void
    enableHelp(String htmlFileName)
    Enables the window’s help affordance by wiring the configured help control to open a help window for the given HTML resource and by setting a tooltip.
    javafx.scene.layout.Region
    Returns the FXML-injected root region of this window/controller.
    javafx.stage.Stage
    Resolves the owning Stage from this controller’s root node.
    abstract String
    Returns the window title to display (e.g., in the stage title bar).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface javafx.fxml.Initializable

    initialize
  • Field Details

    • root

      protected javafx.scene.layout.Region root
  • Constructor Details

    • TitledInitializableWindow

      public TitledInitializableWindow()
  • Method Details

    • getTitle

      public abstract String getTitle()
      Returns the window title to display (e.g., in the stage title bar).
      Returns:
      the human-readable title string; subclasses provide the value
    • enableHelp

      protected void enableHelp(String htmlFileName)
      Enables the window’s help affordance by wiring the configured help control to open a help window for the given HTML resource and by setting a tooltip. Uses an action handler for Button controls, otherwise a mouse click handler.
      Parameters:
      htmlFileName - the help document identifier or file name
      Throws:
      IllegalStateException - if no helpControl is available
      Implementation Note:
      Must be invoked on the JavaFX Application Thread.
    • closeWindow

      protected void closeWindow()
      Requests this window to close by firing a WindowEvent.WINDOW_CLOSE_REQUEST on the owning Stage. Logs an error if the stage cannot be resolved.
      Implementation Note:
      Invoke on the JavaFX Application Thread.
    • getStage

      public javafx.stage.Stage getStage()
      Resolves the owning Stage from this controller’s root node.
      Returns:
      the stage if the scene/window is attached; null otherwise
      Implementation Note:
      Invoke on the JavaFX Application Thread.
    • getRoot

      public javafx.scene.layout.Region getRoot()
      Returns the FXML-injected root region of this window/controller.
      Returns:
      the root Region; may be null before FXML initialization