java.lang.Object
edu.ntnu.idatt1002.k1g4.client.ViewUtil

public class ViewUtil extends Object
The type View util. This will NOT be a view as in the MVC (model, view, controller) structure. We take ideas and principle from the MVC structure, but adapt it to suit our needs. See the project wiki on gitlab https://gitlab.stud.idi.ntnu.no/carljgu/tournament-service/-/wikis/home for how this class relates to the Controllers and Model.
Version:
0.4
Author:
Carl J. Gützkow, Nicolai H. Brand.
  • Constructor Details

    • ViewUtil

      public ViewUtil()
  • Method Details

    • changeScene

      public static void changeScene(String fileName)
      Change scene. Static method that can be called by the respective controllers. Uses the stage in App to change the scene
      Parameters:
      fileName - String the file name
    • setCss

      public static void setCss(String css)
      Sets css.
      Parameters:
      css - the css file
    • getCurrentScene

      public static String getCurrentScene()
      Gets current scene.
      Returns:
      the current scene
    • giveInformation

      public static void giveInformation(String message)
      Give information. Static method that can be called by the respective controllers.
      Parameters:
      message - String: the message
    • giveError

      public static void giveError(String message)
      Give error. Static method that can be called by the respective controllers.
      Parameters:
      message - String: the message
    • getConfirmation

      public static boolean getConfirmation(String message)
      Gets confirmation. Static method that can be called by the respective controllers.
      Parameters:
      message - String: the message
      Returns:
      Boolean the confirmation