Class WelcomePageController

java.lang.Object
View.bookscrabbleapp.WelcomePageController
All Implemented Interfaces:
Observer, javafx.fxml.Initializable

public class WelcomePageController extends Object implements Observer, javafx.fxml.Initializable
  • Constructor Details

    • WelcomePageController

      public WelcomePageController()
  • Method Details

    • joinBtnHandler

      public void joinBtnHandler()
      button handler that presents the Input fields for joining an existing lobby
    • createBtnHandler

      public void createBtnHandler()
      button handler that presents the Input fields for creating a lobby
    • initBtnHandler

      public void initBtnHandler(javafx.event.ActionEvent actionEvent)
      this function validates the user's input and if no problems with the input were detected,asks permission from the hostServer to connect ,and redirects the user to the lobby page
      Parameters:
      actionEvent - - the event that we caught
    • initialize

      public void initialize(URL url, ResourceBundle resourceBundle)
      sets background image to the front page of the app sets this class as an observer of the ViewModel
      Specified by:
      initialize in interface javafx.fxml.Initializable
    • update

      public void update(Observable o, Object arg)
      Specified by:
      update in interface Observer
      Parameters:
      o - the observable object.
      arg - an argument passed to the notifyObservers method. example of usage: methodName:argument1,argument2,argument3....argumentn