diff --git a/client/src/main/java/client/utils/Navigation.java b/client/src/main/java/client/utils/Navigation.java index 6d76ad7..712b5c0 100644 --- a/client/src/main/java/client/utils/Navigation.java +++ b/client/src/main/java/client/utils/Navigation.java @@ -9,15 +9,25 @@ public class Navigation { private final MyFXML myFXML; private Pane screen; + /** + * Constructs a Navigation Object that uses a fxml object and Pane that will allow to switch UI screens + * @param x + * @param y + */ public Navigation(MyFXML x, Pane y){ this.myFXML = x; this.screen = y; } + /** + * The show function takes in an FxmlPath and changes the current pane to the value given by the path + * using the load function of the myFXML object + * @param fxmlpath + */ public void show(String fxmlpath){ - var result = myFXML.load(Object.class, fxmlpath); - Parent UIRoot = result.getValue(); - screen.getChildren().setAll(UIRoot); + var result = myFXML.load(Object.class, fxmlpath); //stores the result of the load method in result + Parent uiRoot = result.getValue(); + screen.getChildren().setAll(uiRoot); }