mirror of
https://github.com/bisq-network/bisq.git
synced 2025-03-11 01:27:45 +01:00
Apply code inspector suggestions
This commit is contained in:
parent
9644cb3eda
commit
d4e52e2acb
14 changed files with 403 additions and 438 deletions
|
@ -27,7 +27,7 @@ import org.slf4j.LoggerFactory;
|
|||
|
||||
public class AccountModel extends UIModel {
|
||||
private static final Logger log = LoggerFactory.getLogger(AccountModel.class);
|
||||
private User user;
|
||||
private final User user;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Constructor
|
||||
|
|
|
@ -24,9 +24,7 @@
|
|||
AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0"
|
||||
AnchorPane.rightAnchor="0" AnchorPane.topAnchor="0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<tabs>
|
||||
<Tab fx:id="tab" closable="false">
|
||||
<Tab fx:id="tab" closable="false">
|
||||
|
||||
</Tab>
|
||||
</tabs>
|
||||
</Tab>
|
||||
</TabPane>
|
|
@ -25,50 +25,6 @@
|
|||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<children>
|
||||
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" 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" text="Setup password" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
</Pane>
|
||||
|
||||
<Label text="Enter password:">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
|
||||
<PasswordField fx:id="passwordField" promptText="Min. 8 characters" GridPane.columnIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</PasswordField>
|
||||
|
||||
<Label text="Repeat password:" GridPane.rowIndex="1"/>
|
||||
<PasswordField fx:id="repeatedPasswordField" promptText="Repeat password" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="1"/>
|
||||
|
||||
<HBox fx:id="buttonsHBox" spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||
<Button fx:id="saveButton" text="Save password" onAction="#onSaved" disable="true" defaultButton="true"/>
|
||||
<Button fx:id="skipButton" text="I will not use a password" onAction="#onSkipped"/>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5"/>
|
||||
</GridPane.margin>
|
||||
</HBox>
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenHelp" rowIndex="3"
|
||||
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."/>
|
||||
|
||||
|
||||
</children>
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="140.0"/>
|
||||
|
@ -81,6 +37,46 @@
|
|||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
</rowConstraints>
|
||||
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowSpan="4">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10.0" left="-10.0" right="-10.0" top="-10.0"/>
|
||||
</GridPane.margin>
|
||||
<Label id="form-group-title-active" text="Setup password" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</Pane>
|
||||
|
||||
<Label text="Enter password:">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
|
||||
<PasswordField fx:id="passwordField" promptText="Min. 8 characters" GridPane.columnIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</PasswordField>
|
||||
|
||||
<Label text="Repeat password:" GridPane.rowIndex="1"/>
|
||||
<PasswordField fx:id="repeatedPasswordField" promptText="Repeat password" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="1"/>
|
||||
|
||||
<HBox fx:id="buttonsHBox" spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||
<Button fx:id="saveButton" text="Save password" onAction="#onSaved" disable="true" defaultButton="true"/>
|
||||
<Button fx:id="skipButton" text="I will not use a password" onAction="#onSkipped"/>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5"/>
|
||||
</GridPane.margin>
|
||||
</HBox>
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenHelp" rowIndex="3"
|
||||
text="Protect your wallet with a strong password. You need to enter the password any time you withdraw Bitcoin from your trading wallets. You can change the password later in the settings. Open the help menu for more information."/>
|
||||
|
||||
|
||||
</GridPane>
|
||||
|
||||
|
||||
|
|
|
@ -25,55 +25,6 @@
|
|||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<children>
|
||||
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowSpan="5">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10.0" left="-10.0" right="-10.0" top="-10.0"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<Label id="form-group-title-active" text="Change password" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
</Pane>
|
||||
|
||||
<Label text="Enter old password:">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
|
||||
<PasswordField fx:id="oldPasswordField" promptText="Enter your old password" GridPane.columnIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</PasswordField>
|
||||
|
||||
<Label text="Enter new password:" GridPane.rowIndex="1"/>
|
||||
|
||||
<PasswordField fx:id="passwordField" promptText="Min. 8 characters" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="1"/>
|
||||
|
||||
<Label text="Repeat password:" GridPane.rowIndex="2"/>
|
||||
<PasswordField fx:id="repeatedPasswordField" promptText="Repeat password" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="2"/>
|
||||
|
||||
<HBox fx:id="buttonsHBox" spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="3">
|
||||
<Button fx:id="saveButton" text="Save password" onAction="#onSaved" disable="true" defaultButton="true"/>
|
||||
<Button fx:id="skipButton" text="I will not use a password" onAction="#onSkipped"/>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5"/>
|
||||
</GridPane.margin>
|
||||
</HBox>
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenHelp" rowIndex="4"
|
||||
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."/>
|
||||
|
||||
|
||||
</children>
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="140.0"/>
|
||||
|
@ -87,6 +38,51 @@
|
|||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
</rowConstraints>
|
||||
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowSpan="5">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10.0" left="-10.0" right="-10.0" top="-10.0"/>
|
||||
</GridPane.margin>
|
||||
<Label id="form-group-title-active" text="Change password" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</Pane>
|
||||
|
||||
<Label text="Enter old password:">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
|
||||
<PasswordField fx:id="oldPasswordField" promptText="Enter your old password" GridPane.columnIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</PasswordField>
|
||||
|
||||
<Label text="Enter new password:" GridPane.rowIndex="1"/>
|
||||
|
||||
<PasswordField fx:id="passwordField" promptText="Min. 8 characters" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="1"/>
|
||||
|
||||
<Label text="Repeat password:" GridPane.rowIndex="2"/>
|
||||
<PasswordField fx:id="repeatedPasswordField" promptText="Repeat password" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="2"/>
|
||||
|
||||
<HBox fx:id="buttonsHBox" spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="3">
|
||||
<Button fx:id="saveButton" text="Save password" onAction="#onSaved" disable="true" defaultButton="true"/>
|
||||
<Button fx:id="skipButton" text="I will not use a password" onAction="#onSkipped"/>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5"/>
|
||||
</GridPane.margin>
|
||||
</HBox>
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenHelp" rowIndex="4"
|
||||
text="Protect your wallet with a strong password. You need to enter the password any time you withdraw Bitcoin from your trading wallets. You can change the password later in the settings. Open the help menu for more information."/>
|
||||
|
||||
|
||||
</GridPane>
|
||||
|
||||
|
||||
|
|
|
@ -27,113 +27,6 @@
|
|||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<children>
|
||||
|
||||
<!--
|
||||
Setup
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.rowIndex="0" GridPane.columnSpan="2" GridPane.rowSpan="8">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10.0" left="-10.0" right="-10.0" top="-10.0"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<Label id="form-group-title-active" text="Setup your payments account" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
</Pane>
|
||||
|
||||
<Label text="Payments method:" GridPane.rowIndex="0">
|
||||
<GridPane.margin>
|
||||
<Insets top="10"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<ComboBox fx:id="typesComboBox" promptText="Select payments method" onAction="#onSelectType"
|
||||
GridPane.rowIndex="0" GridPane.columnIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets top="10"/>
|
||||
</GridPane.margin>
|
||||
</ComboBox>
|
||||
|
||||
<Label text="Title:" GridPane.rowIndex="1"/>
|
||||
<InputTextField fx:id="titleTextField" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
|
||||
<Label text="Holder name:" GridPane.rowIndex="2"/>
|
||||
<InputTextField fx:id="holderNameTextField" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||
|
||||
<Label text="Primary ID:" GridPane.rowIndex="3"/>
|
||||
<InputTextField fx:id="primaryIDTextField" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
|
||||
|
||||
<Label text="Secondary ID:" GridPane.rowIndex="4"/>
|
||||
<InputTextField fx:id="secondaryIDTextField" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
|
||||
|
||||
<Label text="Currency:" GridPane.rowIndex="5"/>
|
||||
<ComboBox fx:id="currencyComboBox" promptText="Select currency"
|
||||
onAction="#onSelectCurrency" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="5"/>
|
||||
|
||||
<Label text="Country of payments account:" GridPane.rowIndex="6"/>
|
||||
<HBox GridPane.columnIndex="1" GridPane.rowIndex="6" spacing="10">
|
||||
<children>
|
||||
<ComboBox fx:id="regionComboBox" promptText="Select region"
|
||||
onAction="#onSelectRegion" prefWidth="150.0"/>
|
||||
<ComboBox fx:id="countryComboBox" promptText="Select country" onAction="#onSelectCountry"
|
||||
visible="false" prefWidth="150.0"/>
|
||||
</children>
|
||||
</HBox>
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenSetupHelp" rowIndex="7"
|
||||
text="The payments account data will be saved in a encrypted form to the Bitcoin block chain and will be used in the trade process for account verification."/>
|
||||
|
||||
<HBox fx:id="buttonsHBox" GridPane.columnIndex="1" GridPane.rowIndex="8" spacing="10">
|
||||
<Button fx:id="saveButton" text="Save" onAction="#onSave" defaultButton="true" disable="true"/>
|
||||
<Button fx:id="completedButton" text="Continue to the next step" onAction="#onCompleted" disable="true"/>
|
||||
<GridPane.margin>
|
||||
<Insets top="15.0" bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</HBox>
|
||||
|
||||
<!--
|
||||
Manage
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowIndex="9" GridPane.rowSpan="4">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10" left="-10" right="-10" top="20"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<Label id="form-group-title-active" text="Manage payments accounts" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets top="40.0"/>
|
||||
</padding>
|
||||
</Pane>
|
||||
|
||||
<Label text="Select payments account:" GridPane.rowIndex="9">
|
||||
<GridPane.margin>
|
||||
<Insets top="40"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<ComboBox fx:id="selectionComboBox" onAction="#onSelectAccount" GridPane.rowIndex="9"
|
||||
GridPane.columnIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets top="40"/>
|
||||
</GridPane.margin>
|
||||
</ComboBox>
|
||||
|
||||
<Label text="Remove selected account:" GridPane.rowIndex="10"/>
|
||||
<Button fx:id="removeBankAccountButton" text="Remove selected payments account" onAction="#onRemoveAccount"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="10" disable="true"/>
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenManageAccountsHelp" rowIndex="11"
|
||||
text="When you change your payments accounts later you need to do the renew the registration and pay the small registration fee."/>
|
||||
|
||||
</children>
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="200.0"/>
|
||||
|
@ -154,4 +47,103 @@
|
|||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
</rowConstraints>
|
||||
|
||||
<!--
|
||||
Setup
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.rowIndex="0" GridPane.columnSpan="2" GridPane.rowSpan="8">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10.0" left="-10.0" right="-10.0" top="-10.0"/>
|
||||
</GridPane.margin>
|
||||
<Label id="form-group-title-active" text="Setup your payments account" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</Pane>
|
||||
|
||||
<Label text="Payments method:" GridPane.rowIndex="0">
|
||||
<GridPane.margin>
|
||||
<Insets top="10"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<ComboBox fx:id="typesComboBox" promptText="Select payments method" onAction="#onSelectType"
|
||||
GridPane.rowIndex="0" GridPane.columnIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets top="10"/>
|
||||
</GridPane.margin>
|
||||
</ComboBox>
|
||||
|
||||
<Label text="Title:" GridPane.rowIndex="1"/>
|
||||
<InputTextField fx:id="titleTextField" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
|
||||
<Label text="Holder name:" GridPane.rowIndex="2"/>
|
||||
<InputTextField fx:id="holderNameTextField" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
|
||||
|
||||
<Label text="Primary ID:" GridPane.rowIndex="3"/>
|
||||
<InputTextField fx:id="primaryIDTextField" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
|
||||
|
||||
<Label text="Secondary ID:" GridPane.rowIndex="4"/>
|
||||
<InputTextField fx:id="secondaryIDTextField" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
|
||||
|
||||
<Label text="Currency:" GridPane.rowIndex="5"/>
|
||||
<ComboBox fx:id="currencyComboBox" promptText="Select currency"
|
||||
onAction="#onSelectCurrency" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="5"/>
|
||||
|
||||
<Label text="Country of payments account:" GridPane.rowIndex="6"/>
|
||||
<HBox GridPane.columnIndex="1" GridPane.rowIndex="6" spacing="10">
|
||||
<ComboBox fx:id="regionComboBox" promptText="Select region"
|
||||
onAction="#onSelectRegion" prefWidth="150.0"/>
|
||||
<ComboBox fx:id="countryComboBox" promptText="Select country" onAction="#onSelectCountry"
|
||||
visible="false" prefWidth="150.0"/>
|
||||
</HBox>
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenSetupHelp" rowIndex="7"
|
||||
text="The payments account data will be saved in a encrypted form to the Bitcoin block chain and will be used in the trade process for account verification."/>
|
||||
|
||||
<HBox fx:id="buttonsHBox" GridPane.columnIndex="1" GridPane.rowIndex="8" spacing="10">
|
||||
<Button fx:id="saveButton" text="Save" onAction="#onSave" defaultButton="true" disable="true"/>
|
||||
<Button fx:id="completedButton" text="Continue to the next step" onAction="#onCompleted" disable="true"/>
|
||||
<GridPane.margin>
|
||||
<Insets top="15.0" bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</HBox>
|
||||
|
||||
<!--
|
||||
Manage
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowIndex="9" GridPane.rowSpan="4">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10" left="-10" right="-10" top="20"/>
|
||||
</GridPane.margin>
|
||||
<padding>
|
||||
<Insets top="40.0"/>
|
||||
</padding>
|
||||
<Label id="form-group-title-active" text="Manage payments accounts" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</Pane>
|
||||
|
||||
<Label text="Select payments account:" GridPane.rowIndex="9">
|
||||
<GridPane.margin>
|
||||
<Insets top="40"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<ComboBox fx:id="selectionComboBox" onAction="#onSelectAccount" GridPane.rowIndex="9"
|
||||
GridPane.columnIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets top="40"/>
|
||||
</GridPane.margin>
|
||||
</ComboBox>
|
||||
|
||||
<Label text="Remove selected account:" GridPane.rowIndex="10"/>
|
||||
<Button fx:id="removeBankAccountButton" text="Remove selected payments account" onAction="#onRemoveAccount"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="10" disable="true"/>
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenManageAccountsHelp" rowIndex="11"
|
||||
text="When you change your payments accounts later you need to do the renew the registration and pay the small registration fee."/>
|
||||
|
||||
</GridPane>
|
||||
|
|
|
@ -156,6 +156,7 @@ public class RegistrationCB extends CachedCodeBehind<RegistrationPM> {
|
|||
public void setParentController(Initializable parentController) {
|
||||
super.setParentController(parentController);
|
||||
if (parentController instanceof AccountSettingsCB) {
|
||||
//TODO
|
||||
// ((GridPane) root).getChildren().remove(completedButton);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,9 +48,9 @@ import org.slf4j.LoggerFactory;
|
|||
public class RegistrationModel extends UIModel {
|
||||
private static final Logger log = LoggerFactory.getLogger(RegistrationModel.class);
|
||||
|
||||
private WalletFacade walletFacade;
|
||||
private User user;
|
||||
private Persistence persistence;
|
||||
private final WalletFacade walletFacade;
|
||||
private final User user;
|
||||
private final Persistence persistence;
|
||||
AddressEntry addressEntry;
|
||||
final BooleanProperty isWalletFunded = new SimpleBooleanProperty();
|
||||
final BooleanProperty payFeeSuccess = new SimpleBooleanProperty();
|
||||
|
|
|
@ -27,63 +27,6 @@
|
|||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<children>
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" 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" text="Fund the registration fee"
|
||||
layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
</Pane>
|
||||
|
||||
<Label text="Registration fee:" GridPane.rowIndex="0">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<TextField fx:id="feeTextField"
|
||||
GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="0"
|
||||
editable="false" focusTraversable="false">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</TextField>
|
||||
|
||||
<Label text="Registration wallet address:" GridPane.rowIndex="1"/>
|
||||
<AddressTextField fx:id="addressTextField" GridPane.columnIndex="1" GridPane.rowIndex="1"
|
||||
focusTraversable="true"/>
|
||||
|
||||
<Label text="Registration wallet balance:" GridPane.rowIndex="2">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<BalanceTextField fx:id="balanceTextField" GridPane.columnIndex="1" GridPane.rowIndex="2"
|
||||
focusTraversable="false">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</BalanceTextField>
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenHelp" rowIndex="3"
|
||||
text="You need to pay a tiny registration fee which is needed for storing your encrypted account data in the blockchain. That will be used in the trade process for account verification."/>
|
||||
|
||||
<Button fx:id="payButton" text="Pay registration fee" onAction="#onPayFee" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="4"
|
||||
defaultButton="true">
|
||||
<GridPane.margin>
|
||||
<Insets top="15.0"/>
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
|
||||
</children>
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="200.0"/>
|
||||
|
@ -97,4 +40,57 @@
|
|||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
</rowConstraints>
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowSpan="4">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10.0" left="-10.0" right="-10.0" top="-10.0"/>
|
||||
</GridPane.margin>
|
||||
<Label id="form-group-title-active" text="Fund the registration fee"
|
||||
layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</Pane>
|
||||
|
||||
<Label text="Registration fee:" GridPane.rowIndex="0">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<TextField fx:id="feeTextField"
|
||||
GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="0"
|
||||
editable="false" focusTraversable="false">
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</TextField>
|
||||
|
||||
<Label text="Registration wallet address:" GridPane.rowIndex="1"/>
|
||||
<AddressTextField fx:id="addressTextField" GridPane.columnIndex="1" GridPane.rowIndex="1"
|
||||
focusTraversable="true"/>
|
||||
|
||||
<Label text="Registration wallet balance:" GridPane.rowIndex="2">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<BalanceTextField fx:id="balanceTextField" GridPane.columnIndex="1" GridPane.rowIndex="2"
|
||||
focusTraversable="false">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5.0"/>
|
||||
</GridPane.margin>
|
||||
</BalanceTextField>
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenHelp" rowIndex="3"
|
||||
text="You need to pay a tiny registration fee which is needed for storing your encrypted account data in the blockchain. That will be used in the trade process for account verification."/>
|
||||
|
||||
<Button fx:id="payButton" text="Pay registration fee" onAction="#onPayFee" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="4"
|
||||
defaultButton="true">
|
||||
<GridPane.margin>
|
||||
<Insets top="15.0"/>
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
|
||||
</GridPane>
|
||||
|
|
|
@ -160,7 +160,7 @@ public class RestrictionsModel extends UIModel {
|
|||
ObservableList<Country> getListWithAllEuroCountries() {
|
||||
// TODO use Set instead of List
|
||||
// In addAcceptedCountry there is a check to no add duplicates, so it works correctly for now
|
||||
CountryUtil.getAllEuroCountries().stream().forEach(e -> settings.addAcceptedCountry(e));
|
||||
CountryUtil.getAllEuroCountries().stream().forEach(settings::addAcceptedCountry);
|
||||
countryList = FXCollections.observableArrayList(settings.getAcceptedCountries());
|
||||
saveSettings();
|
||||
return countryList;
|
||||
|
|
|
@ -24,127 +24,6 @@
|
|||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<children>
|
||||
|
||||
<!--
|
||||
languages
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10.0" left="-10.0" right="-10.0" top="-10.0"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<Label id="form-group-title-active" text="Add languages" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
</Pane>
|
||||
|
||||
<Label text="Accepted languages:" GridPane.rowIndex="0" GridPane.valignment="TOP">
|
||||
<padding>
|
||||
<Insets top="10"/>
|
||||
</padding>
|
||||
</Label>
|
||||
<ListView fx:id="languagesListView" GridPane.columnIndex="1" GridPane.rowIndex="0" prefHeight="80.0"/>
|
||||
<ComboBox fx:id="languageComboBox" onAction="#onAddLanguage" promptText="Add language"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="1"
|
||||
prefWidth="150.0"/>
|
||||
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenLanguagesHelp" rowIndex="2"
|
||||
text="Trade with users who have at least 1 shared language."/>
|
||||
|
||||
<!--
|
||||
countries
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowIndex="3" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10" left="-10" right="-10" top="30"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<Label id="form-group-title-active" text="Add countries" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets top="50.0"/>
|
||||
</padding>
|
||||
</Pane>
|
||||
<Label text="Accepted countries:" GridPane.rowIndex="3" GridPane.valignment="TOP">
|
||||
<GridPane.margin>
|
||||
<Insets top="50"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<ListView fx:id="countriesListView" GridPane.columnIndex="1" GridPane.rowIndex="3" prefHeight="80.0"
|
||||
>
|
||||
<GridPane.margin>
|
||||
<Insets top="40"/>
|
||||
</GridPane.margin>
|
||||
</ListView>
|
||||
|
||||
<HBox GridPane.columnIndex="1" GridPane.rowIndex="4" spacing="10">
|
||||
<children>
|
||||
<ComboBox fx:id="regionComboBox" onAction="#onSelectRegion" promptText="Select region"
|
||||
prefWidth="150.0"/>
|
||||
<ComboBox fx:id="countryComboBox" onAction="#onAddCountry" promptText="Add country" visible="false"
|
||||
prefWidth="150.0"/>
|
||||
<Button fx:id="addAllEuroCountriesButton" text="Add Euro countries" onAction="#onAddAllEuroCountries"
|
||||
prefWidth="150.0" visible="false"/>
|
||||
</children>
|
||||
</HBox>
|
||||
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenCountriesHelp" rowIndex="5"
|
||||
text="Restrict trades with these payments account countries."/>
|
||||
|
||||
|
||||
<!--
|
||||
arbitrators
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowIndex="6" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10" left="-10" right="-10" top="30"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<Label id="form-group-title-active" text="Add arbitrators" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
<padding>
|
||||
<Insets top="50.0"/>
|
||||
</padding>
|
||||
</Pane>
|
||||
<Label text="Accepted arbitrators:" GridPane.rowIndex="6" GridPane.valignment="TOP">
|
||||
<GridPane.margin>
|
||||
<Insets top="50"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<ListView fx:id="arbitratorsListView" GridPane.columnIndex="1" GridPane.rowIndex="6" prefHeight="80.0">
|
||||
<GridPane.margin>
|
||||
<Insets top="40"/>
|
||||
</GridPane.margin>
|
||||
</ListView>
|
||||
<Button text="Add arbitrator" onAction="#onOpenArbitratorScreen" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="7"/>
|
||||
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenArbitratorsHelp" rowIndex="8"
|
||||
text="You need to choose at least 3 arbitrators."/>
|
||||
|
||||
<Button fx:id="completedButton" text="Completed" onAction="#onCompleted" disable="true" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="9"
|
||||
defaultButton="true">
|
||||
<GridPane.margin>
|
||||
<Insets top="20.0"/>
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
</children>
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="140.0"/>
|
||||
|
@ -167,4 +46,115 @@
|
|||
<RowConstraints vgrow="NEVER"/>
|
||||
|
||||
</rowConstraints>
|
||||
|
||||
<!--
|
||||
languages
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10.0" left="-10.0" right="-10.0" top="-10.0"/>
|
||||
</GridPane.margin>
|
||||
<Label id="form-group-title-active" text="Add languages" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</Pane>
|
||||
|
||||
<Label text="Accepted languages:" GridPane.rowIndex="0" GridPane.valignment="TOP">
|
||||
<padding>
|
||||
<Insets top="10"/>
|
||||
</padding>
|
||||
</Label>
|
||||
<ListView fx:id="languagesListView" GridPane.columnIndex="1" GridPane.rowIndex="0" prefHeight="80.0"/>
|
||||
<ComboBox fx:id="languageComboBox" onAction="#onAddLanguage" promptText="Add language"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="1"
|
||||
prefWidth="150.0"/>
|
||||
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenLanguagesHelp" rowIndex="2"
|
||||
text="Trade with users who have at least 1 shared language."/>
|
||||
|
||||
<!--
|
||||
countries
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowIndex="3" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10" left="-10" right="-10" top="30"/>
|
||||
</GridPane.margin>
|
||||
<padding>
|
||||
<Insets top="50.0"/>
|
||||
</padding>
|
||||
<Label id="form-group-title-active" text="Add countries" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</Pane>
|
||||
<Label text="Accepted countries:" GridPane.rowIndex="3" GridPane.valignment="TOP">
|
||||
<GridPane.margin>
|
||||
<Insets top="50"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<ListView fx:id="countriesListView" GridPane.columnIndex="1" GridPane.rowIndex="3" prefHeight="80.0"
|
||||
>
|
||||
<GridPane.margin>
|
||||
<Insets top="40"/>
|
||||
</GridPane.margin>
|
||||
</ListView>
|
||||
|
||||
<HBox GridPane.columnIndex="1" GridPane.rowIndex="4" spacing="10">
|
||||
<ComboBox fx:id="regionComboBox" onAction="#onSelectRegion" promptText="Select region"
|
||||
prefWidth="150.0"/>
|
||||
<ComboBox fx:id="countryComboBox" onAction="#onAddCountry" promptText="Add country" visible="false"
|
||||
prefWidth="150.0"/>
|
||||
<Button fx:id="addAllEuroCountriesButton" text="Add Euro countries" onAction="#onAddAllEuroCountries"
|
||||
prefWidth="150.0" visible="false"/>
|
||||
</HBox>
|
||||
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenCountriesHelp" rowIndex="5"
|
||||
text="Restrict trades with these payments account countries."/>
|
||||
|
||||
|
||||
<!--
|
||||
arbitrators
|
||||
-->
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowIndex="6" GridPane.rowSpan="3">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10" left="-10" right="-10" top="30"/>
|
||||
</GridPane.margin>
|
||||
<padding>
|
||||
<Insets top="50.0"/>
|
||||
</padding>
|
||||
<Label id="form-group-title-active" text="Add arbitrators" layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</Pane>
|
||||
<Label text="Accepted arbitrators:" GridPane.rowIndex="6" GridPane.valignment="TOP">
|
||||
<GridPane.margin>
|
||||
<Insets top="50"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<ListView fx:id="arbitratorsListView" GridPane.columnIndex="1" GridPane.rowIndex="6" prefHeight="80.0">
|
||||
<GridPane.margin>
|
||||
<Insets top="40"/>
|
||||
</GridPane.margin>
|
||||
</ListView>
|
||||
<Button text="Add arbitrator" onAction="#onOpenArbitratorScreen" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="7"/>
|
||||
|
||||
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenArbitratorsHelp" rowIndex="8"
|
||||
text="You need to choose at least 3 arbitrators."/>
|
||||
|
||||
<Button fx:id="completedButton" text="Completed" onAction="#onCompleted" disable="true" GridPane.columnIndex="1"
|
||||
GridPane.rowIndex="9"
|
||||
defaultButton="true">
|
||||
<GridPane.margin>
|
||||
<Insets top="20.0"/>
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
</GridPane>
|
||||
|
|
|
@ -102,8 +102,7 @@ public class SeedWordsCB extends CachedCodeBehind<SeedWordsPM> {
|
|||
@FXML
|
||||
private void onCompleted() {
|
||||
if (parentController instanceof SetupCB)
|
||||
if (parentController instanceof SetupCB)
|
||||
((SetupCB) parentController).onCompleted(this);
|
||||
((SetupCB) parentController).onCompleted(this);
|
||||
}
|
||||
|
||||
@FXML
|
||||
|
|
|
@ -26,43 +26,6 @@
|
|||
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
|
||||
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"
|
||||
xmlns:fx="http://javafx.com/fxml">
|
||||
<children>
|
||||
<Pane id="form-group-background-active" fx:id="payFundsPane" GridPane.columnSpan="2" 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" text="Backup your wallet seed words"
|
||||
layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</children>
|
||||
</Pane>
|
||||
|
||||
<Label text="Wallet seed words:" GridPane.columnIndex="0" GridPane.rowIndex="1" GridPane.valignment="TOP">
|
||||
<GridPane.margin>
|
||||
<Insets top="7.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<TextArea fx:id="seedWordsTextArea" GridPane.columnIndex="1" GridPane.rowIndex="1" wrapText="true"
|
||||
prefHeight="80">
|
||||
<font>
|
||||
<Font size="16.0"/>
|
||||
</font>
|
||||
</TextArea>
|
||||
<Button fx:id="completedButton" text="I have made my backup" onAction="#onCompleted"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="2"
|
||||
defaultButton="true">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5"/>
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenHelp" rowIndex="3"
|
||||
text="You can recreate your wallet our of these words when you lose your wallet. Backup it on paper to have better protection against online theft. Open the help menu for more information."/>
|
||||
|
||||
</children>
|
||||
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" halignment="RIGHT" minWidth="140.0"/>
|
||||
|
@ -75,4 +38,37 @@
|
|||
<RowConstraints vgrow="NEVER"/>
|
||||
<RowConstraints vgrow="NEVER"/>
|
||||
</rowConstraints>
|
||||
<Pane id="form-group-background-active" GridPane.columnSpan="2" GridPane.rowSpan="4">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="-10.0" left="-10.0" right="-10.0" top="-10.0"/>
|
||||
</GridPane.margin>
|
||||
<Label id="form-group-title-active" text="Backup your wallet seed words"
|
||||
layoutX="8" layoutY="-8">
|
||||
<padding>
|
||||
<Insets left="5" right="7"/>
|
||||
</padding>
|
||||
</Label>
|
||||
</Pane>
|
||||
|
||||
<Label text="Wallet seed words:" GridPane.columnIndex="0" GridPane.rowIndex="1" GridPane.valignment="TOP">
|
||||
<GridPane.margin>
|
||||
<Insets top="7.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<TextArea fx:id="seedWordsTextArea" GridPane.columnIndex="1" GridPane.rowIndex="1" wrapText="true"
|
||||
prefHeight="80">
|
||||
<font>
|
||||
<Font size="16.0"/>
|
||||
</font>
|
||||
</TextArea>
|
||||
<Button fx:id="completedButton" text="I have made my backup" onAction="#onCompleted"
|
||||
GridPane.columnIndex="1" GridPane.rowIndex="2"
|
||||
defaultButton="true">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="5"/>
|
||||
</GridPane.margin>
|
||||
</Button>
|
||||
<InfoDisplay gridPane="$root" onAction="#onOpenHelp" rowIndex="3"
|
||||
text="You can recreate your wallet our of these words when you lose your wallet. Backup it on paper to have better protection against online theft. Open the help menu for more information."/>
|
||||
|
||||
</GridPane>
|
|
@ -48,7 +48,6 @@ public class AccountSettingsCB extends CachedCodeBehind<AccountSettingsPM> {
|
|||
private static final Logger log = LoggerFactory.getLogger(AccountSettingsCB.class);
|
||||
public VBox leftVBox;
|
||||
public AnchorPane content;
|
||||
private MenuItem seedWords, password, fiatAccount, restrictions, registration;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Constructor
|
||||
|
@ -69,15 +68,15 @@ public class AccountSettingsCB extends CachedCodeBehind<AccountSettingsPM> {
|
|||
super.initialize(url, rb);
|
||||
|
||||
ToggleGroup toggleGroup = new ToggleGroup();
|
||||
seedWords = new MenuItem(this, content, "Wallet seed",
|
||||
MenuItem seedWords = new MenuItem(this, content, "Wallet seed",
|
||||
NavigationItem.SEED_WORDS, toggleGroup);
|
||||
password = new MenuItem(this, content, "Wallet password",
|
||||
MenuItem password = new MenuItem(this, content, "Wallet password",
|
||||
NavigationItem.CHANGE_PASSWORD, toggleGroup);
|
||||
restrictions = new MenuItem(this, content, "Trading restrictions",
|
||||
MenuItem restrictions = new MenuItem(this, content, "Trading restrictions",
|
||||
NavigationItem.RESTRICTIONS, toggleGroup);
|
||||
fiatAccount = new MenuItem(this, content, "Payments account(s)",
|
||||
MenuItem fiatAccount = new MenuItem(this, content, "Payments account(s)",
|
||||
NavigationItem.FIAT_ACCOUNT, toggleGroup);
|
||||
registration = new MenuItem(this, content, "Renew your account",
|
||||
MenuItem registration = new MenuItem(this, content, "Renew your account",
|
||||
NavigationItem.REGISTRATION, toggleGroup);
|
||||
|
||||
registration.setDisable(true);
|
||||
|
|
|
@ -88,7 +88,7 @@ public class SetupCB extends CachedCodeBehind<SetupPM> {
|
|||
|
||||
leftVBox.getChildren().addAll(seedWords, password, restrictions, fiatAccount, registration);
|
||||
|
||||
childController = seedWords.show(NavigationItem.SEED_WORDS);
|
||||
childController = seedWords.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -114,19 +114,19 @@ public class SetupCB extends CachedCodeBehind<SetupPM> {
|
|||
public void onCompleted(CodeBehind<? extends PresentationModel> childView) {
|
||||
if (childView instanceof SeedWordsCB) {
|
||||
seedWords.onCompleted();
|
||||
childController = password.show(NavigationItem.ADD_PASSWORD);
|
||||
childController = password.show();
|
||||
}
|
||||
else if (childView instanceof PasswordCB) {
|
||||
password.onCompleted();
|
||||
childController = restrictions.show(NavigationItem.RESTRICTIONS);
|
||||
childController = restrictions.show();
|
||||
}
|
||||
else if (childView instanceof RestrictionsCB) {
|
||||
restrictions.onCompleted();
|
||||
childController = fiatAccount.show(NavigationItem.FIAT_ACCOUNT);
|
||||
childController = fiatAccount.show();
|
||||
}
|
||||
else if (childView instanceof FiatAccountCB) {
|
||||
fiatAccount.onCompleted();
|
||||
childController = registration.show(NavigationItem.REGISTRATION);
|
||||
childController = registration.show();
|
||||
}
|
||||
else if (childView instanceof RegistrationCB) {
|
||||
registration.onCompleted();
|
||||
|
@ -161,6 +161,7 @@ class WizardItem extends HBox {
|
|||
private final Label subTitleLabel;
|
||||
private final SetupCB parentCB;
|
||||
private final Parent content;
|
||||
private final NavigationItem navigationItem;
|
||||
|
||||
|
||||
private CodeBehind<? extends PresentationModel> childController;
|
||||
|
@ -168,6 +169,7 @@ class WizardItem extends HBox {
|
|||
WizardItem(SetupCB parentCB, Parent content, String title, String subTitle, NavigationItem navigationItem) {
|
||||
this.parentCB = parentCB;
|
||||
this.content = content;
|
||||
this.navigationItem = navigationItem;
|
||||
setId("wizard-item-background-deactivated");
|
||||
layout();
|
||||
setSpacing(5);
|
||||
|
@ -202,7 +204,7 @@ class WizardItem extends HBox {
|
|||
getChildren().addAll(imageView, vBox);
|
||||
}
|
||||
|
||||
public CodeBehind<? extends PresentationModel> show(NavigationItem navigationItem) {
|
||||
public CodeBehind<? extends PresentationModel> show() {
|
||||
loadView(navigationItem);
|
||||
setId("wizard-item-background-active");
|
||||
imageView.setImage(ImageUtil.getIconImage(ImageUtil.ARROW_BLUE));
|
||||
|
|
Loading…
Add table
Reference in a new issue