mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-01 01:57:17 -04:00
Rename Overlay- and NaviagtionController
This commit is contained in:
parent
ed52955a19
commit
1a5d9b6d6c
11 changed files with 77 additions and 77 deletions
|
@ -22,8 +22,8 @@ import io.bitsquare.btc.BlockChainFacade;
|
||||||
import io.bitsquare.btc.FeePolicy;
|
import io.bitsquare.btc.FeePolicy;
|
||||||
import io.bitsquare.btc.WalletFacade;
|
import io.bitsquare.btc.WalletFacade;
|
||||||
import io.bitsquare.crypto.CryptoFacade;
|
import io.bitsquare.crypto.CryptoFacade;
|
||||||
import io.bitsquare.gui.NavigationController;
|
import io.bitsquare.gui.NavigationManager;
|
||||||
import io.bitsquare.gui.OverlayController;
|
import io.bitsquare.gui.OverlayManager;
|
||||||
import io.bitsquare.gui.main.trade.orderbook.OrderBook;
|
import io.bitsquare.gui.main.trade.orderbook.OrderBook;
|
||||||
import io.bitsquare.gui.util.BSFormatter;
|
import io.bitsquare.gui.util.BSFormatter;
|
||||||
import io.bitsquare.gui.util.validation.BankAccountNumberValidator;
|
import io.bitsquare.gui.util.validation.BankAccountNumberValidator;
|
||||||
|
@ -71,8 +71,8 @@ public class BitSquareModule extends AbstractModule {
|
||||||
|
|
||||||
bind(TradeManager.class).asEagerSingleton();
|
bind(TradeManager.class).asEagerSingleton();
|
||||||
bind(OrderBook.class).asEagerSingleton();
|
bind(OrderBook.class).asEagerSingleton();
|
||||||
bind(NavigationController.class).asEagerSingleton();
|
bind(NavigationManager.class).asEagerSingleton();
|
||||||
bind(OverlayController.class).asEagerSingleton();
|
bind(OverlayManager.class).asEagerSingleton();
|
||||||
bind(BSFormatter.class).asEagerSingleton();
|
bind(BSFormatter.class).asEagerSingleton();
|
||||||
|
|
||||||
bind(BankAccountNumberValidator.class).asEagerSingleton();
|
bind(BankAccountNumberValidator.class).asEagerSingleton();
|
||||||
|
|
|
@ -25,8 +25,8 @@ import java.util.List;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class NavigationController {
|
public class NavigationManager {
|
||||||
private static final Logger log = LoggerFactory.getLogger(NavigationController.class);
|
private static final Logger log = LoggerFactory.getLogger(NavigationManager.class);
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Interface
|
// Interface
|
||||||
|
@ -47,7 +47,7 @@ public class NavigationController {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public NavigationController() {
|
public NavigationManager() {
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
|
@ -25,8 +25,8 @@ import java.util.List;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class OverlayController {
|
public class OverlayManager {
|
||||||
private static final Logger log = LoggerFactory.getLogger(OverlayController.class);
|
private static final Logger log = LoggerFactory.getLogger(OverlayManager.class);
|
||||||
|
|
||||||
private List<OverlayListener> listeners = new ArrayList<>();
|
private List<OverlayListener> listeners = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ public class OverlayController {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public OverlayController() {
|
public OverlayManager() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void blurContent() {
|
public void blurContent() {
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.gui.components;
|
package io.bitsquare.gui.components;
|
||||||
|
|
||||||
import io.bitsquare.BitSquare;
|
import io.bitsquare.BitSquare;
|
||||||
import io.bitsquare.gui.OverlayController;
|
import io.bitsquare.gui.OverlayManager;
|
||||||
import io.bitsquare.locale.BSResources;
|
import io.bitsquare.locale.BSResources;
|
||||||
|
|
||||||
import com.google.bitcoin.store.BlockStoreException;
|
import com.google.bitcoin.store.BlockStoreException;
|
||||||
|
@ -51,11 +51,11 @@ public class Popups {
|
||||||
private static final Logger log = LoggerFactory.getLogger(Popups.class);
|
private static final Logger log = LoggerFactory.getLogger(Popups.class);
|
||||||
|
|
||||||
// TODO just temporary, class will be removed completely
|
// TODO just temporary, class will be removed completely
|
||||||
public static void setOverlayController(OverlayController overlayController) {
|
public static void setOverlayManager(OverlayManager overlayManager) {
|
||||||
Popups.overlayController = overlayController;
|
Popups.overlayManager = overlayManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static OverlayController overlayController;
|
private static OverlayManager overlayManager;
|
||||||
|
|
||||||
// Information
|
// Information
|
||||||
public static void openInfo(String message) {
|
public static void openInfo(String message) {
|
||||||
|
@ -64,7 +64,7 @@ public class Popups {
|
||||||
|
|
||||||
// Supports blurring the content background
|
// Supports blurring the content background
|
||||||
public static void openInfo(String message, String masthead) {
|
public static void openInfo(String message, String masthead) {
|
||||||
overlayController.blurContent();
|
overlayManager.blurContent();
|
||||||
List<Action> actions = new ArrayList<>();
|
List<Action> actions = new ArrayList<>();
|
||||||
|
|
||||||
// Dialogs are a bit limited. There is no callback for the InformationDialog button click, so we added
|
// Dialogs are a bit limited. There is no callback for the InformationDialog button click, so we added
|
||||||
|
@ -73,7 +73,7 @@ public class Popups {
|
||||||
@Override
|
@Override
|
||||||
public void handle(ActionEvent actionEvent) {
|
public void handle(ActionEvent actionEvent) {
|
||||||
Dialog.Actions.CLOSE.handle(actionEvent);
|
Dialog.Actions.CLOSE.handle(actionEvent);
|
||||||
overlayController.removeBlurContent();
|
overlayManager.removeBlurContent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
openInfo(message, masthead, actions);
|
openInfo(message, masthead, actions);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.components.btc;
|
package io.bitsquare.gui.components.btc;
|
||||||
|
|
||||||
import io.bitsquare.gui.OverlayController;
|
import io.bitsquare.gui.OverlayManager;
|
||||||
import io.bitsquare.gui.components.Popups;
|
import io.bitsquare.gui.components.Popups;
|
||||||
|
|
||||||
import com.google.bitcoin.core.Coin;
|
import com.google.bitcoin.core.Coin;
|
||||||
|
@ -60,7 +60,7 @@ public class AddressTextField extends AnchorPane {
|
||||||
private final StringProperty address = new SimpleStringProperty();
|
private final StringProperty address = new SimpleStringProperty();
|
||||||
private final StringProperty paymentLabel = new SimpleStringProperty();
|
private final StringProperty paymentLabel = new SimpleStringProperty();
|
||||||
public final ObjectProperty<Coin> amountAsCoin = new SimpleObjectProperty<>();
|
public final ObjectProperty<Coin> amountAsCoin = new SimpleObjectProperty<>();
|
||||||
private OverlayController overlayController;
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -125,16 +125,16 @@ public class AddressTextField extends AnchorPane {
|
||||||
popOver.setDetachedTitle("Scan QR code for this address");
|
popOver.setDetachedTitle("Scan QR code for this address");
|
||||||
popOver.setDetached(true);
|
popOver.setDetached(true);
|
||||||
popOver.setOnHiding(windowEvent -> {
|
popOver.setOnHiding(windowEvent -> {
|
||||||
if (overlayController != null)
|
if (overlayManager != null)
|
||||||
overlayController.removeBlurContent();
|
overlayManager.removeBlurContent();
|
||||||
});
|
});
|
||||||
|
|
||||||
Window window = getScene().getWindow();
|
Window window = getScene().getWindow();
|
||||||
double x = Math.round(window.getX() + (window.getWidth() - 320) / 2);
|
double x = Math.round(window.getX() + (window.getWidth() - 320) / 2);
|
||||||
double y = Math.round(window.getY() + (window.getHeight() - 240) / 2);
|
double y = Math.round(window.getY() + (window.getHeight() - 240) / 2);
|
||||||
popOver.show(getScene().getWindow(), x, y);
|
popOver.show(getScene().getWindow(), x, y);
|
||||||
if (overlayController != null)
|
if (overlayManager != null)
|
||||||
overlayController.blurContent();
|
overlayManager.blurContent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -188,8 +188,8 @@ public class AddressTextField extends AnchorPane {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO find better solution
|
// TODO find better solution
|
||||||
public void setOverlayController(OverlayController overlayController) {
|
public void setOverlayManager(OverlayManager overlayManager) {
|
||||||
this.overlayController = overlayController;
|
this.overlayManager = overlayManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,9 @@ package io.bitsquare.gui.main;
|
||||||
|
|
||||||
import io.bitsquare.bank.BankAccount;
|
import io.bitsquare.bank.BankAccount;
|
||||||
import io.bitsquare.gui.AWTSystemTray;
|
import io.bitsquare.gui.AWTSystemTray;
|
||||||
import io.bitsquare.gui.NavigationController;
|
|
||||||
import io.bitsquare.gui.NavigationItem;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.OverlayController;
|
import io.bitsquare.gui.NavigationManager;
|
||||||
|
import io.bitsquare.gui.OverlayManager;
|
||||||
import io.bitsquare.gui.ViewCB;
|
import io.bitsquare.gui.ViewCB;
|
||||||
import io.bitsquare.gui.components.NetworkSyncPane;
|
import io.bitsquare.gui.components.NetworkSyncPane;
|
||||||
import io.bitsquare.gui.components.Popups;
|
import io.bitsquare.gui.components.Popups;
|
||||||
|
@ -53,8 +53,8 @@ import org.slf4j.LoggerFactory;
|
||||||
public class MainViewCB extends ViewCB<MainPM> {
|
public class MainViewCB extends ViewCB<MainPM> {
|
||||||
private static final Logger log = LoggerFactory.getLogger(MainViewCB.class);
|
private static final Logger log = LoggerFactory.getLogger(MainViewCB.class);
|
||||||
|
|
||||||
private final NavigationController navigationController;
|
private final NavigationManager navigationManager;
|
||||||
private final OverlayController overlayController;
|
private final OverlayManager overlayManager;
|
||||||
|
|
||||||
private final ToggleGroup navButtonsGroup = new ToggleGroup();
|
private final ToggleGroup navButtonsGroup = new ToggleGroup();
|
||||||
private NavigationItem mainNavigationItem;
|
private NavigationItem mainNavigationItem;
|
||||||
|
@ -74,12 +74,12 @@ public class MainViewCB extends ViewCB<MainPM> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private MainViewCB(MainPM presentationModel, NavigationController navigationController,
|
private MainViewCB(MainPM presentationModel, NavigationManager navigationManager,
|
||||||
OverlayController overlayController) {
|
OverlayManager overlayManager) {
|
||||||
super(presentationModel);
|
super(presentationModel);
|
||||||
|
|
||||||
this.navigationController = navigationController;
|
this.navigationManager = navigationManager;
|
||||||
this.overlayController = overlayController;
|
this.overlayManager = overlayManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -94,9 +94,9 @@ public class MainViewCB extends ViewCB<MainPM> {
|
||||||
Profiler.printMsgWithTime("MainController.initialize");
|
Profiler.printMsgWithTime("MainController.initialize");
|
||||||
|
|
||||||
// just temp. ugly hack... Popups will be removed
|
// just temp. ugly hack... Popups will be removed
|
||||||
Popups.setOverlayController(overlayController);
|
Popups.setOverlayManager(overlayManager);
|
||||||
|
|
||||||
navigationController.addListener(navigationItems -> {
|
navigationManager.addListener(navigationItems -> {
|
||||||
if (navigationItems != null) {
|
if (navigationItems != null) {
|
||||||
for (NavigationItem navigationItem : navigationItems) {
|
for (NavigationItem navigationItem : navigationItems) {
|
||||||
if (navigationItem.getLevel() == 1) {
|
if (navigationItem.getLevel() == 1) {
|
||||||
|
@ -113,7 +113,7 @@ public class MainViewCB extends ViewCB<MainPM> {
|
||||||
selectMainMenuButton(mainNavigationItem);
|
selectMainMenuButton(mainNavigationItem);
|
||||||
});
|
});
|
||||||
|
|
||||||
overlayController.addListener(new OverlayController.OverlayListener() {
|
overlayManager.addListener(new OverlayManager.OverlayListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onBlurContentRequested() {
|
public void onBlurContentRequested() {
|
||||||
Transitions.blur(baseApplicationContainer);
|
Transitions.blur(baseApplicationContainer);
|
||||||
|
@ -204,14 +204,14 @@ public class MainViewCB extends ViewCB<MainPM> {
|
||||||
alertButton.setId("nav-alert-button");
|
alertButton.setId("nav-alert-button");
|
||||||
alertButton.relocate(36, 19);
|
alertButton.relocate(36, 19);
|
||||||
alertButton.setOnAction((e) ->
|
alertButton.setOnAction((e) ->
|
||||||
navigationController.navigationTo(NavigationItem.ORDERS, NavigationItem.PENDING_TRADE));
|
navigationManager.navigationTo(NavigationItem.ORDERS, NavigationItem.PENDING_TRADE));
|
||||||
Tooltip.install(alertButton, new Tooltip("Your offer has been accepted"));
|
Tooltip.install(alertButton, new Tooltip("Your offer has been accepted"));
|
||||||
ordersButtonButtonPane.getChildren().add(alertButton);
|
ordersButtonButtonPane.getChildren().add(alertButton);
|
||||||
|
|
||||||
AWTSystemTray.setAlert();
|
AWTSystemTray.setAlert();
|
||||||
});
|
});
|
||||||
|
|
||||||
navigationController.navigationTo(presentationModel.getSelectedNavigationItems());
|
navigationManager.navigationTo(presentationModel.getSelectedNavigationItems());
|
||||||
onContentAdded();
|
onContentAdded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
package io.bitsquare.gui.main.account;
|
package io.bitsquare.gui.main.account;
|
||||||
|
|
||||||
import io.bitsquare.gui.CachedViewCB;
|
import io.bitsquare.gui.CachedViewCB;
|
||||||
import io.bitsquare.gui.NavigationController;
|
|
||||||
import io.bitsquare.gui.NavigationItem;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
|
import io.bitsquare.gui.NavigationManager;
|
||||||
import io.bitsquare.gui.ViewCB;
|
import io.bitsquare.gui.ViewCB;
|
||||||
import io.bitsquare.gui.main.account.setup.AccountSetupViewCB;
|
import io.bitsquare.gui.main.account.setup.AccountSetupViewCB;
|
||||||
import io.bitsquare.util.ViewLoader;
|
import io.bitsquare.util.ViewLoader;
|
||||||
|
@ -44,7 +44,7 @@ public class AccountViewCB extends CachedViewCB<AccountPM> {
|
||||||
private static final Logger log = LoggerFactory.getLogger(AccountViewCB.class);
|
private static final Logger log = LoggerFactory.getLogger(AccountViewCB.class);
|
||||||
|
|
||||||
public Tab tab;
|
public Tab tab;
|
||||||
private NavigationController navigationController;
|
private NavigationManager navigationManager;
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -52,9 +52,9 @@ public class AccountViewCB extends CachedViewCB<AccountPM> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private AccountViewCB(AccountPM presentationModel, NavigationController navigationController) {
|
private AccountViewCB(AccountPM presentationModel, NavigationManager navigationManager) {
|
||||||
super(presentationModel);
|
super(presentationModel);
|
||||||
this.navigationController = navigationController;
|
this.navigationManager = navigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ public class AccountViewCB extends CachedViewCB<AccountPM> {
|
||||||
private void removeSetup() {
|
private void removeSetup() {
|
||||||
childController = null;
|
childController = null;
|
||||||
|
|
||||||
navigationController.navigationTo(navigationController.getPreviousMainNavigationItems());
|
navigationManager.navigationTo(navigationManager.getPreviousMainNavigationItems());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
package io.bitsquare.gui.main.account.content.registration;
|
package io.bitsquare.gui.main.account.content.registration;
|
||||||
|
|
||||||
import io.bitsquare.gui.CachedViewCB;
|
import io.bitsquare.gui.CachedViewCB;
|
||||||
import io.bitsquare.gui.OverlayController;
|
import io.bitsquare.gui.OverlayManager;
|
||||||
import io.bitsquare.gui.components.Popups;
|
import io.bitsquare.gui.components.Popups;
|
||||||
import io.bitsquare.gui.components.btc.AddressTextField;
|
import io.bitsquare.gui.components.btc.AddressTextField;
|
||||||
import io.bitsquare.gui.components.btc.BalanceTextField;
|
import io.bitsquare.gui.components.btc.BalanceTextField;
|
||||||
|
@ -52,7 +52,7 @@ public class RegistrationViewCB extends CachedViewCB<RegistrationPM> implements
|
||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(RegistrationViewCB.class);
|
private static final Logger log = LoggerFactory.getLogger(RegistrationViewCB.class);
|
||||||
|
|
||||||
private OverlayController overlayController;
|
private OverlayManager overlayManager;
|
||||||
|
|
||||||
@FXML private TextField feeTextField;
|
@FXML private TextField feeTextField;
|
||||||
@FXML private AddressTextField addressTextField;
|
@FXML private AddressTextField addressTextField;
|
||||||
|
@ -65,9 +65,9 @@ public class RegistrationViewCB extends CachedViewCB<RegistrationPM> implements
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private RegistrationViewCB(RegistrationPM presentationModel, OverlayController overlayController) {
|
private RegistrationViewCB(RegistrationPM presentationModel, OverlayManager overlayManager) {
|
||||||
super(presentationModel);
|
super(presentationModel);
|
||||||
this.overlayController = overlayController;
|
this.overlayManager = overlayManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ public class RegistrationViewCB extends CachedViewCB<RegistrationPM> implements
|
||||||
addressTextField.setAddress(presentationModel.getAddressAsString());
|
addressTextField.setAddress(presentationModel.getAddressAsString());
|
||||||
|
|
||||||
// TODO find better solution
|
// TODO find better solution
|
||||||
addressTextField.setOverlayController(overlayController);
|
addressTextField.setOverlayManager(overlayManager);
|
||||||
|
|
||||||
balanceTextField.setup(presentationModel.getWalletFacade(), presentationModel.address.get());
|
balanceTextField.setup(presentationModel.getWalletFacade(), presentationModel.address.get());
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ public class RegistrationViewCB extends CachedViewCB<RegistrationPM> implements
|
||||||
|
|
||||||
presentationModel.showTransactionPublishedScreen.addListener((o, oldValue, newValue) -> {
|
presentationModel.showTransactionPublishedScreen.addListener((o, oldValue, newValue) -> {
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
overlayController.blurContent();
|
overlayManager.blurContent();
|
||||||
|
|
||||||
List<Action> actions = new ArrayList<>();
|
List<Action> actions = new ArrayList<>();
|
||||||
actions.add(new AbstractAction(BSResources.get("shared.copyTxId")) {
|
actions.add(new AbstractAction(BSResources.get("shared.copyTxId")) {
|
||||||
|
@ -123,7 +123,7 @@ public class RegistrationViewCB extends CachedViewCB<RegistrationPM> implements
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
Dialog.Actions.CLOSE.handle(actionEvent);
|
Dialog.Actions.CLOSE.handle(actionEvent);
|
||||||
overlayController.removeBlurContent();
|
overlayManager.removeBlurContent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
package io.bitsquare.gui.main.account.settings;
|
package io.bitsquare.gui.main.account.settings;
|
||||||
|
|
||||||
import io.bitsquare.gui.CachedViewCB;
|
import io.bitsquare.gui.CachedViewCB;
|
||||||
import io.bitsquare.gui.NavigationController;
|
|
||||||
import io.bitsquare.gui.NavigationItem;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
|
import io.bitsquare.gui.NavigationManager;
|
||||||
import io.bitsquare.gui.PresentationModel;
|
import io.bitsquare.gui.PresentationModel;
|
||||||
import io.bitsquare.gui.ViewCB;
|
import io.bitsquare.gui.ViewCB;
|
||||||
import io.bitsquare.gui.main.account.content.ContextAware;
|
import io.bitsquare.gui.main.account.content.ContextAware;
|
||||||
|
@ -55,17 +55,17 @@ public class AccountSettingsViewCB extends CachedViewCB<AccountSettingsPM> {
|
||||||
public VBox leftVBox;
|
public VBox leftVBox;
|
||||||
public AnchorPane content;
|
public AnchorPane content;
|
||||||
private MenuItem seedWords, password, restrictions, fiatAccount, registration;
|
private MenuItem seedWords, password, restrictions, fiatAccount, registration;
|
||||||
private NavigationController navigationController;
|
private NavigationManager navigationManager;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Constructor
|
// Constructor
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private AccountSettingsViewCB(AccountSettingsPM presentationModel, NavigationController navigationController) {
|
private AccountSettingsViewCB(AccountSettingsPM presentationModel, NavigationManager navigationManager) {
|
||||||
super(presentationModel);
|
super(presentationModel);
|
||||||
|
|
||||||
this.navigationController = navigationController;
|
this.navigationManager = navigationManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ public class AccountSettingsViewCB extends CachedViewCB<AccountSettingsPM> {
|
||||||
public void activate() {
|
public void activate() {
|
||||||
super.activate();
|
super.activate();
|
||||||
|
|
||||||
NavigationItem[] navigationItems = navigationController.getCurrentNavigationItems();
|
NavigationItem[] navigationItems = navigationManager.getCurrentNavigationItems();
|
||||||
for (int i = 0; i < navigationItems.length; i++) {
|
for (int i = 0; i < navigationItems.length; i++) {
|
||||||
if (navigationItems[i].getLevel() == 3) {
|
if (navigationItems[i].getLevel() == 3) {
|
||||||
subMenuNavigationItem = navigationItems[i];
|
subMenuNavigationItem = navigationItems[i];
|
||||||
|
|
|
@ -19,9 +19,9 @@ package io.bitsquare.gui.main.trade.createoffer;
|
||||||
|
|
||||||
import io.bitsquare.gui.CachedViewCB;
|
import io.bitsquare.gui.CachedViewCB;
|
||||||
import io.bitsquare.gui.CloseListener;
|
import io.bitsquare.gui.CloseListener;
|
||||||
import io.bitsquare.gui.NavigationController;
|
|
||||||
import io.bitsquare.gui.NavigationItem;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.OverlayController;
|
import io.bitsquare.gui.NavigationManager;
|
||||||
|
import io.bitsquare.gui.OverlayManager;
|
||||||
import io.bitsquare.gui.components.InfoDisplay;
|
import io.bitsquare.gui.components.InfoDisplay;
|
||||||
import io.bitsquare.gui.components.InputTextField;
|
import io.bitsquare.gui.components.InputTextField;
|
||||||
import io.bitsquare.gui.components.Popups;
|
import io.bitsquare.gui.components.Popups;
|
||||||
|
@ -74,8 +74,8 @@ import static javafx.beans.binding.Bindings.createStringBinding;
|
||||||
public class CreateOfferViewCB extends CachedViewCB<CreateOfferPM> {
|
public class CreateOfferViewCB extends CachedViewCB<CreateOfferPM> {
|
||||||
private static final Logger log = LoggerFactory.getLogger(CreateOfferViewCB.class);
|
private static final Logger log = LoggerFactory.getLogger(CreateOfferViewCB.class);
|
||||||
|
|
||||||
private NavigationController navigationController;
|
private NavigationManager navigationManager;
|
||||||
private OverlayController overlayController;
|
private OverlayManager overlayManager;
|
||||||
private CloseListener closeListener;
|
private CloseListener closeListener;
|
||||||
|
|
||||||
private boolean detailsVisible;
|
private boolean detailsVisible;
|
||||||
|
@ -109,11 +109,11 @@ public class CreateOfferViewCB extends CachedViewCB<CreateOfferPM> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private CreateOfferViewCB(CreateOfferPM presentationModel, NavigationController navigationController,
|
private CreateOfferViewCB(CreateOfferPM presentationModel, NavigationManager navigationManager,
|
||||||
OverlayController overlayController) {
|
OverlayManager overlayManager) {
|
||||||
super(presentationModel);
|
super(presentationModel);
|
||||||
this.navigationController = navigationController;
|
this.navigationManager = navigationManager;
|
||||||
this.overlayController = overlayController;
|
this.overlayManager = overlayManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ public class CreateOfferViewCB extends CachedViewCB<CreateOfferPM> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
private void openAccountSettings() {
|
private void openAccountSettings() {
|
||||||
navigationController.navigationTo(NavigationItem.ACCOUNT,
|
navigationManager.navigationTo(NavigationItem.ACCOUNT,
|
||||||
NavigationItem.ACCOUNT_SETTINGS,
|
NavigationItem.ACCOUNT_SETTINGS,
|
||||||
NavigationItem.RESTRICTIONS);
|
NavigationItem.RESTRICTIONS);
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@ public class CreateOfferViewCB extends CachedViewCB<CreateOfferPM> {
|
||||||
|
|
||||||
presentationModel.showTransactionPublishedScreen.addListener((o, oldValue, newValue) -> {
|
presentationModel.showTransactionPublishedScreen.addListener((o, oldValue, newValue) -> {
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
overlayController.blurContent();
|
overlayManager.blurContent();
|
||||||
|
|
||||||
// Dialogs are a bit limited. There is no callback for the InformationDialog button click, so we added
|
// Dialogs are a bit limited. There is no callback for the InformationDialog button click, so we added
|
||||||
// our own actions.
|
// our own actions.
|
||||||
|
@ -335,7 +335,7 @@ public class CreateOfferViewCB extends CachedViewCB<CreateOfferPM> {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
Dialog.Actions.CLOSE.handle(actionEvent);
|
Dialog.Actions.CLOSE.handle(actionEvent);
|
||||||
overlayController.removeBlurContent();
|
overlayManager.removeBlurContent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
package io.bitsquare.gui.main.trade.orderbook;
|
package io.bitsquare.gui.main.trade.orderbook;
|
||||||
|
|
||||||
import io.bitsquare.gui.CachedViewCB;
|
import io.bitsquare.gui.CachedViewCB;
|
||||||
import io.bitsquare.gui.NavigationController;
|
|
||||||
import io.bitsquare.gui.NavigationItem;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.NavigationListener;
|
import io.bitsquare.gui.NavigationListener;
|
||||||
import io.bitsquare.gui.OverlayController;
|
import io.bitsquare.gui.NavigationManager;
|
||||||
|
import io.bitsquare.gui.OverlayManager;
|
||||||
import io.bitsquare.gui.ViewCB;
|
import io.bitsquare.gui.ViewCB;
|
||||||
import io.bitsquare.gui.ViewController;
|
import io.bitsquare.gui.ViewController;
|
||||||
import io.bitsquare.gui.components.InputTextField;
|
import io.bitsquare.gui.components.InputTextField;
|
||||||
|
@ -70,8 +70,8 @@ public class OrderBookViewCB extends CachedViewCB<OrderBookPM> {
|
||||||
private static final Logger log = LoggerFactory.getLogger(OrderBookViewCB.class);
|
private static final Logger log = LoggerFactory.getLogger(OrderBookViewCB.class);
|
||||||
|
|
||||||
//TODO nav?
|
//TODO nav?
|
||||||
private NavigationController navigationController;
|
private NavigationManager navigationManager;
|
||||||
private OverlayController overlayController;
|
private OverlayManager overlayManager;
|
||||||
private OptionalBtcValidator optionalBtcValidator;
|
private OptionalBtcValidator optionalBtcValidator;
|
||||||
private OptionalFiatValidator optionalFiatValidator;
|
private OptionalFiatValidator optionalFiatValidator;
|
||||||
private NavigationListener navigationListener;
|
private NavigationListener navigationListener;
|
||||||
|
@ -101,14 +101,14 @@ public class OrderBookViewCB extends CachedViewCB<OrderBookPM> {
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private OrderBookViewCB(OrderBookPM presentationModel,
|
private OrderBookViewCB(OrderBookPM presentationModel,
|
||||||
NavigationController navigationController,
|
NavigationManager navigationManager,
|
||||||
OverlayController overlayController,
|
OverlayManager overlayManager,
|
||||||
OptionalBtcValidator optionalBtcValidator,
|
OptionalBtcValidator optionalBtcValidator,
|
||||||
OptionalFiatValidator optionalFiatValidator) {
|
OptionalFiatValidator optionalFiatValidator) {
|
||||||
super(presentationModel);
|
super(presentationModel);
|
||||||
|
|
||||||
this.navigationController = navigationController;
|
this.navigationManager = navigationManager;
|
||||||
this.overlayController = overlayController;
|
this.overlayManager = overlayManager;
|
||||||
this.optionalBtcValidator = optionalBtcValidator;
|
this.optionalBtcValidator = optionalBtcValidator;
|
||||||
this.optionalFiatValidator = optionalFiatValidator;
|
this.optionalFiatValidator = optionalFiatValidator;
|
||||||
}
|
}
|
||||||
|
@ -262,14 +262,14 @@ public class OrderBookViewCB extends CachedViewCB<OrderBookPM> {
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
private void openSetupScreen() {
|
private void openSetupScreen() {
|
||||||
overlayController.blurContent();
|
overlayManager.blurContent();
|
||||||
List<Action> actions = new ArrayList<>();
|
List<Action> actions = new ArrayList<>();
|
||||||
actions.add(new AbstractAction(BSResources.get("shared.ok")) {
|
actions.add(new AbstractAction(BSResources.get("shared.ok")) {
|
||||||
@Override
|
@Override
|
||||||
public void handle(ActionEvent actionEvent) {
|
public void handle(ActionEvent actionEvent) {
|
||||||
Dialog.Actions.OK.handle(actionEvent);
|
Dialog.Actions.OK.handle(actionEvent);
|
||||||
overlayController.removeBlurContent();
|
overlayManager.removeBlurContent();
|
||||||
navigationController.navigationTo(NavigationItem.ACCOUNT, NavigationItem.ACCOUNT_SETUP);
|
navigationManager.navigationTo(NavigationItem.ACCOUNT, NavigationItem.ACCOUNT_SETUP);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Popups.openInfo("You need to setup your trading account before you can trade.",
|
Popups.openInfo("You need to setup your trading account before you can trade.",
|
||||||
|
@ -320,7 +320,7 @@ public class OrderBookViewCB extends CachedViewCB<OrderBookPM> {
|
||||||
actions);
|
actions);
|
||||||
|
|
||||||
if (response == Dialog.Actions.YES)
|
if (response == Dialog.Actions.YES)
|
||||||
navigationController.navigationTo(NavigationItem.ACCOUNT, NavigationItem.ACCOUNT_SETTINGS,
|
navigationManager.navigationTo(NavigationItem.ACCOUNT, NavigationItem.ACCOUNT_SETTINGS,
|
||||||
NavigationItem.RESTRICTIONS);
|
NavigationItem.RESTRICTIONS);
|
||||||
else
|
else
|
||||||
orderBookTable.getSelectionModel().clearSelection();
|
orderBookTable.getSelectionModel().clearSelection();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue