Add setup screens.

This commit is contained in:
Manfred Karrer 2014-09-07 13:04:31 +02:00
parent c00c4b4400
commit 9732215c59
41 changed files with 1732 additions and 353 deletions

View file

@ -72,10 +72,11 @@
</GridPane.margin>
</TextField>
<ImageView fx:id="payFundsInfoIcon" fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true"
<ImageView fx:id="payFundsInfoIcon" GridPane.rowSpan="2" 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 fx:id="infoIcon" url="@../../../../../../../main/resources/images/info.png"/>
</image>
<GridPane.margin>
<Insets right="2.0" top="4.0"/>

View file

@ -0,0 +1,101 @@
/*
* 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;
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 FiatAccountUITestRunner extends Application {
private static final Logger log = LoggerFactory.getLogger(FiatAccountUITestRunner.class);
private Scene scene;
private Pane 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, 630);
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/account/fiataccount/FiatAccountView.fxml"), false);
try {
view = loader.load();
pane.getChildren().setAll(view);
refreshStylesheets();
} catch (IOException e) {
e.printStackTrace();
log.error(e.getStackTrace().toString());
}
}
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/main/java" + subPath);
} catch (MalformedURLException e) {
e.printStackTrace();
return null;
}
}
else {
return getClass().getResource(subPath);
}
}
}

View file

@ -0,0 +1,101 @@
/*
* 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;
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 PasswordUITestRunner extends Application {
private static final Logger log = LoggerFactory.getLogger(PasswordUITestRunner.class);
private Scene scene;
private Pane 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, 630);
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/account/password/PasswordView.fxml"), false);
try {
view = loader.load();
pane.getChildren().setAll(view);
refreshStylesheets();
} catch (IOException e) {
e.printStackTrace();
log.error(e.getStackTrace().toString());
}
}
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/main/java" + subPath);
} catch (MalformedURLException e) {
e.printStackTrace();
return null;
}
}
else {
return getClass().getResource(subPath);
}
}
}

View file

@ -0,0 +1,101 @@
/*
* 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;
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 RestrictionsUITestRunner extends Application {
private static final Logger log = LoggerFactory.getLogger(RestrictionsUITestRunner.class);
private Scene scene;
private Pane 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, 530);
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/account/restrictions/RestrictionsView.fxml"), false);
try {
view = loader.load();
pane.getChildren().setAll(view);
refreshStylesheets();
} catch (IOException e) {
e.printStackTrace();
log.error(e.getStackTrace().toString());
}
}
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/main/java" + subPath);
} catch (MalformedURLException e) {
e.printStackTrace();
return null;
}
}
else {
return getClass().getResource(subPath);
}
}
}

View file

@ -0,0 +1,101 @@
/*
* 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;
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 SeedWordsUITestRunner extends Application {
private static final Logger log = LoggerFactory.getLogger(SeedWordsUITestRunner.class);
private Scene scene;
private Pane 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, 630);
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/account/seedwords/SeedWordsView.fxml"), false);
try {
view = loader.load();
pane.getChildren().setAll(view);
refreshStylesheets();
} catch (IOException e) {
e.printStackTrace();
log.error(e.getStackTrace().toString());
}
}
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/main/java" + subPath);
} catch (MalformedURLException e) {
e.printStackTrace();
return null;
}
}
else {
return getClass().getResource(subPath);
}
}
}

View file

@ -93,10 +93,11 @@
</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"
<ImageView GridPane.rowSpan="2" 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 fx:id="infoIcon" url="@../../../../../../../main/resources/images/info.png"/>
</image>
<GridPane.margin>
<Insets right="2.0" top="4.0"/>

View file

@ -55,10 +55,11 @@
</GridPane.margin>
</ComboBox>
<ImageView fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="2"
<ImageView GridPane.rowSpan="2" 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 fx:id="infoIcon" url="@../../../../../../../main/resources/images/info.png"/>
</image>
<GridPane.margin>
<Insets right="2.0" top="4.0"/>
@ -100,7 +101,8 @@
<Insets bottom="10"/>
</GridPane.margin>
</HBox>
<ImageView fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true" GridPane.rowIndex="6"
<ImageView GridPane.rowSpan="2" fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true"
GridPane.rowIndex="6"
GridPane.valignment="TOP">
<image>
<fx:reference source="infoIcon"/>
@ -138,7 +140,8 @@
<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"
<ImageView GridPane.rowSpan="2" fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true"
GridPane.rowIndex="10"
GridPane.valignment="TOP">
<image>
<fx:reference source="infoIcon"/>

View file

@ -68,10 +68,11 @@
</GridPane.margin>
</Button>
<ImageView fx:id="payFundsInfoIcon" fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true"
<ImageView fx:id="payFundsInfoIcon" GridPane.rowSpan="2" fitHeight="24.0" fitWidth="24.0" pickOnBounds="true"
preserveRatio="true"
GridPane.rowIndex="3" GridPane.valignment="TOP">
<image>
<Image fx:id="infoIcon" url="@../../../../../../../main/resources/images/info_44.png"/>
<Image fx:id="infoIcon" url="@../../../../../../../main/resources/images/info.png"/>
</image>
<GridPane.margin>
<Insets right="2.0" top="4.0"/>

View file

@ -26,7 +26,7 @@
AnchorPane.topAnchor="0.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="io.bitsquare.gui.settings.uimock.SetPasswordControllerUIMock">
<padding>
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="26.0"/>
</padding>
@ -70,10 +70,11 @@
</GridPane.margin>
</Button>
<ImageView fx:id="payFundsInfoIcon" fitHeight="24.0" fitWidth="24.0" pickOnBounds="true" preserveRatio="true"
<ImageView fx:id="payFundsInfoIcon" GridPane.rowSpan="2" 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 fx:id="infoIcon" url="@../../../../../../../main/resources/images/info.png"/>
</image>
<GridPane.margin>
<Insets right="2.0" top="4.0"/>

View file

@ -156,11 +156,12 @@
</GridPane.margin>
</VBox>
<ImageView fx:id="priceAmountInfoIcon" fitHeight="24.0" fitWidth="24.0" pickOnBounds="true"
<ImageView fx:id="priceAmountInfoIcon" GridPane.rowSpan="2" 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"/>
url="@../../../../../../../../main/resources/images/info.png"/>
</image>
<GridPane.margin>
<Insets right="2.0" top="4.0"/>
@ -233,7 +234,8 @@
</GridPane.margin>
</TextField>
<ImageView fx:id="payFundsInfoIcon" fitHeight="24.0" fitWidth="24.0" pickOnBounds="true"
<ImageView fx:id="payFundsInfoIcon" GridPane.rowSpan="2" fitHeight="24.0" fitWidth="24.0"
pickOnBounds="true"
preserveRatio="true" visible="true" GridPane.rowIndex="14" GridPane.valignment="TOP">
<image>
<fx:reference source="infoIcon"/>
@ -320,7 +322,8 @@
text="Spain" visible="true" GridPane.columnIndex="1" GridPane.columnSpan="2"
GridPane.rowIndex="21"/>
<ImageView fx:id="showDetailsInfoIcon" fitHeight="24.0" fitWidth="24.0" pickOnBounds="true"
<ImageView fx:id="showDetailsInfoIcon" GridPane.rowSpan="2" fitHeight="24.0" fitWidth="24.0"
pickOnBounds="true"
preserveRatio="true" visible="true" GridPane.rowIndex="22" GridPane.valignment="TOP">
<image>
<fx:reference source="infoIcon"/>