mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-20 02:12:00 +01:00
Polish whitespace and field ordering in view classes
This commit is contained in:
parent
349f7dbc51
commit
68a1140a6d
@ -31,7 +31,6 @@ public abstract class ActivatableViewAndModel<R extends Node, M extends Activata
|
||||
this((M) Activatable.NOOP_INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public final void activate() {
|
||||
model.activate();
|
||||
@ -49,5 +48,4 @@ public abstract class ActivatableViewAndModel<R extends Node, M extends Activata
|
||||
|
||||
protected void doDeactivate() {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -30,15 +30,14 @@ import javafx.scene.control.*;
|
||||
|
||||
public class AccountView extends ActivatableView<TabPane, AccountViewModel> {
|
||||
|
||||
@FXML Tab accountSettingsTab, arbitratorSettingsTab;
|
||||
|
||||
private Navigation.Listener navigationListener;
|
||||
private ChangeListener<Tab> tabChangeListener;
|
||||
|
||||
@FXML Tab accountSettingsTab, arbitratorSettingsTab;
|
||||
|
||||
private final ViewLoader viewLoader;
|
||||
private final Navigation navigation;
|
||||
|
||||
|
||||
@Inject
|
||||
private AccountView(AccountViewModel model, ViewLoader viewLoader, Navigation navigation) {
|
||||
super(model);
|
||||
@ -46,7 +45,6 @@ public class AccountView extends ActivatableView<TabPane, AccountViewModel> {
|
||||
this.navigation = navigation;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
navigationListener = navigationItems -> {
|
||||
|
@ -33,13 +33,12 @@ import javafx.stage.Stage;
|
||||
// TODO Arbitration is very basic yet
|
||||
public class ArbitratorSettingsView extends AbstractView {
|
||||
|
||||
private ArbitratorRegistrationView arbitratorRegistrationView;
|
||||
|
||||
private final ViewLoader viewLoader;
|
||||
private final Navigation navigation;
|
||||
private final Stage primaryStage;
|
||||
|
||||
private ArbitratorRegistrationView arbitratorRegistrationView;
|
||||
|
||||
|
||||
@Inject
|
||||
private ArbitratorSettingsView(ViewLoader viewLoader, Navigation navigation, Stage primaryStage) {
|
||||
this.viewLoader = viewLoader;
|
||||
@ -47,8 +46,6 @@ public class ArbitratorSettingsView extends AbstractView {
|
||||
this.primaryStage = primaryStage;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected View loadView(Navigation.Item navigationItem) {
|
||||
ViewLoader.Item loaded = viewLoader.load(navigationItem.getFxmlUrl(), false);
|
||||
@ -71,7 +68,6 @@ public class ArbitratorSettingsView extends AbstractView {
|
||||
return arbitratorRegistrationView;
|
||||
}
|
||||
|
||||
|
||||
@FXML
|
||||
public void onArbitratorRegistration() {
|
||||
loadView(Navigation.Item.ARBITRATOR_REGISTRATION);
|
||||
|
@ -42,20 +42,19 @@ import javafx.stage.Stage;
|
||||
// TODO Arbitration is very basic yet
|
||||
public class ArbitratorBrowserView extends ActivatableView<Pane, Void> implements ArbitratorListener {
|
||||
|
||||
private final ViewLoader viewLoader;
|
||||
private final AccountSettings accountSettings;
|
||||
private final Persistence persistence;
|
||||
private final MessageService messageService;
|
||||
|
||||
private final List<Arbitrator> allArbitrators = new ArrayList<>();
|
||||
@FXML Button prevButton, nextButton, selectButton, closeButton;
|
||||
@FXML Pane arbitratorProfile;
|
||||
|
||||
private Arbitrator currentArbitrator;
|
||||
private ArbitratorProfileView arbitratorProfileView;
|
||||
private int index = -1;
|
||||
|
||||
@FXML Button prevButton, nextButton, selectButton, closeButton;
|
||||
@FXML Pane arbitratorProfile;
|
||||
private final List<Arbitrator> allArbitrators = new ArrayList<>();
|
||||
|
||||
private final ViewLoader viewLoader;
|
||||
private final AccountSettings accountSettings;
|
||||
private final Persistence persistence;
|
||||
private final MessageService messageService;
|
||||
|
||||
@Inject
|
||||
public ArbitratorBrowserView(ViewLoader viewLoader, AccountSettings accountSettings, Persistence persistence,
|
||||
@ -66,7 +65,6 @@ public class ArbitratorBrowserView extends ActivatableView<Pane, Void> implement
|
||||
this.messageService = messageService;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
messageService.addArbitratorListener(this);
|
||||
|
@ -31,33 +31,22 @@ import javafx.scene.control.*;
|
||||
// TODO Arbitration is very basic yet
|
||||
public class ArbitratorProfileView extends AbstractView {
|
||||
|
||||
private final Preferences preferences;
|
||||
@FXML Label nameLabel;
|
||||
@FXML TextArea descriptionTextArea;
|
||||
@FXML TextField nameTextField, languagesTextField, reputationTextField, feeTextField, methodsTextField,
|
||||
passiveServiceFeeTextField, idVerificationsTextField, webPageTextField, maxTradeVolumeTextField;
|
||||
|
||||
private final Preferences preferences;
|
||||
private final Persistence persistence;
|
||||
private final BSFormatter formatter;
|
||||
|
||||
|
||||
@FXML Label nameLabel;
|
||||
@FXML TextField nameTextField, languagesTextField, reputationTextField,
|
||||
feeTextField, methodsTextField, passiveServiceFeeTextField,
|
||||
idVerificationsTextField, webPageTextField, maxTradeVolumeTextField;
|
||||
@FXML TextArea descriptionTextArea;
|
||||
|
||||
|
||||
@Inject
|
||||
public ArbitratorProfileView(Preferences preferences, Persistence persistence,
|
||||
BSFormatter formatter) {
|
||||
public ArbitratorProfileView(Preferences preferences, Persistence persistence, BSFormatter formatter) {
|
||||
this.preferences = preferences;
|
||||
this.persistence = persistence;
|
||||
|
||||
// ApplicationPreferences persistedApplicationPreferences = (ApplicationPreferences) storage
|
||||
// .read(settings.getClass().getName());
|
||||
// settings.applyPersistedSettings(persistedApplicationPreferences);
|
||||
this.formatter = formatter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void applyArbitrator(Arbitrator arbitrator) {
|
||||
if (arbitrator != null && arbitrator.getIdType() != null) {
|
||||
String name = "";
|
||||
@ -85,6 +74,5 @@ public class ArbitratorProfileView extends AbstractView {
|
||||
descriptionTextArea.setText(arbitrator.getDescription());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -58,36 +58,34 @@ import de.jensd.fx.fontawesome.AwesomeIcon;
|
||||
// TODO Arbitration is very basic yet
|
||||
public class ArbitratorRegistrationView extends ActivatableView<AnchorPane, Void> {
|
||||
|
||||
private final Persistence persistence;
|
||||
private final WalletService walletService;
|
||||
private final MessageService messageService;
|
||||
private final User user;
|
||||
private final BSFormatter formatter;
|
||||
private Arbitrator arbitrator = new Arbitrator();
|
||||
private boolean isEditMode;
|
||||
|
||||
private List<Locale> languageList = new ArrayList<>();
|
||||
|
||||
private List<Arbitrator.METHOD> methodList = new ArrayList<>();
|
||||
|
||||
private List<Arbitrator.ID_VERIFICATION> idVerificationList = new ArrayList<>();
|
||||
private Arbitrator.ID_TYPE idType;
|
||||
|
||||
@FXML Accordion accordion;
|
||||
@FXML TitledPane profileTitledPane, paySecurityDepositTitledPane;
|
||||
@FXML TextArea descriptionTextArea;
|
||||
@FXML Button saveProfileButton, paymentDoneButton;
|
||||
@FXML Label nameLabel, infoLabel, copyIcon, confirmationLabel;
|
||||
@FXML ComboBox<Locale> languageComboBox;
|
||||
@FXML ComboBox<Arbitrator.ID_TYPE> idTypeComboBox;
|
||||
@FXML ComboBox<Arbitrator.METHOD> methodsComboBox;
|
||||
@FXML ConfidenceProgressIndicator progressIndicator;
|
||||
@FXML ComboBox<Arbitrator.ID_VERIFICATION> idVerificationsComboBox;
|
||||
@FXML TitledPane profileTitledPane, paySecurityDepositTitledPane;
|
||||
@FXML TextField nameTextField, idTypeTextField, languagesTextField, maxTradeVolumeTextField,
|
||||
passiveServiceFeeTextField, minPassiveServiceFeeTextField, arbitrationFeeTextField,
|
||||
minArbitrationFeeTextField, methodsTextField, idVerificationsTextField, webPageTextField,
|
||||
securityDepositAddressTextField, balanceTextField;
|
||||
@FXML TextArea descriptionTextArea;
|
||||
@FXML ConfidenceProgressIndicator progressIndicator;
|
||||
|
||||
private boolean isEditMode;
|
||||
private Arbitrator.ID_TYPE idType;
|
||||
|
||||
private List<Locale> languageList = new ArrayList<>();
|
||||
private List<Arbitrator.METHOD> methodList = new ArrayList<>();
|
||||
private List<Arbitrator.ID_VERIFICATION> idVerificationList = new ArrayList<>();
|
||||
private Arbitrator arbitrator = new Arbitrator();
|
||||
|
||||
private final Persistence persistence;
|
||||
private final WalletService walletService;
|
||||
private final MessageService messageService;
|
||||
private final User user;
|
||||
private final BSFormatter formatter;
|
||||
|
||||
@Inject
|
||||
private ArbitratorRegistrationView(Persistence persistence, WalletService walletService,
|
||||
@ -99,7 +97,6 @@ public class ArbitratorRegistrationView extends ActivatableView<AnchorPane, Void
|
||||
this.formatter = formatter;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
accordion.setExpandedPane(profileTitledPane);
|
||||
@ -187,7 +184,6 @@ public class ArbitratorRegistrationView extends ActivatableView<AnchorPane, Void
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@FXML
|
||||
public void onSelectIDType() {
|
||||
idType = idTypeComboBox.getSelectionModel().getSelectedItem();
|
||||
@ -244,7 +240,6 @@ public class ArbitratorRegistrationView extends ActivatableView<AnchorPane, Void
|
||||
methodsTextField.setText("");
|
||||
}
|
||||
|
||||
|
||||
@FXML
|
||||
public void onAddIDVerification() {
|
||||
Arbitrator.ID_VERIFICATION idVerification = idVerificationsComboBox.getSelectionModel().getSelectedItem();
|
||||
@ -287,7 +282,6 @@ public class ArbitratorRegistrationView extends ActivatableView<AnchorPane, Void
|
||||
public void onPaymentDone() {
|
||||
}
|
||||
|
||||
|
||||
private void setupPaySecurityDepositScreen() {
|
||||
infoLabel.setText("You need to pay 2 x the max. trading volume as security deposit.\n\nThat payment will be " +
|
||||
"locked into a MultiSig fund and be refunded when you leave the arbitration pool.\nIn case of fraud " +
|
||||
|
@ -28,26 +28,19 @@ import javafx.fxml.FXML;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.layout.*;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ChangePasswordView extends InitializableView<GridPane, ChangePasswordViewModel> implements Wizard.Step {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ChangePasswordView.class);
|
||||
|
||||
@FXML HBox buttonsHBox;
|
||||
@FXML Button saveButton, skipButton;
|
||||
@FXML PasswordField oldPasswordField, passwordField, repeatedPasswordField;
|
||||
|
||||
private Wizard parent;
|
||||
|
||||
|
||||
@Inject
|
||||
private ChangePasswordView(ChangePasswordViewModel model) {
|
||||
super(model);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
passwordField.textProperty().bindBidirectional(model.passwordField);
|
||||
@ -66,7 +59,6 @@ public class ChangePasswordView extends InitializableView<GridPane, ChangePasswo
|
||||
buttonsHBox.getChildren().remove(skipButton);
|
||||
}
|
||||
|
||||
|
||||
@FXML
|
||||
private void onSaved() {
|
||||
if (model.requestSavePassword())
|
||||
@ -84,6 +76,5 @@ public class ChangePasswordView extends InitializableView<GridPane, ChangePasswo
|
||||
private void onSkipped() {
|
||||
parent.nextStep(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -60,19 +60,16 @@ public class FiatAccountView extends ActivatableViewAndModel<GridPane, FiatAccou
|
||||
@FXML ComboBox<BankAccountType> typesComboBox;
|
||||
@FXML ComboBox<Currency> currencyComboBox;
|
||||
|
||||
private final OverlayManager overlayManager;
|
||||
|
||||
private Wizard parent;
|
||||
|
||||
private final OverlayManager overlayManager;
|
||||
|
||||
@Inject
|
||||
FiatAccountView(FiatAccountViewModel model, OverlayManager overlayManager) {
|
||||
public FiatAccountView(FiatAccountViewModel model, OverlayManager overlayManager) {
|
||||
super(model);
|
||||
|
||||
this.overlayManager = overlayManager;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
typesComboBox.setItems(model.getAllTypes());
|
||||
@ -98,8 +95,6 @@ public class FiatAccountView extends ActivatableViewAndModel<GridPane, FiatAccou
|
||||
selectionComboBox.setItems(model.getAllBankAccounts());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void setParent(Wizard parent) {
|
||||
this.parent = parent;
|
||||
@ -110,7 +105,6 @@ public class FiatAccountView extends ActivatableViewAndModel<GridPane, FiatAccou
|
||||
buttonsHBox.getChildren().remove(completedButton);
|
||||
}
|
||||
|
||||
|
||||
@FXML
|
||||
void onSelectAccount() {
|
||||
if (selectionComboBox.getSelectionModel().getSelectedItem() != null)
|
||||
@ -259,7 +253,6 @@ public class FiatAccountView extends ActivatableViewAndModel<GridPane, FiatAccou
|
||||
removeBankAccountButton.disableProperty().bind(createBooleanBinding(() ->
|
||||
(selectionComboBox.getSelectionModel().selectedIndexProperty().get() == -1),
|
||||
selectionComboBox.getSelectionModel().selectedIndexProperty()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,16 +36,11 @@ import javafx.scene.control.*;
|
||||
import javafx.scene.layout.*;
|
||||
import javafx.util.Callback;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/*
|
||||
Just temporary for giving the user a possibility to test the app via simulating the bank transfer in a IRC chat.
|
||||
/**
|
||||
* Just temporary for giving the user a possibility to test the app via simulating the bank transfer in a IRC chat.
|
||||
*/
|
||||
public class IrcAccountView extends ActivatableViewAndModel<GridPane, IrcAccountViewModel> implements Wizard.Step {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(IrcAccountView.class);
|
||||
|
||||
@FXML HBox buttonsHBox;
|
||||
@FXML InputTextField ircNickNameTextField;
|
||||
@FXML Button saveButton;
|
||||
@ -54,13 +49,11 @@ public class IrcAccountView extends ActivatableViewAndModel<GridPane, IrcAccount
|
||||
|
||||
private Wizard parent;
|
||||
|
||||
|
||||
@Inject
|
||||
IrcAccountView(IrcAccountViewModel model) {
|
||||
public IrcAccountView(IrcAccountViewModel model) {
|
||||
super(model);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void doActivate() {
|
||||
ircNickNameTextField.setValidator(model.getNickNameValidator());
|
||||
@ -135,7 +128,6 @@ public class IrcAccountView extends ActivatableViewAndModel<GridPane, IrcAccount
|
||||
"bank transfer."));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setParent(Wizard parent) {
|
||||
this.parent = parent;
|
||||
@ -145,8 +137,6 @@ public class IrcAccountView extends ActivatableViewAndModel<GridPane, IrcAccount
|
||||
public void hideWizardNavigation() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@FXML
|
||||
void onSelectType() {
|
||||
model.setType(typesComboBox.getSelectionModel().getSelectedItem());
|
||||
@ -179,7 +169,6 @@ public class IrcAccountView extends ActivatableViewAndModel<GridPane, IrcAccount
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void setupListeners() {
|
||||
model.type.addListener((ov, oldValue, newValue) -> {
|
||||
if (newValue != null)
|
||||
@ -201,7 +190,5 @@ public class IrcAccountView extends ActivatableViewAndModel<GridPane, IrcAccount
|
||||
ircNickNameTextField.textProperty().bindBidirectional(model.ircNickName);
|
||||
saveButton.disableProperty().bind(model.saveButtonDisable);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -28,28 +28,19 @@ import javafx.fxml.FXML;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.layout.*;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class PasswordView extends InitializableView<GridPane, PasswordViewModel> implements Wizard.Step {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(PasswordView.class);
|
||||
|
||||
@FXML HBox buttonsHBox;
|
||||
@FXML Button saveButton, skipButton;
|
||||
@FXML PasswordField oldPasswordField, passwordField, repeatedPasswordField;
|
||||
|
||||
private Wizard parent;
|
||||
|
||||
|
||||
|
||||
@Inject
|
||||
private PasswordView(PasswordViewModel model) {
|
||||
super(model);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
passwordField.textProperty().bindBidirectional(model.passwordField);
|
||||
@ -58,8 +49,6 @@ public class PasswordView extends InitializableView<GridPane, PasswordViewModel>
|
||||
saveButton.disableProperty().bind(model.saveButtonDisabled);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void setParent(Wizard parent) {
|
||||
this.parent = parent;
|
||||
@ -70,15 +59,12 @@ public class PasswordView extends InitializableView<GridPane, PasswordViewModel>
|
||||
buttonsHBox.getChildren().remove(skipButton);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@FXML
|
||||
private void onSaved() {
|
||||
if (model.requestSavePassword())
|
||||
parent.nextStep(this);
|
||||
else
|
||||
// TODO use validating passwordTF
|
||||
log.debug(model.getErrorMessage());
|
||||
log.debug(model.getErrorMessage()); // TODO use validating passwordTF
|
||||
}
|
||||
|
||||
@FXML
|
||||
|
@ -43,8 +43,6 @@ import org.controlsfx.dialog.Dialog;
|
||||
|
||||
public class RegistrationView extends InitializableView<GridPane, RegistrationViewModel> implements Wizard.Step {
|
||||
|
||||
private final OverlayManager overlayManager;
|
||||
|
||||
@FXML TextField feeTextField;
|
||||
@FXML AddressTextField addressTextField;
|
||||
@FXML BalanceTextField balanceTextField;
|
||||
@ -54,7 +52,7 @@ public class RegistrationView extends InitializableView<GridPane, RegistrationVi
|
||||
|
||||
private Wizard parent;
|
||||
|
||||
|
||||
private final OverlayManager overlayManager;
|
||||
|
||||
@Inject
|
||||
private RegistrationView(RegistrationViewModel model, OverlayManager overlayManager) {
|
||||
@ -62,8 +60,6 @@ public class RegistrationView extends InitializableView<GridPane, RegistrationVi
|
||||
this.overlayManager = overlayManager;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
feeTextField.setText(model.getFeeAsString());
|
||||
@ -128,7 +124,6 @@ public class RegistrationView extends InitializableView<GridPane, RegistrationVi
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setParent(Wizard parent) {
|
||||
this.parent = parent;
|
||||
@ -138,8 +133,6 @@ public class RegistrationView extends InitializableView<GridPane, RegistrationVi
|
||||
public void hideWizardNavigation() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@FXML
|
||||
private void onPayFee() {
|
||||
model.payFee();
|
||||
@ -149,8 +142,5 @@ public class RegistrationView extends InitializableView<GridPane, RegistrationVi
|
||||
private void onOpenHelp() {
|
||||
Help.openWindow(HelpId.PAY_ACCOUNT_FEE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -53,12 +53,10 @@ public class RestrictionsView extends ActivatableViewAndModel<GridPane, Restrict
|
||||
@FXML ComboBox<Country> countryComboBox;
|
||||
@FXML Button completedButton, addAllEuroCountriesButton;
|
||||
|
||||
private final ViewLoader viewLoader;
|
||||
private final Stage primaryStage;
|
||||
|
||||
private Wizard parent;
|
||||
|
||||
|
||||
private final ViewLoader viewLoader;
|
||||
private final Stage primaryStage;
|
||||
|
||||
@Inject
|
||||
private RestrictionsView(RestrictionsViewModel model, ViewLoader viewLoader, Stage primaryStage) {
|
||||
@ -67,8 +65,6 @@ public class RestrictionsView extends ActivatableViewAndModel<GridPane, Restrict
|
||||
this.primaryStage = primaryStage;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
initLanguage();
|
||||
@ -85,7 +81,6 @@ public class RestrictionsView extends ActivatableViewAndModel<GridPane, Restrict
|
||||
arbitratorsListView.setItems(model.getArbitratorList());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setParent(Wizard parent) {
|
||||
this.parent = parent;
|
||||
@ -96,8 +91,6 @@ public class RestrictionsView extends ActivatableViewAndModel<GridPane, Restrict
|
||||
root.getChildren().remove(completedButton);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@FXML
|
||||
private void onAddLanguage() {
|
||||
model.addLanguage(languageComboBox.getSelectionModel().getSelectedItem());
|
||||
@ -151,8 +144,6 @@ public class RestrictionsView extends ActivatableViewAndModel<GridPane, Restrict
|
||||
Help.openWindow(HelpId.SETUP_RESTRICTION_ARBITRATORS);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected View loadView(Navigation.Item navigationItem) {
|
||||
ViewLoader.Item loaded = viewLoader.load(navigationItem.getFxmlUrl(), false);
|
||||
@ -178,8 +169,6 @@ public class RestrictionsView extends ActivatableViewAndModel<GridPane, Restrict
|
||||
return (View) loaded.controller;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void updateArbitratorList() {
|
||||
model.updateArbitratorList();
|
||||
arbitratorsListView.setItems(model.getArbitratorList());
|
||||
@ -333,23 +322,5 @@ public class RestrictionsView extends ActivatableViewAndModel<GridPane, Restrict
|
||||
private void removeArbitrator(Arbitrator arbitrator) {
|
||||
model.removeArbitrator(arbitrator);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* private void addCountry(Country country) {
|
||||
if (!countryList.contains(country) && country != null) {
|
||||
countryList.add(country);
|
||||
settings.addAcceptedCountry(country);
|
||||
saveSettings();
|
||||
}
|
||||
}*/
|
||||
|
||||
/* private void addLanguage(Locale locale) {
|
||||
if (locale != null && !languageList.contains(locale)) {
|
||||
languageList.add(locale);
|
||||
settings.addAcceptedLanguageLocale(locale);
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
|
@ -30,20 +30,16 @@ import javafx.scene.layout.*;
|
||||
|
||||
public class SeedWordsView extends InitializableView<GridPane, SeedWordsViewModel> implements Wizard.Step {
|
||||
|
||||
private Wizard parent;
|
||||
|
||||
@FXML Button completedButton;
|
||||
@FXML TextArea seedWordsTextArea;
|
||||
|
||||
|
||||
private Wizard parent;
|
||||
|
||||
@Inject
|
||||
private SeedWordsView(SeedWordsViewModel model) {
|
||||
super(model);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
seedWordsTextArea.setText(model.seedWords.get());
|
||||
@ -59,8 +55,6 @@ public class SeedWordsView extends InitializableView<GridPane, SeedWordsViewMode
|
||||
root.getChildren().remove(completedButton);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@FXML
|
||||
private void onCompleted() {
|
||||
parent.nextStep(this);
|
||||
|
@ -46,16 +46,12 @@ public class AccountSettingsView extends ActivatableViewAndModel {
|
||||
@FXML private VBox leftVBox;
|
||||
@FXML private AnchorPane content;
|
||||
|
||||
|
||||
|
||||
@Inject
|
||||
private AccountSettingsView(ViewLoader viewLoader, Navigation navigation) {
|
||||
this.viewLoader = viewLoader;
|
||||
this.navigation = navigation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
listener = navigationItems -> {
|
||||
@ -111,8 +107,6 @@ public class AccountSettingsView extends ActivatableViewAndModel {
|
||||
navigation.removeListener(listener);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected View loadView(Navigation.Item navigationItem) {
|
||||
ViewLoader.Item loaded = viewLoader.load(navigationItem.getFxmlUrl());
|
||||
@ -123,8 +117,6 @@ public class AccountSettingsView extends ActivatableViewAndModel {
|
||||
return child;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void selectMainMenuButton(Navigation.Item item) {
|
||||
switch (item) {
|
||||
case SEED_WORDS:
|
||||
@ -149,6 +141,7 @@ public class AccountSettingsView extends ActivatableViewAndModel {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class MenuItem extends ToggleButton {
|
||||
|
||||
MenuItem(Navigation navigation, String title, Navigation.Item navigationItem,
|
||||
|
@ -36,30 +36,23 @@ import javafx.scene.control.*;
|
||||
import javafx.scene.image.*;
|
||||
import javafx.scene.layout.*;
|
||||
|
||||
/**
|
||||
* This UI is not cached as it is normally only needed once.
|
||||
*/
|
||||
public class AccountSetupWizard extends ActivatableView implements Wizard {
|
||||
|
||||
private WizardItem seedWords, password, fiatAccount, restrictions, registration;
|
||||
private Navigation.Listener listener;
|
||||
|
||||
@FXML VBox leftVBox;
|
||||
@FXML AnchorPane content;
|
||||
|
||||
private WizardItem seedWords, password, fiatAccount, restrictions, registration;
|
||||
private Navigation.Listener listener;
|
||||
|
||||
private final ViewLoader viewLoader;
|
||||
private final Navigation navigation;
|
||||
|
||||
|
||||
|
||||
@Inject
|
||||
private AccountSetupWizard(ViewLoader viewLoader, Navigation navigation) {
|
||||
this.viewLoader = viewLoader;
|
||||
this.navigation = navigation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
listener = navigationItems -> {
|
||||
@ -130,7 +123,6 @@ public class AccountSetupWizard extends ActivatableView implements Wizard {
|
||||
navigation.removeListener(listener);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void nextStep(Step currentStep) {
|
||||
if (currentStep instanceof SeedWordsView) {
|
||||
@ -159,8 +151,6 @@ public class AccountSetupWizard extends ActivatableView implements Wizard {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected View loadView(Navigation.Item navigationItem) {
|
||||
ViewLoader.Item loaded = viewLoader.load(navigationItem.getFxmlUrl());
|
||||
@ -172,6 +162,7 @@ public class AccountSetupWizard extends ActivatableView implements Wizard {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class WizardItem extends HBox {
|
||||
|
||||
private final ImageView imageView;
|
||||
|
@ -31,25 +31,21 @@ import javafx.scene.control.*;
|
||||
|
||||
public class FundsView extends ActivatableViewAndModel<TabPane, Activatable> {
|
||||
|
||||
@FXML Tab withdrawalTab, transactionsTab;
|
||||
|
||||
private Navigation.Listener navigationListener;
|
||||
private ChangeListener<Tab> tabChangeListener;
|
||||
private Tab currentTab;
|
||||
|
||||
@FXML Tab withdrawalTab, transactionsTab;
|
||||
|
||||
private final ViewLoader viewLoader;
|
||||
private final Navigation navigation;
|
||||
|
||||
|
||||
|
||||
@Inject
|
||||
FundsView(ViewLoader viewLoader, Navigation navigation) {
|
||||
this.viewLoader = viewLoader;
|
||||
this.navigation = navigation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
navigationListener = navigationItems -> {
|
||||
@ -83,8 +79,6 @@ public class FundsView extends ActivatableViewAndModel<TabPane, Activatable> {
|
||||
navigation.removeListener(navigationListener);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected View loadView(Navigation.Item navigationItem) {
|
||||
// we want to get activate/deactivate called, so we remove the old view on tab change
|
||||
@ -104,6 +98,5 @@ public class FundsView extends ActivatableViewAndModel<TabPane, Activatable> {
|
||||
root.getSelectionModel().select(currentTab);
|
||||
return (View) loaded.controller;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -38,15 +38,14 @@ import javafx.util.Callback;
|
||||
|
||||
public class TransactionsView extends ActivatableViewAndModel {
|
||||
|
||||
private final WalletService walletService;
|
||||
private final BSFormatter formatter;
|
||||
private ObservableList<TransactionsListItem> transactionsListItems;
|
||||
|
||||
@FXML TableView<TransactionsListItem> table;
|
||||
@FXML TableColumn<TransactionsListItem, TransactionsListItem> dateColumn, addressColumn, amountColumn, typeColumn,
|
||||
confidenceColumn;
|
||||
|
||||
private ObservableList<TransactionsListItem> transactionsListItems;
|
||||
|
||||
private final WalletService walletService;
|
||||
private final BSFormatter formatter;
|
||||
|
||||
@Inject
|
||||
private TransactionsView(WalletService walletService, BSFormatter formatter) {
|
||||
@ -54,8 +53,6 @@ public class TransactionsView extends ActivatableViewAndModel {
|
||||
this.formatter = formatter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
|
||||
@ -81,10 +78,6 @@ public class TransactionsView extends ActivatableViewAndModel {
|
||||
transactionsListItem.cleanup();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void openTxDetails(TransactionsListItem item) {
|
||||
// TODO Open popup with details view
|
||||
log.debug("openTxDetails " + item);
|
||||
@ -93,8 +86,6 @@ public class TransactionsView extends ActivatableViewAndModel {
|
||||
"This will open a details popup but that is not implemented yet.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void setAddressColumnCellFactory() {
|
||||
addressColumn.setCellValueFactory((addressListItem) -> new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
|
||||
addressColumn.setCellFactory(
|
||||
@ -154,6 +145,5 @@ public class TransactionsView extends ActivatableViewAndModel {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -55,18 +55,16 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class WithdrawalView extends ActivatableViewAndModel {
|
||||
|
||||
@FXML TableView<WithdrawalListItem> table;
|
||||
@FXML Button addNewAddressButton;
|
||||
@FXML TextField withdrawFromTextField, withdrawToTextField, amountTextField;
|
||||
@FXML TableColumn<WithdrawalListItem, WithdrawalListItem> labelColumn, addressColumn, balanceColumn, copyColumn,
|
||||
confidenceColumn;
|
||||
|
||||
private final WalletService walletService;
|
||||
private final BSFormatter formatter;
|
||||
private final ObservableList<WithdrawalListItem> addressList = FXCollections.observableArrayList();
|
||||
|
||||
@FXML TableView<WithdrawalListItem> table;
|
||||
@FXML TableColumn<WithdrawalListItem, WithdrawalListItem> labelColumn, addressColumn, balanceColumn, copyColumn,
|
||||
confidenceColumn;
|
||||
@FXML Button addNewAddressButton;
|
||||
@FXML TextField withdrawFromTextField, withdrawToTextField, amountTextField;
|
||||
|
||||
|
||||
|
||||
@Inject
|
||||
private WithdrawalView(WalletService walletService, BSFormatter formatter) {
|
||||
this.walletService = walletService;
|
||||
@ -120,8 +118,6 @@ public class WithdrawalView extends ActivatableViewAndModel {
|
||||
item.cleanup();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@FXML
|
||||
public void onWithdraw() {
|
||||
Coin amount = formatter.parseToCoin(amountTextField.getText());
|
||||
@ -178,8 +174,6 @@ public class WithdrawalView extends ActivatableViewAndModel {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void fillList() {
|
||||
addressList.clear();
|
||||
List<AddressEntry> addressEntryList = walletService.getAddressEntryList();
|
||||
@ -189,7 +183,6 @@ public class WithdrawalView extends ActivatableViewAndModel {
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
|
||||
private void setLabelColumnCellFactory() {
|
||||
labelColumn.setCellValueFactory((addressListItem) -> new ReadOnlyObjectWrapper<>(addressListItem.getValue()));
|
||||
labelColumn.setCellFactory(new Callback<TableColumn<WithdrawalListItem, WithdrawalListItem>,
|
||||
|
@ -23,18 +23,5 @@ import javax.inject.Inject;
|
||||
|
||||
// will be probably only used for arbitration communication, will be renamed and the icon changed
|
||||
public class MsgView extends AbstractView {
|
||||
|
||||
|
||||
@Inject
|
||||
private MsgView() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -32,27 +32,23 @@ import javafx.scene.control.*;
|
||||
|
||||
public class PortfolioView extends ActivatableViewAndModel<TabPane, Activatable> {
|
||||
|
||||
@FXML Tab offersTab, openTradesTab, closedTradesTab;
|
||||
|
||||
private Tab currentTab;
|
||||
private Navigation.Listener navigationListener;
|
||||
private ChangeListener<Tab> tabChangeListener;
|
||||
|
||||
@FXML Tab offersTab, openTradesTab, closedTradesTab;
|
||||
|
||||
private final ViewLoader viewLoader;
|
||||
private final Navigation navigation;
|
||||
private final TradeManager tradeManager;
|
||||
|
||||
|
||||
|
||||
@Inject
|
||||
PortfolioView(ViewLoader viewLoader, Navigation navigation, TradeManager tradeManager) {
|
||||
public PortfolioView(ViewLoader viewLoader, Navigation navigation, TradeManager tradeManager) {
|
||||
this.viewLoader = viewLoader;
|
||||
this.navigation = navigation;
|
||||
this.tradeManager = tradeManager;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
navigationListener = navigationItems -> {
|
||||
@ -90,8 +86,6 @@ public class PortfolioView extends ActivatableViewAndModel<TabPane, Activatable>
|
||||
currentTab = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected View loadView(Navigation.Item navigationItem) {
|
||||
|
||||
|
@ -30,19 +30,15 @@ import javafx.util.Callback;
|
||||
|
||||
public class ClosedTradesView extends ActivatableViewAndModel<GridPane, ClosedTradesViewModel> {
|
||||
|
||||
@FXML TableView<ClosedTradesListItem> table;
|
||||
@FXML TableColumn<ClosedTradesListItem, ClosedTradesListItem> priceColumn, amountColumn, volumeColumn,
|
||||
directionColumn, dateColumn, tradeIdColumn;
|
||||
@FXML TableView<ClosedTradesListItem> table;
|
||||
|
||||
|
||||
|
||||
@Inject
|
||||
private ClosedTradesView(ClosedTradesViewModel model) {
|
||||
public ClosedTradesView(ClosedTradesViewModel model) {
|
||||
super(model);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
setTradeIdColumnCellFactory();
|
||||
@ -61,8 +57,6 @@ public class ClosedTradesView extends ActivatableViewAndModel<GridPane, ClosedTr
|
||||
table.setItems(model.getList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void openOfferDetails(ClosedTradesListItem item) {
|
||||
// TODO Open popup with details view
|
||||
log.debug("Trade details " + item);
|
||||
@ -70,8 +64,6 @@ public class ClosedTradesView extends ActivatableViewAndModel<GridPane, ClosedTr
|
||||
"popup but that is not implemented yet.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void setTradeIdColumnCellFactory() {
|
||||
tradeIdColumn.setCellValueFactory((offerListItem) -> new ReadOnlyObjectWrapper<>(offerListItem.getValue()));
|
||||
tradeIdColumn.setCellFactory(
|
||||
|
@ -32,19 +32,15 @@ import javafx.util.Callback;
|
||||
|
||||
public class OffersView extends ActivatableViewAndModel<GridPane, OffersViewModel> {
|
||||
|
||||
@FXML TableView<OfferListItem> table;
|
||||
@FXML TableColumn<OfferListItem, OfferListItem> priceColumn, amountColumn, volumeColumn,
|
||||
directionColumn, dateColumn, offerIdColumn, removeItemColumn;
|
||||
@FXML TableView<OfferListItem> table;
|
||||
|
||||
|
||||
|
||||
@Inject
|
||||
private OffersView(OffersViewModel model) {
|
||||
public OffersView(OffersViewModel model) {
|
||||
super(model);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
setOfferIdColumnCellFactory();
|
||||
@ -64,7 +60,6 @@ public class OffersView extends ActivatableViewAndModel<GridPane, OffersViewMode
|
||||
table.setItems(model.getList());
|
||||
}
|
||||
|
||||
|
||||
private void removeOffer(OfferListItem item) {
|
||||
model.removeOffer(item);
|
||||
}
|
||||
@ -79,8 +74,6 @@ public class OffersView extends ActivatableViewAndModel<GridPane, OffersViewMode
|
||||
"Later this will open a details popup but that is not implemented yet.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void setOfferIdColumnCellFactory() {
|
||||
offerIdColumn.setCellValueFactory((offerListItem) -> new ReadOnlyObjectWrapper<>(offerListItem.getValue()));
|
||||
offerIdColumn.setCellFactory(
|
||||
@ -135,7 +128,6 @@ public class OffersView extends ActivatableViewAndModel<GridPane, OffersViewMode
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void setAmountColumnCellFactory() {
|
||||
amountColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
|
||||
amountColumn.setCellFactory(
|
||||
@ -215,7 +207,6 @@ public class OffersView extends ActivatableViewAndModel<GridPane, OffersViewMode
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void setRemoveColumnCellFactory() {
|
||||
removeItemColumn.setCellValueFactory((offerListItem) -> new ReadOnlyObjectWrapper<>(offerListItem.getValue()));
|
||||
removeItemColumn.setCellFactory(
|
||||
|
@ -54,29 +54,21 @@ import javafx.util.StringConverter;
|
||||
|
||||
public class PendingTradesView extends ActivatableViewAndModel<AnchorPane, PendingTradesViewModel> {
|
||||
|
||||
private ChangeListener<PendingTradesListItem> selectedItemChangeListener;
|
||||
private ListChangeListener<PendingTradesListItem> listChangeListener;
|
||||
private ChangeListener<String> txIdChangeListener;
|
||||
private ChangeListener<PendingTradesViewModel.State> offererStateChangeListener;
|
||||
private ChangeListener<PendingTradesViewModel.State> takerStateChangeListener;
|
||||
private ChangeListener<Throwable> faultChangeListener;
|
||||
private final Navigation navigation;
|
||||
|
||||
@FXML ScrollPane scrollPane;
|
||||
@FXML GridPane gridPane;
|
||||
@FXML TitledGroupBg titledGroupBg, paymentsGroupBg, summaryGroupBg, withdrawGroupBg;
|
||||
@FXML ScrollPane scrollPane;
|
||||
@FXML ProcessStepBar processBar;
|
||||
@FXML TxIdTextField txIdTextField;
|
||||
@FXML TableView<PendingTradesListItem> table;
|
||||
@FXML InputTextField withdrawAddressTextField;
|
||||
@FXML InfoDisplay infoDisplay, paymentsInfoDisplay, summaryInfoDisplay;
|
||||
@FXML Button confirmPaymentReceiptButton, paymentsButton, withdrawButton;
|
||||
@FXML TitledGroupBg titledGroupBg, paymentsGroupBg, summaryGroupBg, withdrawGroupBg;
|
||||
@FXML TextFieldWithCopyIcon fiatAmountTextField, holderNameTextField, secondaryIdTextField, primaryIdTextField;
|
||||
@FXML TextField statusTextField, paymentMethodTextField, btcTradeAmountTextField, fiatTradeAmountTextField,
|
||||
feesTextField, securityDepositTextField, withdrawAmountTextField;
|
||||
@FXML Label statusLabel, txIdLabel, paymentMethodLabel, fiatAmountLabel, holderNameLabel, primaryIdLabel,
|
||||
secondaryIdLabel, btcTradeAmountLabel, fiatTradeAmountLabel, feesLabel, securityDepositLabel,
|
||||
withdrawAmountLabel, withdrawAddressLabel;
|
||||
@FXML TextField statusTextField, paymentMethodTextField, btcTradeAmountTextField, fiatTradeAmountTextField,
|
||||
feesTextField, securityDepositTextField, withdrawAmountTextField;
|
||||
@FXML InputTextField withdrawAddressTextField;
|
||||
@FXML TxIdTextField txIdTextField;
|
||||
@FXML InfoDisplay infoDisplay, paymentsInfoDisplay, summaryInfoDisplay;
|
||||
@FXML Button confirmPaymentReceiptButton, paymentsButton, withdrawButton;
|
||||
@FXML TextFieldWithCopyIcon fiatAmountTextField, holderNameTextField, secondaryIdTextField, primaryIdTextField;
|
||||
@FXML TableView<PendingTradesListItem> table;
|
||||
|
||||
@FXML TableColumn<PendingTradesListItem, Fiat> priceColumn;
|
||||
@FXML TableColumn<PendingTradesListItem, Fiat> tradeVolumeColumn;
|
||||
@ -85,17 +77,22 @@ public class PendingTradesView extends ActivatableViewAndModel<AnchorPane, Pendi
|
||||
@FXML TableColumn<PendingTradesListItem, Date> dateColumn;
|
||||
@FXML TableColumn<PendingTradesListItem, Coin> tradeAmountColumn;
|
||||
|
||||
private ChangeListener<PendingTradesListItem> selectedItemChangeListener;
|
||||
private ListChangeListener<PendingTradesListItem> listChangeListener;
|
||||
private ChangeListener<String> txIdChangeListener;
|
||||
private ChangeListener<PendingTradesViewModel.State> offererStateChangeListener;
|
||||
private ChangeListener<PendingTradesViewModel.State> takerStateChangeListener;
|
||||
private ChangeListener<Throwable> faultChangeListener;
|
||||
|
||||
private final Navigation navigation;
|
||||
|
||||
@Inject
|
||||
PendingTradesView(PendingTradesViewModel model, Navigation navigation) {
|
||||
public PendingTradesView(PendingTradesViewModel model, Navigation navigation) {
|
||||
super(model);
|
||||
|
||||
this.navigation = navigation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
setTradeIdColumnCellFactory();
|
||||
@ -167,8 +164,6 @@ public class PendingTradesView extends ActivatableViewAndModel<AnchorPane, Pendi
|
||||
model.state.removeListener(takerStateChangeListener);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@FXML
|
||||
void onPaymentStarted() {
|
||||
model.fiatPaymentStarted();
|
||||
@ -342,7 +337,6 @@ public class PendingTradesView extends ActivatableViewAndModel<AnchorPane, Pendi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void applyTakerState(PendingTradesViewModel.State state) {
|
||||
confirmPaymentReceiptButton.setVisible(false);
|
||||
confirmPaymentReceiptButton.setManaged(false);
|
||||
@ -507,8 +501,6 @@ public class PendingTradesView extends ActivatableViewAndModel<AnchorPane, Pendi
|
||||
Platform.runLater(() -> scrollPane.setVvalue(visible ? scrollPane.getVmax() : 0));
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void setTradeIdColumnCellFactory() {
|
||||
idColumn.setCellFactory(
|
||||
new Callback<TableColumn<PendingTradesListItem, String>, TableCell<PendingTradesListItem, String>>() {
|
||||
@ -540,7 +532,6 @@ public class PendingTradesView extends ActivatableViewAndModel<AnchorPane, Pendi
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void setDateColumnCellFactory() {
|
||||
dateColumn.setCellFactory(TextFieldTableCell.<PendingTradesListItem, Date>forTableColumn(
|
||||
new StringConverter<Date>() {
|
||||
|
@ -32,26 +32,22 @@ import javafx.scene.control.*;
|
||||
|
||||
public class SettingsView extends ActivatableViewAndModel<TabPane, Activatable> {
|
||||
|
||||
private final ViewLoader viewLoader;
|
||||
private final Navigation navigation;
|
||||
private Preferences preferences;
|
||||
@FXML Tab preferencesTab, networkSettingsTab;
|
||||
|
||||
private Preferences preferences;
|
||||
private Navigation.Listener navigationListener;
|
||||
private ChangeListener<Tab> tabChangeListener;
|
||||
|
||||
@FXML Tab preferencesTab, networkSettingsTab;
|
||||
|
||||
|
||||
private final ViewLoader viewLoader;
|
||||
private final Navigation navigation;
|
||||
|
||||
@Inject
|
||||
SettingsView(ViewLoader viewLoader, Navigation navigation, Preferences preferences) {
|
||||
public SettingsView(ViewLoader viewLoader, Navigation navigation, Preferences preferences) {
|
||||
this.viewLoader = viewLoader;
|
||||
this.navigation = navigation;
|
||||
this.preferences = preferences;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
navigationListener = navigationItems -> {
|
||||
@ -91,8 +87,6 @@ public class SettingsView extends ActivatableViewAndModel<TabPane, Activatable>
|
||||
navigation.removeListener(navigationListener);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected View loadView(Navigation.Item navigationItem) {
|
||||
ViewLoader.Item loaded = viewLoader.load(navigationItem.getFxmlUrl());
|
||||
@ -111,6 +105,5 @@ public class SettingsView extends ActivatableViewAndModel<TabPane, Activatable>
|
||||
root.getSelectionModel().select(tab);
|
||||
return (View) loaded.controller;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -25,23 +25,16 @@ import javafx.fxml.FXML;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.layout.*;
|
||||
|
||||
/**
|
||||
* This UI is not cached as it is normally only needed once.
|
||||
*/
|
||||
public class PreferencesView extends ActivatableViewAndModel<GridPane, PreferencesViewModel> {
|
||||
|
||||
@FXML ComboBox<String> btcDenominationComboBox;
|
||||
@FXML CheckBox useAnimationsCheckBox, useEffectsCheckBox;
|
||||
|
||||
|
||||
|
||||
@Inject
|
||||
private PreferencesView(PreferencesViewModel model) {
|
||||
public PreferencesView(PreferencesViewModel model) {
|
||||
super(model);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void doActivate() {
|
||||
btcDenominationComboBox.setItems(model.getBtcDenominationItems());
|
||||
@ -58,8 +51,6 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||
useEffectsCheckBox.selectedProperty().unbind();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@FXML
|
||||
void onSelectBtcDenomination() {
|
||||
model.btcDenomination().set(btcDenominationComboBox.getSelectionModel().getSelectedItem());
|
||||
|
@ -55,15 +55,11 @@ public class TradeView extends ActivatableView<TabPane, Void> {
|
||||
private final ViewLoader viewLoader;
|
||||
private final Navigation navigation;
|
||||
|
||||
|
||||
|
||||
protected TradeView(ViewLoader viewLoader, Navigation navigation) {
|
||||
this.viewLoader = viewLoader;
|
||||
this.navigation = navigation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void initialize() {
|
||||
direction = (this instanceof BuyView) ? Direction.BUY : Direction.SELL;
|
||||
@ -121,8 +117,6 @@ public class TradeView extends ActivatableView<TabPane, Void> {
|
||||
navigation.navigationTo(Navigation.Item.MAIN, navigationItem, Navigation.Item.TAKE_OFFER);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected View loadView(Navigation.Item navigationItem) {
|
||||
TabPane tabPane = root;
|
||||
@ -172,10 +166,6 @@ public class TradeView extends ActivatableView<TabPane, Void> {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void onCreateOfferViewRemoved() {
|
||||
createOfferView = null;
|
||||
offerBookView.enableCreateOfferButton();
|
||||
@ -190,6 +180,5 @@ public class TradeView extends ActivatableView<TabPane, Void> {
|
||||
// update the navigation state
|
||||
navigation.navigationTo(Navigation.Item.MAIN, navigationItem, Navigation.Item.OFFER_BOOK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -67,40 +67,34 @@ import static javafx.beans.binding.Bindings.createStringBinding;
|
||||
// priceAmountHBox is too large after redesign as to be used as layoutReference.
|
||||
public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateOfferViewModel> {
|
||||
|
||||
private final Navigation navigation;
|
||||
private final OverlayManager overlayManager;
|
||||
|
||||
private BooleanProperty tabIsClosable;
|
||||
|
||||
private boolean detailsVisible;
|
||||
private boolean advancedScreenInited;
|
||||
|
||||
private ImageView expand;
|
||||
private ImageView collapse;
|
||||
private PopOver totalToPayInfoPopover;
|
||||
|
||||
@FXML InfoDisplay advancedInfoDisplay, fundsBoxInfoDisplay;
|
||||
@FXML ScrollPane scrollPane;
|
||||
@FXML ImageView imageView;
|
||||
@FXML AddressTextField addressTextField;
|
||||
@FXML BalanceTextField balanceTextField;
|
||||
@FXML ProgressIndicator placeOfferSpinner;
|
||||
@FXML InfoDisplay advancedInfoDisplay, fundsBoxInfoDisplay;
|
||||
@FXML TitledGroupBg priceAmountPane, payFundsPane, showDetailsPane;
|
||||
@FXML Label buyLabel, addressLabel,
|
||||
balanceLabel, totalToPayLabel, totalToPayInfoIconLabel,
|
||||
bankAccountTypeLabel, bankAccountCurrencyLabel, bankAccountCountyLabel,
|
||||
acceptedCountriesLabel, acceptedCountriesLabelIcon, acceptedLanguagesLabel, acceptedLanguagesLabelIcon,
|
||||
acceptedArbitratorsLabel, acceptedArbitratorsLabelIcon, amountBtcLabel,
|
||||
priceFiatLabel, volumeFiatLabel, minAmountBtcLabel, priceDescriptionLabel, volumeDescriptionLabel,
|
||||
placeOfferSpinnerInfoLabel;
|
||||
@FXML Button showPaymentInfoScreenButton, showAdvancedSettingsButton, placeOfferButton;
|
||||
|
||||
@FXML InputTextField amountTextField, minAmountTextField, priceTextField, volumeTextField;
|
||||
@FXML TextField acceptedArbitratorsTextField, totalToPayTextField, bankAccountTypeTextField,
|
||||
bankAccountCurrencyTextField, bankAccountCountyTextField, acceptedCountriesTextField,
|
||||
acceptedLanguagesTextField;
|
||||
@FXML AddressTextField addressTextField;
|
||||
@FXML BalanceTextField balanceTextField;
|
||||
@FXML ProgressIndicator placeOfferSpinner;
|
||||
@FXML Label buyLabel, addressLabel, balanceLabel, totalToPayLabel, totalToPayInfoIconLabel, bankAccountTypeLabel,
|
||||
bankAccountCurrencyLabel, bankAccountCountyLabel, acceptedCountriesLabel, acceptedCountriesLabelIcon,
|
||||
acceptedLanguagesLabel, acceptedLanguagesLabelIcon, acceptedArbitratorsLabel,
|
||||
acceptedArbitratorsLabelIcon, amountBtcLabel, priceFiatLabel, volumeFiatLabel, minAmountBtcLabel,
|
||||
priceDescriptionLabel, volumeDescriptionLabel,
|
||||
placeOfferSpinnerInfoLabel;
|
||||
|
||||
private ImageView expand;
|
||||
private ImageView collapse;
|
||||
private PopOver totalToPayInfoPopover;
|
||||
private BooleanProperty tabIsClosable;
|
||||
private boolean detailsVisible;
|
||||
private boolean advancedScreenInited;
|
||||
|
||||
private final Navigation navigation;
|
||||
private final OverlayManager overlayManager;
|
||||
|
||||
@Inject
|
||||
private CreateOfferView(CreateOfferViewModel model, Navigation navigation,
|
||||
@ -110,8 +104,6 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||
this.overlayManager = overlayManager;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void initialize() {
|
||||
setupListeners();
|
||||
@ -126,7 +118,6 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||
tabIsClosable.unbind();
|
||||
}
|
||||
|
||||
|
||||
public void initWithData(Direction direction, Coin amount, Fiat price) {
|
||||
model.initWithData(direction, amount, price);
|
||||
|
||||
@ -141,8 +132,6 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||
tabIsClosable.bind(model.tabIsClosable);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@FXML
|
||||
void onPlaceOffer() {
|
||||
model.placeOffer();
|
||||
@ -230,8 +219,6 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||
Help.openWindow(HelpId.CREATE_OFFER_ADVANCED);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void openAccountSettings() {
|
||||
navigation.navigationTo(Navigation.Item.MAIN,
|
||||
Navigation.Item.ACCOUNT,
|
||||
@ -246,8 +233,6 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||
navigation.navigationTo(Navigation.Item.MAIN, Navigation.Item.PORTFOLIO, Navigation.Item.OFFERS);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void setupListeners() {
|
||||
scrollPane.setOnScroll(e -> InputTextField.hideErrorMessageDisplay());
|
||||
|
||||
|
@ -53,36 +53,31 @@ import org.controlsfx.dialog.Dialog;
|
||||
|
||||
import static javafx.beans.binding.Bindings.createStringBinding;
|
||||
|
||||
/**
|
||||
* TODO: The advanced filters are not impl. yet
|
||||
* The restrictions handling is open from the concept and is only implemented for countries yet.
|
||||
*/
|
||||
public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookViewModel> implements
|
||||
ChildView<TradeView> {
|
||||
public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookViewModel>
|
||||
implements ChildView<TradeView> {
|
||||
|
||||
@FXML CheckBox showOnlyMatchingCheckBox;
|
||||
@FXML TableView<OfferBookListItem> table;
|
||||
@FXML InputTextField volumeTextField, amountTextField, priceTextField;
|
||||
@FXML Button createOfferButton, showAdvancedSettingsButton, openCountryFilterButton, openPaymentMethodsFilterButton;
|
||||
@FXML TableColumn<OfferBookListItem, OfferBookListItem> priceColumn, amountColumn, volumeColumn, directionColumn,
|
||||
countryColumn, bankAccountTypeColumn;
|
||||
@FXML Label amountBtcLabel, priceDescriptionLabel, priceFiatLabel, volumeDescriptionLabel, volumeFiatLabel,
|
||||
extendedButton1Label, extendedButton2Label, extendedCheckBoxLabel;
|
||||
|
||||
private TradeView parent;
|
||||
private ImageView expand;
|
||||
private ImageView collapse;
|
||||
|
||||
private boolean detailsVisible;
|
||||
private boolean advancedScreenInited;
|
||||
|
||||
|
||||
private final Navigation navigation;
|
||||
private final OverlayManager overlayManager;
|
||||
private final OptionalBtcValidator optionalBtcValidator;
|
||||
private final OptionalFiatValidator optionalFiatValidator;
|
||||
|
||||
private boolean detailsVisible;
|
||||
private boolean advancedScreenInited;
|
||||
|
||||
private ImageView expand;
|
||||
private ImageView collapse;
|
||||
|
||||
@FXML CheckBox showOnlyMatchingCheckBox;
|
||||
@FXML Label amountBtcLabel, priceDescriptionLabel, priceFiatLabel, volumeDescriptionLabel,
|
||||
volumeFiatLabel, extendedButton1Label, extendedButton2Label, extendedCheckBoxLabel;
|
||||
@FXML InputTextField volumeTextField, amountTextField, priceTextField;
|
||||
@FXML TableView<OfferBookListItem> table;
|
||||
@FXML Button createOfferButton, showAdvancedSettingsButton, openCountryFilterButton, openPaymentMethodsFilterButton;
|
||||
@FXML TableColumn<OfferBookListItem, OfferBookListItem> priceColumn, amountColumn, volumeColumn,
|
||||
directionColumn, countryColumn, bankAccountTypeColumn;
|
||||
|
||||
private TradeView parent;
|
||||
|
||||
|
||||
@Inject
|
||||
OfferBookView(OfferBookViewModel model,
|
||||
Navigation navigation,
|
||||
@ -97,8 +92,6 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||
this.optionalFiatValidator = optionalFiatValidator;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
// init table
|
||||
@ -150,20 +143,14 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||
removeBindings();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void enableCreateOfferButton() {
|
||||
createOfferButton.setDisable(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setDirection(Direction direction) {
|
||||
model.setDirection(direction);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@FXML
|
||||
void createOffer() {
|
||||
if (model.isRegistered()) {
|
||||
@ -205,8 +192,6 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||
Popups.openWarningPopup("Under construction", "This feature is not implemented yet.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void openSetupScreen() {
|
||||
overlayManager.blurContent();
|
||||
List<Action> actions = new ArrayList<>();
|
||||
@ -309,8 +294,6 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||
showOnlyMatchingCheckBox.setManaged(visible);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void setupBindings() {
|
||||
amountTextField.textProperty().bindBidirectional(model.amount);
|
||||
priceTextField.textProperty().bindBidirectional(model.price);
|
||||
@ -362,13 +345,10 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||
.getBankAccountType()));
|
||||
}
|
||||
|
||||
|
||||
public void setParent(TradeView parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void setAmountColumnCellFactory() {
|
||||
amountColumn.setCellValueFactory((offer) -> new ReadOnlyObjectWrapper<>(offer.getValue()));
|
||||
amountColumn.setCellFactory(
|
||||
|
@ -64,40 +64,32 @@ import org.controlsfx.dialog.Dialog;
|
||||
|
||||
public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOfferViewModel> {
|
||||
|
||||
private final Navigation navigation;
|
||||
private final OverlayManager overlayManager;
|
||||
private BooleanProperty tabIsClosable;
|
||||
@FXML ScrollPane scrollPane;
|
||||
@FXML ImageView imageView;
|
||||
@FXML InputTextField amountTextField;
|
||||
@FXML AddressTextField addressTextField;
|
||||
@FXML BalanceTextField balanceTextField;
|
||||
@FXML ProgressIndicator takeOfferSpinner;
|
||||
@FXML InfoDisplay advancedInfoDisplay, fundsBoxInfoDisplay;
|
||||
@FXML TitledGroupBg priceAmountPane, payFundsPane, showDetailsPane;
|
||||
@FXML Button showPaymentInfoScreenButton, showAdvancedSettingsButton, takeOfferButton;
|
||||
@FXML TextField priceTextField, volumeTextField, acceptedArbitratorsTextField, totalToPayTextField,
|
||||
bankAccountTypeTextField, bankAccountCurrencyTextField, bankAccountCountyTextField,
|
||||
acceptedCountriesTextField, acceptedLanguagesTextField;
|
||||
@FXML Label buyLabel, addressLabel, amountRangeTextField, balanceLabel, totalToPayLabel, totalToPayInfoIconLabel,
|
||||
bankAccountTypeLabel, bankAccountCurrencyLabel, bankAccountCountyLabel, acceptedCountriesLabel,
|
||||
acceptedLanguagesLabel, acceptedArbitratorsLabel, amountBtcLabel, priceDescriptionLabel,
|
||||
volumeDescriptionLabel, takeOfferSpinnerInfoLabel;
|
||||
|
||||
private BooleanProperty tabIsClosable;
|
||||
private boolean detailsVisible;
|
||||
private boolean advancedScreenInited;
|
||||
|
||||
private ImageView expand;
|
||||
private ImageView collapse;
|
||||
private PopOver totalToPayInfoPopover;
|
||||
|
||||
@FXML InfoDisplay advancedInfoDisplay, fundsBoxInfoDisplay;
|
||||
@FXML ScrollPane scrollPane;
|
||||
@FXML ImageView imageView;
|
||||
@FXML TitledGroupBg priceAmountPane, payFundsPane, showDetailsPane;
|
||||
@FXML Label buyLabel, addressLabel, amountRangeTextField,
|
||||
balanceLabel, totalToPayLabel, totalToPayInfoIconLabel,
|
||||
bankAccountTypeLabel, bankAccountCurrencyLabel, bankAccountCountyLabel,
|
||||
acceptedCountriesLabel, acceptedLanguagesLabel,
|
||||
acceptedArbitratorsLabel, amountBtcLabel,
|
||||
priceDescriptionLabel, volumeDescriptionLabel, takeOfferSpinnerInfoLabel;
|
||||
@FXML Button showPaymentInfoScreenButton, showAdvancedSettingsButton, takeOfferButton;
|
||||
|
||||
@FXML InputTextField amountTextField;
|
||||
@FXML TextField priceTextField, volumeTextField, acceptedArbitratorsTextField,
|
||||
totalToPayTextField,
|
||||
bankAccountTypeTextField,
|
||||
bankAccountCurrencyTextField, bankAccountCountyTextField, acceptedCountriesTextField,
|
||||
acceptedLanguagesTextField;
|
||||
@FXML AddressTextField addressTextField;
|
||||
@FXML BalanceTextField balanceTextField;
|
||||
@FXML ProgressIndicator takeOfferSpinner;
|
||||
|
||||
|
||||
private final Navigation navigation;
|
||||
private final OverlayManager overlayManager;
|
||||
|
||||
@Inject
|
||||
private TakeOfferView(TakeOfferViewModel model, Navigation navigation,
|
||||
@ -108,15 +100,12 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
this.overlayManager = overlayManager;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
setupListeners();
|
||||
setupBindings();
|
||||
}
|
||||
|
||||
|
||||
public void initWithData(Direction direction, Coin amount, Offer offer) {
|
||||
model.initWithData(direction, amount, offer);
|
||||
|
||||
@ -152,7 +141,6 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
tabIsClosable.bind(model.tabIsClosable);
|
||||
}
|
||||
|
||||
|
||||
@FXML
|
||||
void onTakeOffer() {
|
||||
model.takeOffer();
|
||||
@ -240,15 +228,11 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
Help.openWindow(HelpId.TAKE_OFFER_ADVANCED);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void close() {
|
||||
TabPane tabPane = ((TabPane) (root.getParent().getParent()));
|
||||
tabPane.getTabs().remove(tabPane.getSelectionModel().getSelectedItem());
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void setupListeners() {
|
||||
scrollPane.setOnScroll(e -> InputTextField.hideErrorMessageDisplay());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user