diff --git a/src/main/java/io/bitsquare/gui/bitsquare.css b/src/main/java/io/bitsquare/gui/bitsquare.css
index 18637a3e0e..90c576214e 100644
--- a/src/main/java/io/bitsquare/gui/bitsquare.css
+++ b/src/main/java/io/bitsquare/gui/bitsquare.css
@@ -6,7 +6,8 @@ main bg grey: dddddd
content bg grey: f4f4f4
*/
-/* Create offer screen */
+
+/* Create offer */
#input-description-label {
-fx-font-size: 11;
-fx-alignment: center;
@@ -27,12 +28,78 @@ content bg grey: f4f4f4
-fx-border-insets: 0 0 0 -2;
}
-/* Splash screen */
+/* Registration */
+#wizard-title-deactivated {
+ -fx-font-weight: bold;
+ -fx-font-size: 16;
+ -fx-text-fill: #ccc;
+}
+#wizard-title-active {
+ -fx-font-weight: bold;
+ -fx-font-size: 16;
+ -fx-text-fill: #000;
+}
+#wizard-title-completed {
+ -fx-font-weight: bold;
+ -fx-font-size: 16;
+ -fx-text-fill: #000;
+}
+
+#wizard-sub-title-deactivated {
+ -fx-text-fill: #ccc;
+}
+#wizard-sub-title-active {
+ -fx-text-fill: #000;
+}
+#wizard-sub-title-completed {
+ -fx-text-fill: #000;
+}
+
+#wizard-item-background-deactivated {
+ -fx-body-color: linear-gradient(to bottom, #f4f4f4, #F0F0F0);
+ -fx-outer-border: linear-gradient(to bottom, #ddd, #ccc);
+ -fx-background-color: -fx-shadow-highlight-color,
+ -fx-outer-border,
+ -fx-inner-border,
+ -fx-body-color;
+ -fx-background-insets: 0 0 -1 0, 0, 1, 2;
+ -fx-background-radius: 3px, 3px, 2px, 1px;
+}
+#wizard-item-background-active {
+ -fx-body-color: linear-gradient(to bottom, #f1f6f7, #e7f5f9);
+ -fx-outer-border: linear-gradient(to bottom, #b5e1ef, #6aa4b6);
+ -fx-background-color: -fx-shadow-highlight-color,
+ -fx-outer-border,
+ -fx-inner-border,
+ -fx-body-color;
+ -fx-background-insets: 0 0 -1 0, 0, 1, 2;
+ -fx-background-radius: 3px, 3px, 2px, 1px;
+}
+
+#wizard-item-background-active:hover {
+ -fx-body-color: linear-gradient(to bottom, #d2e2e6, #dfe9eb);
+ -fx-cursor: hand;
+}
+
+#wizard-item-background-completed {
+ -fx-body-color: linear-gradient(to bottom, #f4f4f4, #F0F0F0);
+ -fx-outer-border: linear-gradient(to bottom, #99ba9c, #619865);
+ -fx-background-color: -fx-shadow-highlight-color,
+ -fx-outer-border,
+ -fx-inner-border,
+ -fx-body-color;
+ -fx-background-insets: 0 0 -1 0, 0, 1, 2;
+ -fx-background-radius: 3px, 3px, 2px, 1px;
+}
+
+
+
+/* Splash */
#splash {
-fx-background-color: #ffffff;
}
-/* Mmain UI screen */
+/* Mmain UI */
#logo-sub-title-label {
-fx-font-weight: bold;
-fx-font-size: 24;
diff --git a/src/test/java/io/bitsquare/gui/registration/uimock/FundRegistrationWalletControllerUIMock.java b/src/test/java/io/bitsquare/gui/registration/uimock/FundRegistrationWalletControllerUIMock.java
new file mode 100644
index 0000000000..70695c67cf
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/registration/uimock/FundRegistrationWalletControllerUIMock.java
@@ -0,0 +1,39 @@
+/*
+ * This file is part of Bitsquare.
+ *
+ * Bitsquare is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bitsquare is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bitsquare. If not, see .
+ */
+
+package io.bitsquare.gui.registration.uimock;
+
+import java.net.URL;
+
+import java.util.ResourceBundle;
+
+import javafx.fxml.Initializable;
+
+public class FundRegistrationWalletControllerUIMock implements Initializable {
+
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ // Lifecycle
+ ///////////////////////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void initialize(URL url, ResourceBundle rb) {
+ }
+
+
+}
+
diff --git a/src/test/java/io/bitsquare/gui/registration/uimock/FundRegistrationWalletUIMockRunner.java b/src/test/java/io/bitsquare/gui/registration/uimock/FundRegistrationWalletUIMockRunner.java
new file mode 100644
index 0000000000..0afd5e3e58
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/registration/uimock/FundRegistrationWalletUIMockRunner.java
@@ -0,0 +1,87 @@
+package io.bitsquare.gui.registration.uimock;
+
+import io.bitsquare.di.BitSquareModule;
+import io.bitsquare.di.GuiceFXMLLoader;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+import java.io.IOException;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javafx.application.Application;
+import javafx.scene.*;
+import javafx.scene.input.*;
+import javafx.scene.layout.*;
+import javafx.stage.Stage;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * For testing single isolated UI screens
+ */
+public class FundRegistrationWalletUIMockRunner extends Application {
+ private static final Logger log = LoggerFactory.getLogger(FundRegistrationWalletUIMockRunner.class);
+ private Scene scene;
+ private Parent view;
+ private Pane pane;
+ private boolean devTest = true;
+
+ public static void main(String[] args) {
+ launch(args);
+ }
+
+ @Override
+ public void start(Stage primaryStage) throws IOException {
+ Injector injector = Guice.createInjector(new BitSquareModule());
+ GuiceFXMLLoader.setInjector(injector);
+
+ pane = new StackPane();
+ scene = new Scene(pane, 1000, 1200);
+ scene.getAccelerators().put(KeyCombination.valueOf("Shortcut+S"), this::loadMainWindow);
+ loadMainWindow();
+ primaryStage.setScene(scene);
+ primaryStage.show();
+ }
+
+ public void loadMainWindow() {
+ log.debug("re load");
+ pane.getChildren().removeAll();
+ GuiceFXMLLoader loader = new GuiceFXMLLoader(
+ getUrl("/io/bitsquare/gui/registration/uimock/FundRegistrationWalletViewUIMock.fxml"), false);
+
+ try {
+ view = loader.load();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ pane.getChildren().setAll(view);
+ refreshStylesheets();
+ }
+
+ private void refreshStylesheets() {
+ scene.getStylesheets().clear();
+ scene.getStylesheets().setAll(getUrl("/io/bitsquare/gui/bitsquare.css").toExternalForm());
+ }
+
+ private URL getUrl(String subPath) {
+ if (devTest) {
+ try {
+ // load from file system location to make a reload possible. makes dev process easier with hot reload
+ return new URL("file:///Users/mk/Documents/_intellij/bitsquare/src/test/java" + subPath);
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+ else {
+ return getClass().getResource(subPath);
+ }
+ }
+
+
+}
diff --git a/src/test/java/io/bitsquare/gui/registration/uimock/FundRegistrationWalletViewUIMock.fxml b/src/test/java/io/bitsquare/gui/registration/uimock/FundRegistrationWalletViewUIMock.fxml
new file mode 100644
index 0000000000..236f4c532e
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/registration/uimock/FundRegistrationWalletViewUIMock.fxml
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/java/io/bitsquare/gui/registration/uimock/RegistrationControllerUIMock.java b/src/test/java/io/bitsquare/gui/registration/uimock/RegistrationControllerUIMock.java
new file mode 100644
index 0000000000..eb39b2c85c
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/registration/uimock/RegistrationControllerUIMock.java
@@ -0,0 +1,58 @@
+/*
+ * This file is part of Bitsquare.
+ *
+ * Bitsquare is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bitsquare is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bitsquare. If not, see .
+ */
+
+package io.bitsquare.gui.registration.uimock;
+
+import java.net.URL;
+
+import java.util.ResourceBundle;
+
+import javax.inject.Inject;
+
+import javafx.event.EventHandler;
+import javafx.fxml.Initializable;
+import javafx.scene.input.*;
+import javafx.scene.layout.*;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class RegistrationControllerUIMock implements Initializable {
+ private static final Logger log = LoggerFactory.getLogger(RegistrationControllerUIMock.class);
+ public HBox prefBox;
+ public Pane content;
+
+
+ @Inject
+ private RegistrationControllerUIMock() {
+ }
+
+ @Override
+ public void initialize(URL url, ResourceBundle rb) {
+ prefBox.setOnMouseClicked(new EventHandler() {
+ @Override
+ public void handle(MouseEvent mouseEvent) {
+ content.getChildren().remove(0);
+
+ }
+ });
+
+ }
+
+
+}
+
diff --git a/src/test/java/io/bitsquare/gui/registration/uimock/RegistrationUIMockRunner.java b/src/test/java/io/bitsquare/gui/registration/uimock/RegistrationUIMockRunner.java
new file mode 100644
index 0000000000..3166ba544d
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/registration/uimock/RegistrationUIMockRunner.java
@@ -0,0 +1,88 @@
+package io.bitsquare.gui.registration.uimock;
+
+import io.bitsquare.di.BitSquareModule;
+import io.bitsquare.di.GuiceFXMLLoader;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+import java.io.IOException;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javafx.application.Application;
+import javafx.scene.*;
+import javafx.scene.input.*;
+import javafx.scene.layout.*;
+import javafx.stage.Stage;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * For testing single isolated UI screens
+ */
+public class RegistrationUIMockRunner extends Application {
+ private static final Logger log = LoggerFactory.getLogger(RegistrationUIMockRunner.class);
+ private Scene scene;
+ private Parent view;
+ private Pane pane;
+ private boolean devTest = true;
+
+ public static void main(String[] args) {
+ launch(args);
+ }
+
+ @Override
+ public void start(Stage primaryStage) throws IOException {
+ Injector injector = Guice.createInjector(new BitSquareModule());
+ GuiceFXMLLoader.setInjector(injector);
+
+ pane = new StackPane();
+ scene = new Scene(pane, 1000, 660);
+ scene.getAccelerators().put(KeyCombination.valueOf("Shortcut+S"), this::loadMainWindow);
+ loadMainWindow();
+ primaryStage.setScene(scene);
+ primaryStage.show();
+ }
+
+ public void loadMainWindow() {
+ log.debug("re load");
+ pane.getChildren().removeAll();
+ GuiceFXMLLoader loader = new GuiceFXMLLoader(
+ getUrl("/io/bitsquare/gui/registration/uimock/RegistrationViewUIMock.fxml"), false);
+
+ try {
+ view = loader.load();
+ } catch (IOException e) {
+ log.error(e.getMessage());
+ e.printStackTrace();
+ }
+
+ pane.getChildren().setAll(view);
+ refreshStylesheets();
+ }
+
+ private void refreshStylesheets() {
+ scene.getStylesheets().clear();
+ scene.getStylesheets().setAll(getUrl("/io/bitsquare/gui/bitsquare.css").toExternalForm());
+ }
+
+ private URL getUrl(String subPath) {
+ if (devTest) {
+ try {
+ // load from file system location to make a reload possible. makes dev process easier with hot reload
+ return new URL("file:///Users/mk/Documents/_intellij/bitsquare/src/test/java" + subPath);
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+ else {
+ return getClass().getResource(subPath);
+ }
+ }
+
+
+}
diff --git a/src/test/java/io/bitsquare/gui/registration/uimock/RegistrationViewUIMock.fxml b/src/test/java/io/bitsquare/gui/registration/uimock/RegistrationViewUIMock.fxml
new file mode 100644
index 0000000000..974ed015a8
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/registration/uimock/RegistrationViewUIMock.fxml
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/java/io/bitsquare/gui/registration/uimock/SetPasswordControllerUIMock.java b/src/test/java/io/bitsquare/gui/registration/uimock/SetPasswordControllerUIMock.java
new file mode 100644
index 0000000000..ce56f240a6
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/registration/uimock/SetPasswordControllerUIMock.java
@@ -0,0 +1,39 @@
+/*
+ * This file is part of Bitsquare.
+ *
+ * Bitsquare is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bitsquare is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bitsquare. If not, see .
+ */
+
+package io.bitsquare.gui.registration.uimock;
+
+import java.net.URL;
+
+import java.util.ResourceBundle;
+
+import javafx.fxml.Initializable;
+
+public class SetPasswordControllerUIMock implements Initializable {
+
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ // Lifecycle
+ ///////////////////////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void initialize(URL url, ResourceBundle rb) {
+ }
+
+
+}
+
diff --git a/src/test/java/io/bitsquare/gui/registration/uimock/SetPasswordUIMockRunner.java b/src/test/java/io/bitsquare/gui/registration/uimock/SetPasswordUIMockRunner.java
new file mode 100644
index 0000000000..722c1b8ee0
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/registration/uimock/SetPasswordUIMockRunner.java
@@ -0,0 +1,87 @@
+package io.bitsquare.gui.registration.uimock;
+
+import io.bitsquare.di.BitSquareModule;
+import io.bitsquare.di.GuiceFXMLLoader;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+import java.io.IOException;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javafx.application.Application;
+import javafx.scene.*;
+import javafx.scene.input.*;
+import javafx.scene.layout.*;
+import javafx.stage.Stage;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * For testing single isolated UI screens
+ */
+public class SetPasswordUIMockRunner extends Application {
+ private static final Logger log = LoggerFactory.getLogger(SetPasswordUIMockRunner.class);
+ private Scene scene;
+ private Parent view;
+ private Pane pane;
+ private boolean devTest = true;
+
+ public static void main(String[] args) {
+ launch(args);
+ }
+
+ @Override
+ public void start(Stage primaryStage) throws IOException {
+ Injector injector = Guice.createInjector(new BitSquareModule());
+ GuiceFXMLLoader.setInjector(injector);
+
+ pane = new StackPane();
+ scene = new Scene(pane, 1000, 1200);
+ scene.getAccelerators().put(KeyCombination.valueOf("Shortcut+S"), this::loadMainWindow);
+ loadMainWindow();
+ primaryStage.setScene(scene);
+ primaryStage.show();
+ }
+
+ public void loadMainWindow() {
+ log.debug("re load");
+ pane.getChildren().removeAll();
+ GuiceFXMLLoader loader = new GuiceFXMLLoader(
+ getUrl("/io/bitsquare/gui/registration/uimock/SetPasswordViewUIMock.fxml"), false);
+
+ try {
+ view = loader.load();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ pane.getChildren().setAll(view);
+ refreshStylesheets();
+ }
+
+ private void refreshStylesheets() {
+ scene.getStylesheets().clear();
+ scene.getStylesheets().setAll(getUrl("/io/bitsquare/gui/bitsquare.css").toExternalForm());
+ }
+
+ private URL getUrl(String subPath) {
+ if (devTest) {
+ try {
+ // load from file system location to make a reload possible. makes dev process easier with hot reload
+ return new URL("file:///Users/mk/Documents/_intellij/bitsquare/src/test/java" + subPath);
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+ else {
+ return getClass().getResource(subPath);
+ }
+ }
+
+
+}
diff --git a/src/test/java/io/bitsquare/gui/registration/uimock/SetPasswordViewUIMock.fxml b/src/test/java/io/bitsquare/gui/registration/uimock/SetPasswordViewUIMock.fxml
new file mode 100644
index 0000000000..e7672cad07
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/registration/uimock/SetPasswordViewUIMock.fxml
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/java/io/bitsquare/gui/settings/uimock/BankAccountSettingsControllerUIMock.java b/src/test/java/io/bitsquare/gui/settings/uimock/BankAccountSettingsControllerUIMock.java
new file mode 100644
index 0000000000..8fcfff0082
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/settings/uimock/BankAccountSettingsControllerUIMock.java
@@ -0,0 +1,128 @@
+/*
+ * This file is part of Bitsquare.
+ *
+ * Bitsquare is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bitsquare is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bitsquare. If not, see .
+ */
+
+package io.bitsquare.gui.settings.uimock;
+
+import io.bitsquare.bank.BankAccount;
+import io.bitsquare.bank.BankAccountType;
+import io.bitsquare.locale.Country;
+import io.bitsquare.locale.CountryUtil;
+import io.bitsquare.locale.CurrencyUtil;
+import io.bitsquare.locale.Localisation;
+import io.bitsquare.locale.Region;
+
+import java.net.URL;
+
+import java.util.Currency;
+import java.util.ResourceBundle;
+
+import javafx.collections.FXCollections;
+import javafx.fxml.FXML;
+import javafx.fxml.Initializable;
+import javafx.scene.control.*;
+import javafx.util.StringConverter;
+
+public class BankAccountSettingsControllerUIMock implements Initializable {
+
+ @FXML private TextField bankAccountTitleTextField, bankAccountHolderNameTextField, bankAccountPrimaryIDTextField,
+ bankAccountSecondaryIDTextField;
+ @FXML private Button saveBankAccountButton, addBankAccountButton;
+ @FXML private ComboBox bankAccountCountryComboBox;
+ @FXML private ComboBox bankAccountRegionComboBox;
+ @FXML private ComboBox bankAccountComboBox;
+ @FXML private ComboBox bankAccountTypesComboBox;
+ @FXML private ComboBox bankAccountCurrencyComboBox;
+
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ // Lifecycle
+ ///////////////////////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void initialize(URL url, ResourceBundle rb) {
+ initBankAccountComboBox();
+ initBankAccountTypesComboBox();
+ initBankAccountCurrencyComboBox();
+ initBankAccountCountryComboBox();
+ }
+
+ private void initBankAccountComboBox() {
+ bankAccountComboBox.setPromptText("No bank account available");
+ bankAccountComboBox.setDisable(true);
+ }
+
+ private void initBankAccountTypesComboBox() {
+ bankAccountTypesComboBox.setItems(FXCollections.observableArrayList(BankAccountType.getAllBankAccountTypes()));
+ bankAccountTypesComboBox.setConverter(new StringConverter() {
+ @Override
+ public String toString(BankAccountType bankAccountTypeInfo) {
+ return Localisation.get(bankAccountTypeInfo.toString());
+ }
+
+ @Override
+ public BankAccountType fromString(String s) {
+ return null;
+ }
+ });
+ }
+
+ private void initBankAccountCurrencyComboBox() {
+ bankAccountCurrencyComboBox.setItems(FXCollections.observableArrayList(CurrencyUtil.getAllCurrencies()));
+ bankAccountCurrencyComboBox.setConverter(new StringConverter() {
+ @Override
+ public String toString(Currency currency) {
+ return currency.getCurrencyCode() + " (" + currency.getDisplayName() + ")";
+ }
+
+ @Override
+ public Currency fromString(String s) {
+ return null;
+ }
+ });
+ }
+
+ private void initBankAccountCountryComboBox() {
+ bankAccountRegionComboBox.setItems(FXCollections.observableArrayList(CountryUtil.getAllRegions()));
+ bankAccountRegionComboBox.setConverter(new StringConverter() {
+ @Override
+ public String toString(Region region) {
+ return region.getName();
+ }
+
+ @Override
+ public Region fromString(String s) {
+ return null;
+ }
+ });
+
+ bankAccountCountryComboBox.setConverter(new StringConverter() {
+ @Override
+ public String toString(Country country) {
+ return country.getName();
+ }
+
+
+ @Override
+ public Country fromString(String s) {
+ return null;
+ }
+ });
+ }
+
+
+}
+
diff --git a/src/test/java/io/bitsquare/gui/settings/uimock/BankAccountSettingsUIMockRunner.java b/src/test/java/io/bitsquare/gui/settings/uimock/BankAccountSettingsUIMockRunner.java
new file mode 100644
index 0000000000..9fd5a400de
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/settings/uimock/BankAccountSettingsUIMockRunner.java
@@ -0,0 +1,87 @@
+package io.bitsquare.gui.settings.uimock;
+
+import io.bitsquare.di.BitSquareModule;
+import io.bitsquare.di.GuiceFXMLLoader;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+import java.io.IOException;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javafx.application.Application;
+import javafx.scene.*;
+import javafx.scene.input.*;
+import javafx.scene.layout.*;
+import javafx.stage.Stage;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * For testing single isolated UI screens
+ */
+public class BankAccountSettingsUIMockRunner extends Application {
+ private static final Logger log = LoggerFactory.getLogger(BankAccountSettingsUIMockRunner.class);
+ private Scene scene;
+ private Parent view;
+ private Pane pane;
+ private boolean devTest = true;
+
+ public static void main(String[] args) {
+ launch(args);
+ }
+
+ @Override
+ public void start(Stage primaryStage) throws IOException {
+ Injector injector = Guice.createInjector(new BitSquareModule());
+ GuiceFXMLLoader.setInjector(injector);
+
+ pane = new StackPane();
+ scene = new Scene(pane, 1000, 1200);
+ scene.getAccelerators().put(KeyCombination.valueOf("Shortcut+S"), this::loadMainWindow);
+ loadMainWindow();
+ primaryStage.setScene(scene);
+ primaryStage.show();
+ }
+
+ public void loadMainWindow() {
+ log.debug("re load");
+ pane.getChildren().removeAll();
+ GuiceFXMLLoader loader = new GuiceFXMLLoader(
+ getUrl("/io/bitsquare/gui/settings/uimock/BankAccountSettingsViewUIMock.fxml"), false);
+
+ try {
+ view = loader.load();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ pane.getChildren().setAll(view);
+ refreshStylesheets();
+ }
+
+ private void refreshStylesheets() {
+ scene.getStylesheets().clear();
+ scene.getStylesheets().setAll(getUrl("/io/bitsquare/gui/bitsquare.css").toExternalForm());
+ }
+
+ private URL getUrl(String subPath) {
+ if (devTest) {
+ try {
+ // load from file system location to make a reload possible. makes dev process easier with hot reload
+ return new URL("file:///Users/mk/Documents/_intellij/bitsquare/src/test/java" + subPath);
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+ else {
+ return getClass().getResource(subPath);
+ }
+ }
+
+
+}
diff --git a/src/test/java/io/bitsquare/gui/settings/uimock/BankAccountSettingsViewUIMock.fxml b/src/test/java/io/bitsquare/gui/settings/uimock/BankAccountSettingsViewUIMock.fxml
new file mode 100644
index 0000000000..76632b684f
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/settings/uimock/BankAccountSettingsViewUIMock.fxml
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/java/io/bitsquare/gui/settings/uimock/RestrictionSettingsControllerUIMock.java b/src/test/java/io/bitsquare/gui/settings/uimock/RestrictionSettingsControllerUIMock.java
new file mode 100644
index 0000000000..4e416b5e0b
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/settings/uimock/RestrictionSettingsControllerUIMock.java
@@ -0,0 +1,39 @@
+/*
+ * This file is part of Bitsquare.
+ *
+ * Bitsquare is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bitsquare is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bitsquare. If not, see .
+ */
+
+package io.bitsquare.gui.settings.uimock;
+
+import java.net.URL;
+
+import java.util.ResourceBundle;
+
+import javafx.fxml.Initializable;
+
+public class RestrictionSettingsControllerUIMock implements Initializable {
+
+
+ ///////////////////////////////////////////////////////////////////////////////////////////
+ // Lifecycle
+ ///////////////////////////////////////////////////////////////////////////////////////////
+
+ @Override
+ public void initialize(URL url, ResourceBundle rb) {
+ }
+
+
+}
+
diff --git a/src/test/java/io/bitsquare/gui/settings/uimock/RestrictionSettingsUIMockRunner.java b/src/test/java/io/bitsquare/gui/settings/uimock/RestrictionSettingsUIMockRunner.java
new file mode 100644
index 0000000000..d5a37bd3eb
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/settings/uimock/RestrictionSettingsUIMockRunner.java
@@ -0,0 +1,87 @@
+package io.bitsquare.gui.settings.uimock;
+
+import io.bitsquare.di.BitSquareModule;
+import io.bitsquare.di.GuiceFXMLLoader;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+import java.io.IOException;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javafx.application.Application;
+import javafx.scene.*;
+import javafx.scene.input.*;
+import javafx.scene.layout.*;
+import javafx.stage.Stage;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * For testing single isolated UI screens
+ */
+public class RestrictionSettingsUIMockRunner extends Application {
+ private static final Logger log = LoggerFactory.getLogger(RestrictionSettingsUIMockRunner.class);
+ private Scene scene;
+ private Parent view;
+ private Pane pane;
+ private boolean devTest = true;
+
+ public static void main(String[] args) {
+ launch(args);
+ }
+
+ @Override
+ public void start(Stage primaryStage) throws IOException {
+ Injector injector = Guice.createInjector(new BitSquareModule());
+ GuiceFXMLLoader.setInjector(injector);
+
+ pane = new StackPane();
+ scene = new Scene(pane, 1000, 1200);
+ scene.getAccelerators().put(KeyCombination.valueOf("Shortcut+S"), this::loadMainWindow);
+ loadMainWindow();
+ primaryStage.setScene(scene);
+ primaryStage.show();
+ }
+
+ public void loadMainWindow() {
+ log.debug("re load");
+ pane.getChildren().removeAll();
+ GuiceFXMLLoader loader = new GuiceFXMLLoader(
+ getUrl("/io/bitsquare/gui/settings/uimock/RestrictionSettingsViewUIMock.fxml"), false);
+
+ try {
+ view = loader.load();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ pane.getChildren().setAll(view);
+ refreshStylesheets();
+ }
+
+ private void refreshStylesheets() {
+ scene.getStylesheets().clear();
+ scene.getStylesheets().setAll(getUrl("/io/bitsquare/gui/bitsquare.css").toExternalForm());
+ }
+
+ private URL getUrl(String subPath) {
+ if (devTest) {
+ try {
+ // load from file system location to make a reload possible. makes dev process easier with hot reload
+ return new URL("file:///Users/mk/Documents/_intellij/bitsquare/src/test/java" + subPath);
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+ else {
+ return getClass().getResource(subPath);
+ }
+ }
+
+
+}
diff --git a/src/test/java/io/bitsquare/gui/settings/uimock/RestrictionSettingsViewUIMock.fxml b/src/test/java/io/bitsquare/gui/settings/uimock/RestrictionSettingsViewUIMock.fxml
new file mode 100644
index 0000000000..c741851db7
--- /dev/null
+++ b/src/test/java/io/bitsquare/gui/settings/uimock/RestrictionSettingsViewUIMock.fxml
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+