Package app

Class MainController

java.lang.Object
app.MainController
All Implemented Interfaces:
javafx.fxml.Initializable

public class MainController
extends java.lang.Object
implements javafx.fxml.Initializable
An FXML controller that controls the application and all subcontrollers
  • Constructor Summary

    Constructors
    Constructor Description
    MainController()  
  • Method Summary

    Modifier and Type Method Description
    com.google.common.eventbus.EventBus getEventBus()
    Get the global eventbus
    javafx.application.HostServices getHostServices()
    Get the global Host Services API
    java.util.List<Controller> getInnerControllers()  
    void handle​(ExitApplicationEvent event)
    Handle an exit request for the whole program.
    void handle​(LanguageChangedEvent event)
    Change the CSS according to which language is being used
    void handle​(OpenLinkInBrowserEvent event)
    Open a link in the browser.
    void handle​(ThemeChangedEvent event)
    Change the CSS according to which theme the user chooses
    void initialize​(java.net.URL url, java.util.ResourceBundle resourceBundle)  
    void setHostServices​(javafx.application.HostServices hostServices)
    Set a reference to the global Host Services API

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MainController

      public MainController()
  • Method Details

    • initialize

      public void initialize​(java.net.URL url, java.util.ResourceBundle resourceBundle)
      Specified by:
      initialize in interface javafx.fxml.Initializable
    • getEventBus

      public com.google.common.eventbus.EventBus getEventBus()
      Get the global eventbus
      Returns:
      The EventBus object
    • getHostServices

      public javafx.application.HostServices getHostServices()
      Get the global Host Services API
      Returns:
      The JavaFX HostServices object
      See Also:
      setHostServices(HostServices)
    • getInnerControllers

      public java.util.List<Controller> getInnerControllers()
      Returns:
      All subcontrollers of this controller
    • setHostServices

      public void setHostServices​(javafx.application.HostServices hostServices)
      Set a reference to the global Host Services API
      Parameters:
      hostServices - The JavaFX HostServices object
      See Also:
      getHostServices()
    • handle

      public void handle​(LanguageChangedEvent event)
      Change the CSS according to which language is being used
      Parameters:
      event -
    • handle

      public void handle​(ThemeChangedEvent event)
      Change the CSS according to which theme the user chooses
      Parameters:
      event -
    • handle

      public void handle​(OpenLinkInBrowserEvent event)
      Open a link in the browser.
      Parameters:
      event -
    • handle

      public void handle​(ExitApplicationEvent event)
      Handle an exit request for the whole program. Checking if all is saved before closing the app. The user can either choose to exit or go back to the application and save.
      Parameters:
      event -