mirror of
https://github.com/bisq-network/bisq.git
synced 2025-03-03 02:39:24 +01:00
ui mocks for registration process
This commit is contained in:
parent
4624ebad94
commit
8060ff6a88
16 changed files with 1508 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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) {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ 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 <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane fx:id="root" hgap="5.0" stylesheets="@../../../../../../../main/java/io/bitsquare/gui/bitsquare.css"
|
||||
vgap="5.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
|
||||
AnchorPane.topAnchor="0.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.bitsquare.gui.registration.uimock.FundRegistrationWalletControllerUIMock">
|
||||
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="26.0"/>
|
||||
</padding>
|
||||
|
||||
<children>
|
||||
|
||||
<Pane id="form-group-background-active" fx:id="payFundsPane" visible="true" GridPane.columnSpan="3"
|
||||
GridPane.rowSpan="4">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10.0" left="-10.0" right="-10.0" top="-10.0"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<Label id="form-group-title-active" fx:id="payFundsTitleLabel" layoutX="8" layoutY="-8"
|
||||
text="Pay in the registration fee">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
</Pane>
|
||||
|
||||
<Label fx:id="totalToPayLabel" text="Registration fee:" visible="true">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<TextField fx:id="totalToPayTextField" editable="false" focusTraversable="false" text="0.0002 BTC"
|
||||
visible="true" GridPane.columnIndex="1" GridPane.columnSpan="2">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</TextField>
|
||||
|
||||
<Label fx:id="addressLabel" text="Registration BTC address:" visible="true" GridPane.rowIndex="1"/>
|
||||
<TextField fx:id="addressTextField" editable="false" focusTraversable="false"
|
||||
text="mkpymjfTk7WmG9YC4N9c9h1UzwPvMX3aNG" visible="true" GridPane.columnIndex="1"
|
||||
GridPane.columnSpan="2" GridPane.rowIndex="1"/>
|
||||
|
||||
<Label fx:id="balanceLabel" text="Registration wallet balance:" visible="true" GridPane.rowIndex="2"/>
|
||||
<TextField fx:id="balanceTextField" editable="false" focusTraversable="false" text="0.00 BTC" visible="true"
|
||||
GridPane.columnIndex="1" GridPane.columnSpan="2" GridPane.rowIndex="2">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</TextField>
|
||||
|
||||
<ImageView fx:id="payFundsInfoIcon" fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true"
|
||||
visible="true" GridPane.rowIndex="3" GridPane.valignment="TOP">
|
||||
<image>
|
||||
<Image fx:id="infoIcon" url="@../../../../../../../main/resources/images/info_44.png"/>
|
||||
</image>
|
||||
<GridPane.margin>
|
||||
<Insets right="2.0" top="4.0"/>
|
||||
</GridPane.margin>
|
||||
</ImageView>
|
||||
|
||||
<Label fx:id="payFundsInfoLabel" prefWidth="740.0"
|
||||
text="You need to pay in a minimal registration fee for storing the bank account data as identification in the Bitcoin block chain. This is needed as security measurement and will not leak and privacy. You need to wait for 1 confirmation before you can start active trading. Open the help menu for more information."
|
||||
visible="true" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
|
||||
<Button GridPane.columnIndex="1" GridPane.rowIndex="4" defaultButton="true"
|
||||
text="Complete registration" visible="true">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="30" top="20.0"/>
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
|
||||
|
||||
</children>
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES" minWidth="200"/>
|
||||
<ColumnConstraints hgrow="ALWAYS"/>
|
||||
<ColumnConstraints hgrow="NEVER" prefWidth="25.0"/>
|
||||
</columnConstraints>
|
||||
|
||||
<rowConstraints>
|
||||
<RowConstraints/>
|
||||
<RowConstraints/>
|
||||
<RowConstraints/>
|
||||
<RowConstraints/>
|
||||
</rowConstraints>
|
||||
</GridPane>
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<MouseEvent>() {
|
||||
@Override
|
||||
public void handle(MouseEvent mouseEvent) {
|
||||
content.getChildren().remove(0);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,167 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ 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 <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<BorderPane fx:id="root" prefHeight="660.0" prefWidth="1000.0" style="-fx-background-color: f4f4f4;"
|
||||
stylesheets="@../../../../../../../main/java/io/bitsquare/gui/bitsquare.css"
|
||||
xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.bitsquare.gui.registration.uimock.RegistrationControllerUIMock">
|
||||
<left>
|
||||
|
||||
<VBox spacing="5" prefWidth="300.0" BorderPane.alignment="CENTER">
|
||||
<BorderPane.margin>
|
||||
<Insets left="10.0" top="15.0"/>
|
||||
</BorderPane.margin>
|
||||
<children>
|
||||
|
||||
<HBox id="wizard-item-background-completed" spacing="5" prefWidth="200.0">
|
||||
<children>
|
||||
<ImageView fitHeight="20.0" fitWidth="20.0"
|
||||
pickOnBounds="true" preserveRatio="true">
|
||||
<HBox.margin>
|
||||
<Insets left="8.0" top="8.0"/>
|
||||
</HBox.margin>
|
||||
<image>
|
||||
<Image url="@../../../../../../../main/resources/images/tick.png"/>
|
||||
</image>
|
||||
|
||||
</ImageView>
|
||||
<VBox spacing="1">
|
||||
<HBox.margin>
|
||||
<Insets top="5.0" bottom="8"/>
|
||||
</HBox.margin>
|
||||
<children>
|
||||
|
||||
<Label AnchorPane.topAnchor="0" layoutX="40.0" layoutY="7.0" text="Setup password"
|
||||
id="wizard-title-completed">
|
||||
</Label>
|
||||
<Label id="wizard-sub-title-completed" layoutX="40.0" layoutY="33.0" maxWidth="250.0"
|
||||
text="Protect your wallet with a password."
|
||||
wrapText="true" AnchorPane.bottomAnchor="0"/>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</HBox>
|
||||
|
||||
<HBox id="wizard-item-background-completed" spacing="5" prefWidth="200.0">
|
||||
<children>
|
||||
<ImageView fitHeight="20.0" fitWidth="20.0"
|
||||
pickOnBounds="true" preserveRatio="true">
|
||||
<HBox.margin>
|
||||
<Insets left="8.0" top="8.0"/>
|
||||
</HBox.margin>
|
||||
<image>
|
||||
<Image url="@../../../../../../../main/resources/images/tick.png"/>
|
||||
</image>
|
||||
|
||||
</ImageView>
|
||||
<VBox spacing="1">
|
||||
<HBox.margin>
|
||||
<Insets top="5.0" bottom="8"/>
|
||||
</HBox.margin>
|
||||
<children>
|
||||
|
||||
<Label AnchorPane.topAnchor="0" layoutX="40.0" layoutY="7.0" text="Setup Bank account"
|
||||
id="wizard-title-completed">
|
||||
</Label>
|
||||
<Label id="wizard-sub-title-completed" layoutX="40.0" layoutY="33.0" maxWidth="250.0"
|
||||
text="You need to add the bank account details to your trading account."
|
||||
wrapText="true" AnchorPane.bottomAnchor="0"/>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</HBox>
|
||||
|
||||
<HBox fx:id="prefBox" id="wizard-item-background-active" spacing="5" prefWidth="200.0">
|
||||
<children>
|
||||
<ImageView fitHeight="20.0" fitWidth="20.0"
|
||||
pickOnBounds="true" preserveRatio="true">
|
||||
<HBox.margin>
|
||||
<Insets left="8.0" top="8.0"/>
|
||||
</HBox.margin>
|
||||
<image>
|
||||
<Image url="@../../../../../../../main/resources/images/arrow_blue.png"/>
|
||||
</image>
|
||||
|
||||
</ImageView>
|
||||
<VBox spacing="1">
|
||||
<HBox.margin>
|
||||
<Insets top="5.0" bottom="8"/>
|
||||
</HBox.margin>
|
||||
<children>
|
||||
|
||||
<Label AnchorPane.topAnchor="0" layoutX="40.0" layoutY="7.0"
|
||||
text="Setup your preferences"
|
||||
id="wizard-title-active">
|
||||
</Label>
|
||||
<Label id="wizard-sub-title-active" layoutX="40.0" layoutY="33.0" maxWidth="250.0"
|
||||
text="You need to setup your preferences used for trade restrictions."
|
||||
wrapText="true" AnchorPane.bottomAnchor="0"/>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</HBox>
|
||||
|
||||
<HBox id="wizard-item-background-deactivated" spacing="5" prefWidth="200.0">
|
||||
<children>
|
||||
<ImageView fitHeight="20.0" fitWidth="20.0"
|
||||
pickOnBounds="true" preserveRatio="true">
|
||||
<HBox.margin>
|
||||
<Insets left="8.0" top="8.0"/>
|
||||
</HBox.margin>
|
||||
<image>
|
||||
<Image url="@../../../../../../../main/resources/images/arrow_grey.png"/>
|
||||
</image>
|
||||
|
||||
</ImageView>
|
||||
<VBox spacing="1">
|
||||
<HBox.margin>
|
||||
<Insets top="5.0" bottom="8"/>
|
||||
</HBox.margin>
|
||||
<children>
|
||||
|
||||
<Label AnchorPane.topAnchor="0" layoutX="40.0" layoutY="7.0"
|
||||
text="Register your account"
|
||||
id="wizard-title-deactivated">
|
||||
</Label>
|
||||
<Label id="wizard-sub-title-deactivated" layoutX="40.0" layoutY="33.0" maxWidth="250.0"
|
||||
text="Pay in the registration fee of 0.0002 BTC and store your account in the BTC block chain."
|
||||
wrapText="true" AnchorPane.bottomAnchor="0"/>
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</HBox>
|
||||
|
||||
</children>
|
||||
</VBox>
|
||||
</left>
|
||||
<center>
|
||||
<Pane fx:id="content">
|
||||
<fx:include source="SetPasswordViewUIMock.fxml" visible="false" prefWidth="690"/>
|
||||
<fx:include source="../../settings/uimock/BankAccountSettingsViewUIMock.fxml" visible="false"
|
||||
prefWidth="690"/>
|
||||
<fx:include source="../../settings/uimock/RestrictionSettingsViewUIMock.fxml" visible="false"
|
||||
prefWidth="690"/>
|
||||
<fx:include source="FundRegistrationWalletViewUIMock.fxml" visible="true" prefWidth="690"/>
|
||||
</Pane>
|
||||
</center>
|
||||
</BorderPane>
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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) {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ 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 <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane fx:id="root" hgap="5.0" stylesheets="@../../../../../../../main/java/io/bitsquare/gui/bitsquare.css"
|
||||
vgap="5.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
|
||||
AnchorPane.topAnchor="0.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.bitsquare.gui.registration.uimock.SetPasswordControllerUIMock">
|
||||
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="26.0"/>
|
||||
</padding>
|
||||
|
||||
<children>
|
||||
|
||||
<Pane id="form-group-background-active" fx:id="payFundsPane" visible="true" GridPane.columnSpan="3"
|
||||
GridPane.rowSpan="4">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10.0" left="-10.0" right="-10.0" top="-10.0"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<Label id="form-group-title-active" fx:id="payFundsTitleLabel" layoutX="8" layoutY="-8"
|
||||
text="Setup password">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
</Pane>
|
||||
|
||||
<Label fx:id="totalToPayLabel" text="Enter password:" visible="true">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
|
||||
<PasswordField promptText="Enter password:" GridPane.columnIndex="1" GridPane.columnSpan="2">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</PasswordField>
|
||||
|
||||
<Label fx:id="addressLabel" text="Repeat password:" visible="true" GridPane.rowIndex="1"/>
|
||||
<PasswordField promptText="Repeat password" GridPane.columnIndex="1"
|
||||
GridPane.columnSpan="2" GridPane.rowIndex="1"/>
|
||||
|
||||
<Button GridPane.columnIndex="1" GridPane.rowIndex="2" defaultButton="true"
|
||||
text="Save password" visible="true">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10"/>
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
|
||||
<ImageView fx:id="payFundsInfoIcon" fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true"
|
||||
visible="true" GridPane.rowIndex="3" GridPane.valignment="TOP">
|
||||
<image>
|
||||
<Image fx:id="infoIcon" url="@../../../../../../../main/resources/images/info_44.png"/>
|
||||
</image>
|
||||
<GridPane.margin>
|
||||
<Insets right="2.0" top="4.0"/>
|
||||
</GridPane.margin>
|
||||
</ImageView>
|
||||
|
||||
<Label fx:id="payFundsInfoLabel" prefWidth="740.0"
|
||||
text="Protect your wallet with a strong password. You need to enter the password any time you withdraw Bitcoins from your trading wallets. You can change the password later in the settings. Open the help menu for more information."
|
||||
visible="true" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
|
||||
|
||||
</children>
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="RIGHT" hgrow="SOMETIMES" minWidth="200"/>
|
||||
<ColumnConstraints hgrow="ALWAYS"/>
|
||||
<ColumnConstraints hgrow="NEVER" prefWidth="25.0"/>
|
||||
</columnConstraints>
|
||||
|
||||
<rowConstraints>
|
||||
<RowConstraints/>
|
||||
<RowConstraints/>
|
||||
<RowConstraints/>
|
||||
<RowConstraints/>
|
||||
</rowConstraints>
|
||||
</GridPane>
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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<Country> bankAccountCountryComboBox;
|
||||
@FXML private ComboBox<Region> bankAccountRegionComboBox;
|
||||
@FXML private ComboBox<BankAccount> bankAccountComboBox;
|
||||
@FXML private ComboBox<BankAccountType> bankAccountTypesComboBox;
|
||||
@FXML private ComboBox<Currency> 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<BankAccountType>() {
|
||||
@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<Currency>() {
|
||||
@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<Region>() {
|
||||
@Override
|
||||
public String toString(Region region) {
|
||||
return region.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Region fromString(String s) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
bankAccountCountryComboBox.setConverter(new StringConverter<Country>() {
|
||||
@Override
|
||||
public String toString(Country country) {
|
||||
return country.getName();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Country fromString(String s) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ 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 <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane hgap="5.0" vgap="5.0" fx:id="root"
|
||||
fx:controller="io.bitsquare.gui.settings.uimock.BankAccountSettingsControllerUIMock"
|
||||
stylesheets="@../../../../../../../main/java/io/bitsquare/gui/bitsquare.css"
|
||||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
|
||||
AnchorPane.topAnchor="0.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="26.0"/>
|
||||
</padding>
|
||||
|
||||
<children>
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowSpan="13">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10" left="-10" right="-10" top="-10"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<Label id="form-group-title-active" layoutX="8" layoutY="-8" text="Setup your bank account">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
</Pane>
|
||||
<Label text="Bank account:"/>
|
||||
<ComboBox fx:id="bankAccountComboBox" GridPane.columnIndex="1"/>
|
||||
|
||||
<Label text="Bank account type:" GridPane.rowIndex="1"/>
|
||||
<ComboBox fx:id="bankAccountTypesComboBox" promptText="Select bank account type"
|
||||
GridPane.rowIndex="1" GridPane.columnIndex="1"/>
|
||||
|
||||
<Label text="Bank account title:" GridPane.rowIndex="2"/>
|
||||
<TextField fx:id="bankAccountTitleTextField" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||
|
||||
<Label text="Bank account holder name:" GridPane.rowIndex="3"/>
|
||||
<TextField fx:id="bankAccountHolderNameTextField" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
|
||||
|
||||
<Label text="Bank account primary ID:" GridPane.rowIndex="4"/>
|
||||
<TextField fx:id="bankAccountPrimaryIDTextField" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
|
||||
|
||||
<Label text="Bank account secondary ID:" GridPane.rowIndex="5"/>
|
||||
<TextField fx:id="bankAccountSecondaryIDTextField" GridPane.columnIndex="1" GridPane.rowIndex="5"/>
|
||||
|
||||
<Label text="Bank account currency:" GridPane.rowIndex="6"/>
|
||||
<ComboBox fx:id="bankAccountCurrencyComboBox" promptText="Select currency" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="6"/>
|
||||
|
||||
<Label text="Country of bank account:" GridPane.rowIndex="7"/>
|
||||
<HBox spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="7">
|
||||
<children>
|
||||
<ComboBox fx:id="bankAccountRegionComboBox" prefWidth="150.0"
|
||||
promptText="Select region"/>
|
||||
<ComboBox fx:id="bankAccountCountryComboBox" visible="false" prefWidth="150.0"
|
||||
promptText="Select country"/>
|
||||
</children>
|
||||
</HBox>
|
||||
|
||||
<Button fx:id="saveBankAccountButton" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="8" defaultButton="true"
|
||||
text="Save bank account"/>
|
||||
|
||||
<Separator orientation="HORIZONTAL" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="9"/>
|
||||
|
||||
<Label text="Manage bank accounts:" GridPane.rowIndex="10"/>
|
||||
<HBox spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="10">
|
||||
<children>
|
||||
<Button fx:id="addBankAccountButton" text="Add new bank account" disable="false"/>
|
||||
<Button text="Remove selected bank account"/>
|
||||
</children>
|
||||
</HBox>
|
||||
|
||||
<Separator orientation="HORIZONTAL" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="11"/>
|
||||
<ImageView fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="12"
|
||||
GridPane.valignment="TOP">
|
||||
<image>
|
||||
<Image fx:id="infoIcon" url="@../../../../../../../main/resources/images/info_44.png"/>
|
||||
</image>
|
||||
<GridPane.margin>
|
||||
<Insets right="2.0" top="4.0"/>
|
||||
</GridPane.margin>
|
||||
</ImageView>
|
||||
<Label GridPane.columnIndex="1" GridPane.rowIndex="12" prefWidth="700.0"
|
||||
text="You need to setup at least one bank account which you would like to use for trading. You can also use multiple bank accounts with different currencies. If you want to add later a new bank account you need to pay the registration fee again. The bank account data will be saved in the registration process for identification. You can edit this later in the settings. Open the help menu for further information."
|
||||
wrapText="true">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
|
||||
|
||||
</children>
|
||||
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="RIGHT" hgrow="ALWAYS" minWidth="180"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
</rowConstraints>
|
||||
</GridPane>
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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) {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,177 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
~ 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 <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<GridPane fx:id="root" hgap="5.0" stylesheets="@../../../../../../../main/java/io/bitsquare/gui/bitsquare.css"
|
||||
vgap="5.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="io.bitsquare.gui.settings.uimock.RestrictionSettingsControllerUIMock">
|
||||
|
||||
<padding>
|
||||
<Insets bottom="20.0" left="20.0" right="20.0" top="26.0"/>
|
||||
</padding>
|
||||
|
||||
<children>
|
||||
|
||||
<!--
|
||||
languages
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10" left="-10" right="-10" top="-10"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<Label id="form-group-title-active" layoutX="8" layoutY="-8" text="Add languages">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
</Pane>
|
||||
<Label text="Accepted languages:" GridPane.rowIndex="0" GridPane.valignment="TOP"/>
|
||||
<ListView fx:id="languagesListView" prefHeight="70.0" GridPane.columnIndex="1" GridPane.rowIndex="0"/>
|
||||
<ComboBox fx:id="languageComboBox" prefWidth="150.0" promptText="Add language" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10"/>
|
||||
</GridPane.margin>
|
||||
</ComboBox>
|
||||
|
||||
<ImageView fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="2"
|
||||
GridPane.valignment="TOP">
|
||||
<image>
|
||||
<Image fx:id="infoIcon" url="@../../../../../../../main/resources/images/info_44.png"/>
|
||||
</image>
|
||||
<GridPane.margin>
|
||||
<Insets right="2.0" top="4.0"/>
|
||||
</GridPane.margin>
|
||||
</ImageView>
|
||||
<Label text="Add here all languages you would like to use in case of arbitration .You can edit this later in the settings. Open the help menu for further information."
|
||||
wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
|
||||
<!--
|
||||
countries
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowIndex="4" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10" left="-10" right="-10" top="-10"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<Label id="form-group-title-active" layoutX="8" layoutY="-8" text="Add countries">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets top="50.0"/>
|
||||
</padding>
|
||||
</Pane>
|
||||
<Label text="Accepted countries:" GridPane.rowIndex="4" GridPane.valignment="TOP"/>
|
||||
<ListView fx:id="countriesListView" prefHeight="100.0" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
|
||||
<HBox spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="5">
|
||||
<children>
|
||||
<ComboBox fx:id="regionComboBox" prefWidth="150.0" promptText="Select region"/>
|
||||
<ComboBox fx:id="countryComboBox" prefWidth="150.0" promptText="Add country" visible="false"/>
|
||||
</children>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10"/>
|
||||
</GridPane.margin>
|
||||
</HBox>
|
||||
<ImageView fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="6"
|
||||
GridPane.valignment="TOP">
|
||||
<image>
|
||||
<fx:reference source="infoIcon"/>
|
||||
</image>
|
||||
<GridPane.margin>
|
||||
<Insets right="2.0" top="4.0"/>
|
||||
</GridPane.margin>
|
||||
</ImageView>
|
||||
<Label text="Add here all bank account countries you are willing to accept in a trade .You can edit this later in the settings. Open the help menu for further information."
|
||||
wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="6">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
|
||||
|
||||
<!--
|
||||
arbitrators
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowIndex="8" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10" left="-10" right="-10" top="-10"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<Label id="form-group-title-active" layoutX="8" layoutY="-8" text="Add arbitrators">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets top="50.0"/>
|
||||
</padding>
|
||||
</Pane>
|
||||
<Label text="Accepted arbitrators:" GridPane.rowIndex="8" GridPane.valignment="TOP"/>
|
||||
<ListView fx:id="arbitratorsListView" prefHeight="100.0" GridPane.columnIndex="1" GridPane.rowIndex="8"/>
|
||||
<Button text="Add arbitrator" GridPane.columnIndex="1" GridPane.rowIndex="9"/>
|
||||
<ImageView fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="10"
|
||||
GridPane.valignment="TOP">
|
||||
<image>
|
||||
<fx:reference source="infoIcon"/>
|
||||
</image>
|
||||
<GridPane.margin>
|
||||
<Insets right="2.0" top="4.0"/>
|
||||
</GridPane.margin>
|
||||
</ImageView>
|
||||
<Label text="Select your arbitrators. You need to choose at least 3 arbitrators. The more you choose the more trading possibilities you gain .You can edit this later in the settings. Open the help menu for further information."
|
||||
wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="10">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
|
||||
</children>
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints halignment="RIGHT" hgrow="ALWAYS" minWidth="150"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES"/>
|
||||
</columnConstraints>
|
||||
|
||||
<rowConstraints>
|
||||
<RowConstraints vgrow="SOMETIMES"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="30.0" vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="SOMETIMES"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="SOMETIMES"/>
|
||||
<RowConstraints minHeight="30.0" vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="SOMETIMES"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
</GridPane>
|
Loading…
Add table
Reference in a new issue