From 74a23da5a216da095744b5c739fec752fefc0135 Mon Sep 17 00:00:00 2001 From: "Notmoo-PC\\Notmoo" Date: Sun, 21 Jan 2018 17:51:38 +0100 Subject: [PATCH] =?UTF-8?q?[CLIENT][DEBUG]=20Ajout=20sysout=20pr=C3=A9-rem?= =?UTF-8?q?plissant=20les=20champs=20host=20et=20port=20pour=20al=20connex?= =?UTF-8?q?ion=20au=20serveur;=20A=20ENLEVER=20UNE=20FOIS=20LA=20PHASE=20D?= =?UTF-8?q?E=20DEBUG=20FINIE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frames/startup_frame/StartupFrameView.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Workspace/client/src/main/java/com/pqt/client/gui/frames/startup_frame/StartupFrameView.java b/Workspace/client/src/main/java/com/pqt/client/gui/frames/startup_frame/StartupFrameView.java index 7dde6fac..747b3948 100644 --- a/Workspace/client/src/main/java/com/pqt/client/gui/frames/startup_frame/StartupFrameView.java +++ b/Workspace/client/src/main/java/com/pqt/client/gui/frames/startup_frame/StartupFrameView.java @@ -28,10 +28,22 @@ public class StartupFrameView implements IFXComponent{ try { mainPane = new VBox(); + //TODO to uncomment + /* Label serverHostLabel = new Label(GUIStringTool.getServerHostLabel()); serverHostTextField = makeTextField(TextField.class); Label serverPortLabel = new Label(GUIStringTool.getServerPortLabel()); serverPortTextField = makeTextField(TextField.class); + /**/ + + //TODO to remove + Label serverHostLabel = new Label(GUIStringTool.getServerHostLabel()); + serverHostTextField = new TextField("localhost"); + serverHostTextField.textProperty().addListener((obs, oldVal, newVal)->ctrl.updateView()); + Label serverPortLabel = new Label(GUIStringTool.getServerPortLabel()); + serverPortTextField = new TextField("8080"); + serverPortTextField.textProperty().addListener((obs, oldVal, newVal)->ctrl.updateView()); + /**/ GridPane serverFieldGridPane = new GridPane(); serverFieldGridPane.add(serverHostLabel, 0, 0); @@ -74,9 +86,7 @@ public class StartupFrameView implements IFXComponent{ private T makeTextField(Class clazz) throws IllegalAccessException, InstantiationException { T ntf = clazz.newInstance(); - ntf.textProperty().addListener((obs, oldVal, newVal)->{ - ctrl.updateView(); - }); + ntf.textProperty().addListener((obs, oldVal, newVal)->ctrl.updateView()); return ntf; }