java.lang.Object
edu.ntnu.idatt1002.k1g4.client.ViewUtil
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidchangeScene(String fileName) Change scene.static booleangetConfirmation(String message) Gets confirmation.static StringGets current scene.static voidGive error.static voidgiveInformation(String message) Give information.static voidSets css.
-
Constructor Details
-
ViewUtil
public ViewUtil()
-
-
Method Details
-
changeScene
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
Sets css.- Parameters:
css- the css file
-
getCurrentScene
Gets current scene.- Returns:
- the current scene
-
giveInformation
Give information. Static method that can be called by the respective controllers.- Parameters:
message- String: the message
-
giveError
Give error. Static method that can be called by the respective controllers.- Parameters:
message- String: the message
-
getConfirmation
Gets confirmation. Static method that can be called by the respective controllers.- Parameters:
message- String: the message- Returns:
- Boolean the confirmation
-