From 2ac43f63d4c20a7281d0c88896b20ec99f0f3ed8 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 11 Nov 2014 16:56:09 +0100 Subject: [PATCH] Add 2 sub screens for preferences --- .../java/io/bitsquare/gui/Navigation.java | 6 +- src/main/java/io/bitsquare/gui/images.css | 8 +- .../io/bitsquare/gui/main/MainViewCB.java | 10 +- ...SettingsView.fxml => PreferencesView.fxml} | 13 +- .../gui/main/settings/PreferencesViewCB.java | 150 ++++++++++++++++++ .../ApplicationPreferencesModel.java | 84 ++++++++++ .../ApplicationPreferencesPM.java} | 55 +++---- .../ApplicationPreferencesView.fxml | 28 ++++ .../ApplicationPreferencesViewCB.java | 74 +++++++++ .../network/NetworkPreferencesModel.java | 84 ++++++++++ .../network/NetworkPreferencesPM.java | 84 ++++++++++ .../network/NetworkPreferencesView.fxml | 28 ++++ .../network/NetworkPreferencesViewCB.java | 77 +++++++++ .../nav/{settings.png => preferences.png} | Bin .../{settings@2x.png => preferences@2x.png} | Bin ...ings_active.png => preferences_active.png} | Bin ...ctive@2x.png => preferences_active@2x.png} | Bin src/main/resources/logback.xml | 5 +- 18 files changed, 647 insertions(+), 59 deletions(-) rename src/main/java/io/bitsquare/gui/main/settings/{SettingsView.fxml => PreferencesView.fxml} (77%) create mode 100644 src/main/java/io/bitsquare/gui/main/settings/PreferencesViewCB.java create mode 100644 src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesModel.java rename src/main/java/io/bitsquare/gui/main/settings/{SettingsViewCB.java => application/ApplicationPreferencesPM.java} (68%) create mode 100644 src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesView.fxml create mode 100644 src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesViewCB.java create mode 100644 src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesModel.java create mode 100644 src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesPM.java create mode 100644 src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesView.fxml create mode 100644 src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesViewCB.java rename src/main/resources/images/nav/{settings.png => preferences.png} (100%) rename src/main/resources/images/nav/{settings@2x.png => preferences@2x.png} (100%) rename src/main/resources/images/nav/{settings_active.png => preferences_active.png} (100%) rename src/main/resources/images/nav/{settings_active@2x.png => preferences_active@2x.png} (100%) diff --git a/src/main/java/io/bitsquare/gui/Navigation.java b/src/main/java/io/bitsquare/gui/Navigation.java index e128e83a7e..4f3b24950e 100644 --- a/src/main/java/io/bitsquare/gui/Navigation.java +++ b/src/main/java/io/bitsquare/gui/Navigation.java @@ -165,7 +165,7 @@ public class Navigation { PORTFOLIO("/io/bitsquare/gui/main/portfolio/PortfolioView.fxml"), FUNDS("/io/bitsquare/gui/main/funds/FundsView.fxml"), MSG("/io/bitsquare/gui/main/msg/MsgView.fxml"), - SETTINGS("/io/bitsquare/gui/main/settings/SettingsView.fxml"), + PREFERENCES("/io/bitsquare/gui/main/settings/PreferencesView.fxml"), ACCOUNT("/io/bitsquare/gui/main/account/AccountView.fxml"), @@ -187,6 +187,10 @@ public class Navigation { WITHDRAWAL("/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.fxml"), TRANSACTIONS("/io/bitsquare/gui/main/funds/transactions/TransactionsView.fxml"), + // preferences + APPLICATION_PREFERENCES("/io/bitsquare/gui/main/settings/application/ApplicationPreferencesView.fxml"), + NETWORK_PREFERENCES("/io/bitsquare/gui/main/settings/network/NetworkPreferencesView.fxml"), + // account ACCOUNT_SETUP("/io/bitsquare/gui/main/account/setup/AccountSetupView.fxml"), ACCOUNT_SETTINGS("/io/bitsquare/gui/main/account/settings/AccountSettingsView.fxml"), diff --git a/src/main/java/io/bitsquare/gui/images.css b/src/main/java/io/bitsquare/gui/images.css index ff2d78763f..e56a797c27 100644 --- a/src/main/java/io/bitsquare/gui/images.css +++ b/src/main/java/io/bitsquare/gui/images.css @@ -94,12 +94,12 @@ -fx-image: url("../../../images/nav/msg_active.png"); } -#image-nav-settings { - -fx-image: url("../../../images/nav/settings.png"); +#image-nav-preferences { + -fx-image: url("../../../images/nav/preferences.png"); } -#image-nav-settings-active { - -fx-image: url("../../../images/nav/settings_active.png"); +#image-nav-preferences-active { + -fx-image: url("../../../images/nav/preferences_active.png"); } #image-nav-account { diff --git a/src/main/java/io/bitsquare/gui/main/MainViewCB.java b/src/main/java/io/bitsquare/gui/main/MainViewCB.java index f79adf9cb2..993196015d 100644 --- a/src/main/java/io/bitsquare/gui/main/MainViewCB.java +++ b/src/main/java/io/bitsquare/gui/main/MainViewCB.java @@ -65,7 +65,7 @@ public class MainViewCB extends ViewCB { private VBox splashScreen; private AnchorPane contentContainer; private HBox leftNavPane, rightNavPane; - private ToggleButton buyButton, sellButton, homeButton, msgButton, portfolioButton, fundsButton, settingsButton, + private ToggleButton buyButton, sellButton, homeButton, msgButton, portfolioButton, fundsButton, preferencesButton, accountButton; private Pane portfolioButtonButtonPane; private Label numPendingTradesLabel; @@ -207,7 +207,6 @@ public class MainViewCB extends ViewCB { numPendingTradesLabel.setText(String.valueOf(numPendingTrades)); } - log.trace("openInfoNotification " + title); SystemNotification.openInfoNotification(title, "You got a new trade message."); } else { @@ -253,8 +252,8 @@ public class MainViewCB extends ViewCB { case PORTFOLIO: portfolioButton.setSelected(true); break; - case SETTINGS: - settingsButton.setSelected(true); + case PREFERENCES: + preferencesButton.setSelected(true); break; case SELL: sellButton.setSelected(true); @@ -404,14 +403,13 @@ public class MainViewCB extends ViewCB { addBankAccountComboBox(rightNavPane); - settingsButton = addNavButton(rightNavPane, "Preferences", Navigation.Item.SETTINGS); + preferencesButton = addNavButton(rightNavPane, "Preferences", Navigation.Item.PREFERENCES); accountButton = addNavButton(rightNavPane, "Account", Navigation.Item.ACCOUNT); // for irc demo homeButton.setDisable(true); msgButton.setDisable(true); - settingsButton.setDisable(true); onMainNavigationAdded(); } diff --git a/src/main/java/io/bitsquare/gui/main/settings/SettingsView.fxml b/src/main/java/io/bitsquare/gui/main/settings/PreferencesView.fxml similarity index 77% rename from src/main/java/io/bitsquare/gui/main/settings/SettingsView.fxml rename to src/main/java/io/bitsquare/gui/main/settings/PreferencesView.fxml index 1d8475e872..d147775f11 100644 --- a/src/main/java/io/bitsquare/gui/main/settings/SettingsView.fxml +++ b/src/main/java/io/bitsquare/gui/main/settings/PreferencesView.fxml @@ -17,21 +17,14 @@ ~ along with Bitsquare. If not, see . --> - - - - - - - - - + + diff --git a/src/main/java/io/bitsquare/gui/main/settings/PreferencesViewCB.java b/src/main/java/io/bitsquare/gui/main/settings/PreferencesViewCB.java new file mode 100644 index 0000000000..9eb7e37d7c --- /dev/null +++ b/src/main/java/io/bitsquare/gui/main/settings/PreferencesViewCB.java @@ -0,0 +1,150 @@ +/* + * This file is part of Bitsquare. + * + * Bitsquare is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bitsquare is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bitsquare. If not, see . + */ + +package io.bitsquare.gui.main.settings; + +import io.bitsquare.gui.CachedViewCB; +import io.bitsquare.gui.Navigation; +import io.bitsquare.gui.ViewCB; +import io.bitsquare.gui.ViewLoader; +import io.bitsquare.settings.Settings; + +import java.net.URL; + +import java.util.ResourceBundle; + +import javax.inject.Inject; + +import javafx.beans.value.ChangeListener; +import javafx.fxml.FXML; +import javafx.fxml.Initializable; +import javafx.scene.*; +import javafx.scene.control.*; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class PreferencesViewCB extends CachedViewCB { + private static final Logger log = LoggerFactory.getLogger(PreferencesViewCB.class); + + private final Navigation navigation; + private Settings settings; + + private Navigation.Listener navigationListener; + private ChangeListener tabChangeListener; + + @FXML Tab applicationTab, networkTab; + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + @Inject + PreferencesViewCB(Navigation navigation, Settings settings) { + super(); + + this.navigation = navigation; + this.settings = settings; + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Lifecycle + /////////////////////////////////////////////////////////////////////////////////////////// + + @Override + public void initialize(URL url, ResourceBundle rb) { + navigationListener = navigationItems -> { + if (navigationItems != null && navigationItems.length == 3 + && navigationItems[1] == Navigation.Item.PREFERENCES) + loadView(navigationItems[2]); + }; + + tabChangeListener = (ov, oldValue, newValue) -> { + if (newValue == applicationTab) + navigation.navigationTo(Navigation.Item.MAIN, Navigation.Item.PREFERENCES, + Navigation.Item.APPLICATION_PREFERENCES); + else if (newValue == networkTab) + navigation.navigationTo(Navigation.Item.MAIN, Navigation.Item.PREFERENCES, + Navigation.Item.NETWORK_PREFERENCES); + }; + + super.initialize(url, rb); + } + + @Override + public void activate() { + super.activate(); + + ((TabPane) root).getSelectionModel().selectedItemProperty().addListener(tabChangeListener); + navigation.addListener(navigationListener); + + if (((TabPane) root).getSelectionModel().getSelectedItem() == applicationTab) + navigation.navigationTo(Navigation.Item.MAIN, + Navigation.Item.PREFERENCES, + Navigation.Item.APPLICATION_PREFERENCES); + else + navigation.navigationTo(Navigation.Item.MAIN, + Navigation.Item.PREFERENCES, + Navigation.Item.NETWORK_PREFERENCES); + } + + @Override + public void deactivate() { + super.deactivate(); + + ((TabPane) root).getSelectionModel().selectedItemProperty().removeListener(tabChangeListener); + navigation.removeListener(navigationListener); + } + + @SuppressWarnings("EmptyMethod") + @Override + public void terminate() { + super.terminate(); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Navigation + /////////////////////////////////////////////////////////////////////////////////////////// + + @Override + protected Initializable loadView(Navigation.Item navigationItem) { + super.loadView(navigationItem); + + final ViewLoader loader = new ViewLoader(navigationItem); + Parent view = loader.load(); + Tab tab = null; + switch (navigationItem) { + case APPLICATION_PREFERENCES: + tab = applicationTab; + break; + case NETWORK_PREFERENCES: + tab = networkTab; + break; + } + tab.setContent(view); + ((TabPane) root).getSelectionModel().select(tab); + Initializable childController = loader.getController(); + ((ViewCB) childController).setParent(this); + + return childController; + } + +} + diff --git a/src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesModel.java b/src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesModel.java new file mode 100644 index 0000000000..753709b977 --- /dev/null +++ b/src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesModel.java @@ -0,0 +1,84 @@ +/* + * This file is part of Bitsquare. + * + * Bitsquare is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bitsquare is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bitsquare. If not, see . + */ + +package io.bitsquare.gui.main.settings.application; + +import io.bitsquare.gui.UIModel; + +import com.google.inject.Inject; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +class ApplicationPreferencesModel extends UIModel { + private static final Logger log = LoggerFactory.getLogger(ApplicationPreferencesModel.class); + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + @Inject + ApplicationPreferencesModel() { + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Lifecycle + /////////////////////////////////////////////////////////////////////////////////////////// + + @Override + public void initialize() { + + super.initialize(); + } + + @Override + public void activate() { + super.activate(); + + } + + @Override + public void deactivate() { + super.deactivate(); + + } + + @SuppressWarnings("EmptyMethod") + @Override + public void terminate() { + super.terminate(); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Methods + /////////////////////////////////////////////////////////////////////////////////////////// + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Getters + /////////////////////////////////////////////////////////////////////////////////////////// + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Private + /////////////////////////////////////////////////////////////////////////////////////////// + +} + diff --git a/src/main/java/io/bitsquare/gui/main/settings/SettingsViewCB.java b/src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesPM.java similarity index 68% rename from src/main/java/io/bitsquare/gui/main/settings/SettingsViewCB.java rename to src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesPM.java index 42c199ccf8..a7fd7b209f 100644 --- a/src/main/java/io/bitsquare/gui/main/settings/SettingsViewCB.java +++ b/src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesPM.java @@ -15,24 +15,17 @@ * along with Bitsquare. If not, see . */ -package io.bitsquare.gui.main.settings; +package io.bitsquare.gui.main.settings.application; -import io.bitsquare.gui.CachedViewCB; -import io.bitsquare.gui.Navigation; +import io.bitsquare.gui.PresentationModel; -import java.net.URL; - -import java.util.ResourceBundle; - -import javax.inject.Inject; - -import javafx.fxml.Initializable; +import com.google.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class SettingsViewCB extends CachedViewCB { - private static final Logger log = LoggerFactory.getLogger(SettingsViewCB.class); +public class ApplicationPreferencesPM extends PresentationModel { + private static final Logger log = LoggerFactory.getLogger(ApplicationPreferencesPM.class); /////////////////////////////////////////////////////////////////////////////////////////// @@ -40,17 +33,24 @@ public class SettingsViewCB extends CachedViewCB { /////////////////////////////////////////////////////////////////////////////////////////// @Inject - public SettingsViewCB() { + ApplicationPreferencesPM(ApplicationPreferencesModel model) { + super(model); } + /////////////////////////////////////////////////////////////////////////////////////////// // Lifecycle /////////////////////////////////////////////////////////////////////////////////////////// - @SuppressWarnings("EmptyMethod") @Override - public void initialize(URL url, ResourceBundle rb) { - super.initialize(url, rb); + public void initialize() { + + super.initialize(); + } + + @Override + public void activate() { + super.activate(); } @SuppressWarnings("EmptyMethod") @@ -59,12 +59,6 @@ public class SettingsViewCB extends CachedViewCB { super.deactivate(); } - @SuppressWarnings("EmptyMethod") - @Override - public void activate() { - super.activate(); - } - @SuppressWarnings("EmptyMethod") @Override public void terminate() { @@ -73,29 +67,18 @@ public class SettingsViewCB extends CachedViewCB { /////////////////////////////////////////////////////////////////////////////////////////// - // Navigation - /////////////////////////////////////////////////////////////////////////////////////////// - - @Override - protected Initializable loadView(Navigation.Item navigationItem) { - return super.loadView(navigationItem); - } - - - /////////////////////////////////////////////////////////////////////////////////////////// - // Public Methods + // Methods /////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// - // UI handlers + // Getters /////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// - // Private methods + // Private /////////////////////////////////////////////////////////////////////////////////////////// } - diff --git a/src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesView.fxml b/src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesView.fxml new file mode 100644 index 0000000000..8ef5b494ad --- /dev/null +++ b/src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesView.fxml @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesViewCB.java b/src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesViewCB.java new file mode 100644 index 0000000000..dfce3a09ef --- /dev/null +++ b/src/main/java/io/bitsquare/gui/main/settings/application/ApplicationPreferencesViewCB.java @@ -0,0 +1,74 @@ +/* + * This file is part of Bitsquare. + * + * Bitsquare is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bitsquare is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bitsquare. If not, see . + */ + +package io.bitsquare.gui.main.settings.application; + +import io.bitsquare.gui.CachedViewCB; + +import java.net.URL; + +import java.util.ResourceBundle; + +import javax.inject.Inject; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This UI is not cached as it is normally only needed once. + */ +public class ApplicationPreferencesViewCB extends CachedViewCB { + + private static final Logger log = LoggerFactory.getLogger(ApplicationPreferencesViewCB.class); + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + @Inject + private ApplicationPreferencesViewCB(ApplicationPreferencesPM presentationModel) { + super(presentationModel); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Lifecycle + /////////////////////////////////////////////////////////////////////////////////////////// + + @Override + public void initialize(URL url, ResourceBundle rb) { + + super.initialize(url, rb); + } + + @Override + public void activate() { + super.activate(); + + } + + @Override + public void deactivate() { + super.deactivate(); + } + + @SuppressWarnings("EmptyMethod") + @Override + public void terminate() { + super.terminate(); + } +} diff --git a/src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesModel.java b/src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesModel.java new file mode 100644 index 0000000000..869f41a798 --- /dev/null +++ b/src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesModel.java @@ -0,0 +1,84 @@ +/* + * This file is part of Bitsquare. + * + * Bitsquare is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bitsquare is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bitsquare. If not, see . + */ + +package io.bitsquare.gui.main.settings.network; + +import io.bitsquare.gui.UIModel; + +import com.google.inject.Inject; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +class NetworkPreferencesModel extends UIModel { + private static final Logger log = LoggerFactory.getLogger(NetworkPreferencesModel.class); + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + @Inject + NetworkPreferencesModel() { + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Lifecycle + /////////////////////////////////////////////////////////////////////////////////////////// + + @Override + public void initialize() { + + super.initialize(); + } + + @Override + public void activate() { + super.activate(); + + } + + @Override + public void deactivate() { + super.deactivate(); + + } + + @SuppressWarnings("EmptyMethod") + @Override + public void terminate() { + super.terminate(); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Methods + /////////////////////////////////////////////////////////////////////////////////////////// + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Getters + /////////////////////////////////////////////////////////////////////////////////////////// + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Private + /////////////////////////////////////////////////////////////////////////////////////////// + +} + diff --git a/src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesPM.java b/src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesPM.java new file mode 100644 index 0000000000..51e188908d --- /dev/null +++ b/src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesPM.java @@ -0,0 +1,84 @@ +/* + * This file is part of Bitsquare. + * + * Bitsquare is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bitsquare is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bitsquare. If not, see . + */ + +package io.bitsquare.gui.main.settings.network; + +import io.bitsquare.gui.PresentationModel; + +import com.google.inject.Inject; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class NetworkPreferencesPM extends PresentationModel { + private static final Logger log = LoggerFactory.getLogger(NetworkPreferencesPM.class); + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + @Inject + NetworkPreferencesPM(NetworkPreferencesModel model) { + super(model); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Lifecycle + /////////////////////////////////////////////////////////////////////////////////////////// + + @Override + public void initialize() { + + super.initialize(); + } + + @Override + public void activate() { + super.activate(); + } + + @SuppressWarnings("EmptyMethod") + @Override + public void deactivate() { + super.deactivate(); + } + + @SuppressWarnings("EmptyMethod") + @Override + public void terminate() { + super.terminate(); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Methods + /////////////////////////////////////////////////////////////////////////////////////////// + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Getters + /////////////////////////////////////////////////////////////////////////////////////////// + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Private + /////////////////////////////////////////////////////////////////////////////////////////// + + +} diff --git a/src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesView.fxml b/src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesView.fxml new file mode 100644 index 0000000000..39a24ded73 --- /dev/null +++ b/src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesView.fxml @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesViewCB.java b/src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesViewCB.java new file mode 100644 index 0000000000..29784a930a --- /dev/null +++ b/src/main/java/io/bitsquare/gui/main/settings/network/NetworkPreferencesViewCB.java @@ -0,0 +1,77 @@ +/* + * This file is part of Bitsquare. + * + * Bitsquare is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. + * + * Bitsquare is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public + * License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with Bitsquare. If not, see . + */ + +package io.bitsquare.gui.main.settings.network; + +import io.bitsquare.gui.CachedViewCB; + +import java.net.URL; + +import java.util.ResourceBundle; + +import javax.inject.Inject; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This UI is not cached as it is normally only needed once. + */ +public class NetworkPreferencesViewCB extends CachedViewCB { + + private static final Logger log = LoggerFactory.getLogger(NetworkPreferencesViewCB.class); + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Constructor + /////////////////////////////////////////////////////////////////////////////////////////// + + @Inject + private NetworkPreferencesViewCB(NetworkPreferencesPM presentationModel) { + super(presentationModel); + } + + + /////////////////////////////////////////////////////////////////////////////////////////// + // Lifecycle + /////////////////////////////////////////////////////////////////////////////////////////// + + @Override + public void initialize(URL url, ResourceBundle rb) { + + super.initialize(url, rb); + } + + @Override + public void activate() { + super.activate(); + + } + + @Override + public void deactivate() { + super.deactivate(); + } + + @SuppressWarnings("EmptyMethod") + @Override + public void terminate() { + super.terminate(); + } + +} + diff --git a/src/main/resources/images/nav/settings.png b/src/main/resources/images/nav/preferences.png similarity index 100% rename from src/main/resources/images/nav/settings.png rename to src/main/resources/images/nav/preferences.png diff --git a/src/main/resources/images/nav/settings@2x.png b/src/main/resources/images/nav/preferences@2x.png similarity index 100% rename from src/main/resources/images/nav/settings@2x.png rename to src/main/resources/images/nav/preferences@2x.png diff --git a/src/main/resources/images/nav/settings_active.png b/src/main/resources/images/nav/preferences_active.png similarity index 100% rename from src/main/resources/images/nav/settings_active.png rename to src/main/resources/images/nav/preferences_active.png diff --git a/src/main/resources/images/nav/settings_active@2x.png b/src/main/resources/images/nav/preferences_active@2x.png similarity index 100% rename from src/main/resources/images/nav/settings_active@2x.png rename to src/main/resources/images/nav/preferences_active@2x.png diff --git a/src/main/resources/logback.xml b/src/main/resources/logback.xml index 1c3f23e809..8b474ce188 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback.xml @@ -25,8 +25,8 @@ - - + + @@ -45,6 +45,7 @@ +