mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-06-21 05:14:31 -04:00
refactor nav enum
This commit is contained in:
parent
7abbe21329
commit
2def1f5971
20 changed files with 130 additions and 152 deletions
|
@ -6,7 +6,7 @@ import com.google.inject.Injector;
|
||||||
import io.bitsquare.btc.WalletFacade;
|
import io.bitsquare.btc.WalletFacade;
|
||||||
import io.bitsquare.di.BitSquareModule;
|
import io.bitsquare.di.BitSquareModule;
|
||||||
import io.bitsquare.di.GuiceFXMLLoader;
|
import io.bitsquare.di.GuiceFXMLLoader;
|
||||||
import io.bitsquare.gui.NavigationViewURL;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.popups.Popups;
|
import io.bitsquare.gui.popups.Popups;
|
||||||
import io.bitsquare.locale.Localisation;
|
import io.bitsquare.locale.Localisation;
|
||||||
import io.bitsquare.msg.MessageFacade;
|
import io.bitsquare.msg.MessageFacade;
|
||||||
|
@ -20,9 +20,12 @@ import javafx.scene.Scene;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.controlsfx.control.action.Action;
|
import org.controlsfx.control.action.Action;
|
||||||
import org.controlsfx.dialog.Dialog;
|
import org.controlsfx.dialog.Dialog;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
||||||
public class BitSquare extends Application
|
public class BitSquare extends Application
|
||||||
{
|
{
|
||||||
private static final Logger log = LoggerFactory.getLogger(BitSquare.class);
|
private static final Logger log = LoggerFactory.getLogger(BitSquare.class);
|
||||||
|
@ -31,10 +34,10 @@ public class BitSquare extends Application
|
||||||
private WalletFacade walletFacade;
|
private WalletFacade walletFacade;
|
||||||
private MessageFacade messageFacade;
|
private MessageFacade messageFacade;
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(@Nullable String[] args)
|
||||||
{
|
{
|
||||||
log.debug("Startup: main");
|
log.debug("Startup: main");
|
||||||
if (args.length > 0)
|
if (args != null && args.length > 0)
|
||||||
ID = args[0];
|
ID = args[0];
|
||||||
|
|
||||||
launch(args);
|
launch(args);
|
||||||
|
@ -46,13 +49,13 @@ public class BitSquare extends Application
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage stage)
|
public void start(@NotNull Stage stage)
|
||||||
{
|
{
|
||||||
Thread.currentThread().setUncaughtExceptionHandler((thread, throwable) -> Popups.handleUncaughtExceptions(Throwables.getRootCause(throwable)));
|
Thread.currentThread().setUncaughtExceptionHandler((thread, throwable) -> Popups.handleUncaughtExceptions(Throwables.getRootCause(throwable)));
|
||||||
init(stage);
|
init(stage);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init(Stage stage)
|
private void init(@NotNull Stage stage)
|
||||||
{
|
{
|
||||||
BitSquare.stage = stage;
|
BitSquare.stage = stage;
|
||||||
|
|
||||||
|
@ -71,11 +74,10 @@ public class BitSquare extends Application
|
||||||
|
|
||||||
settings.updateFromStorage((Settings) storage.read(settings.getClass().getName()));
|
settings.updateFromStorage((Settings) storage.read(settings.getClass().getName()));
|
||||||
|
|
||||||
if (ID.length() > 0)
|
if (ID.isEmpty())
|
||||||
stage.setTitle("BitSquare (" + ID + ")");
|
|
||||||
else
|
|
||||||
stage.setTitle("BitSquare");
|
stage.setTitle("BitSquare");
|
||||||
|
else
|
||||||
|
stage.setTitle("BitSquare (" + ID + ")");
|
||||||
|
|
||||||
GuiceFXMLLoader.setInjector(injector);
|
GuiceFXMLLoader.setInjector(injector);
|
||||||
|
|
||||||
|
@ -86,7 +88,7 @@ public class BitSquare extends Application
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(NavigationViewURL.MAIN), Localisation.getResourceBundle());
|
final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(NavigationItem.MAIN.getFxmlUrl()), Localisation.getResourceBundle());
|
||||||
final Parent mainView = loader.load();
|
final Parent mainView = loader.load();
|
||||||
final Scene scene = new Scene(mainView, 800, 600);
|
final Scene scene = new Scene(mainView, 800, 600);
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
|
|
@ -211,13 +211,12 @@ public class MainController implements Initializable, NavigationController
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private ChildController loadView(NavigationItem navigationItem)
|
||||||
public ChildController navigateToView(String fxmlView)
|
|
||||||
{
|
{
|
||||||
if (childController != null)
|
if (childController != null)
|
||||||
childController.cleanup();
|
childController.cleanup();
|
||||||
|
|
||||||
final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(fxmlView), Localisation.getResourceBundle());
|
final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(navigationItem.getFxmlUrl()), Localisation.getResourceBundle());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
final Node view = loader.load();
|
final Node view = loader.load();
|
||||||
|
@ -232,40 +231,39 @@ public class MainController implements Initializable, NavigationController
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Private methods
|
// Private methods
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
private void buildNavigation()
|
private void buildNavigation()
|
||||||
{
|
{
|
||||||
homeButton = addNavButton(leftNavPane, "Overview", Icons.HOME, Icons.HOME_ACTIVE, NavigationViewURL.HOME, NavigationItem.HOME);
|
homeButton = addNavButton(leftNavPane, "Overview", NavigationItem.HOME);
|
||||||
|
|
||||||
buyButton = addNavButton(leftNavPane, "Buy BTC", Icons.NAV_BUY, Icons.NAV_BUY_ACTIVE, NavigationViewURL.MARKET, NavigationItem.BUY);
|
buyButton = addNavButton(leftNavPane, "Buy BTC", NavigationItem.BUY);
|
||||||
|
|
||||||
sellButton = addNavButton(leftNavPane, "Sell BTC", Icons.NAV_SELL, Icons.NAV_SELL_ACTIVE, NavigationViewURL.MARKET, NavigationItem.SELL);
|
sellButton = addNavButton(leftNavPane, "Sell BTC", NavigationItem.SELL);
|
||||||
|
|
||||||
ordersButtonButtonHolder = new Pane();
|
ordersButtonButtonHolder = new Pane();
|
||||||
ordersButton = addNavButton(ordersButtonButtonHolder, "Orders", Icons.ORDERS, Icons.ORDERS_ACTIVE, NavigationViewURL.ORDERS, NavigationItem.ORDERS);
|
ordersButton = addNavButton(ordersButtonButtonHolder, "Orders", NavigationItem.ORDERS);
|
||||||
leftNavPane.getChildren().add(ordersButtonButtonHolder);
|
leftNavPane.getChildren().add(ordersButtonButtonHolder);
|
||||||
|
|
||||||
fundsButton = addNavButton(leftNavPane, "Funds", Icons.FUNDS, Icons.FUNDS_ACTIVE, NavigationViewURL.FUNDS, NavigationItem.FUNDS);
|
fundsButton = addNavButton(leftNavPane, "Funds", NavigationItem.FUNDS);
|
||||||
|
|
||||||
msgButtonHolder = new Pane();
|
msgButtonHolder = new Pane();
|
||||||
msgButton = addNavButton(msgButtonHolder, "Message", Icons.MSG, Icons.MSG_ACTIVE, NavigationViewURL.MSG, NavigationItem.MSG);
|
msgButton = addNavButton(msgButtonHolder, "Message", NavigationItem.MSG);
|
||||||
leftNavPane.getChildren().add(msgButtonHolder);
|
leftNavPane.getChildren().add(msgButtonHolder);
|
||||||
|
|
||||||
addBalanceInfo(rightNavPane);
|
addBalanceInfo(rightNavPane);
|
||||||
addAccountComboBox(rightNavPane);
|
addAccountComboBox(rightNavPane);
|
||||||
|
|
||||||
settingsButton = addNavButton(rightNavPane, "Settings", Icons.SETTINGS, Icons.SETTINGS_ACTIVE, NavigationViewURL.SETTINGS, NavigationItem.SETTINGS);
|
settingsButton = addNavButton(rightNavPane, "Settings", NavigationItem.SETTINGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ToggleButton addNavButton(Pane parent, String title, String iconId, String iconIdActivated, String navTarget, NavigationItem navigationItem)
|
private ToggleButton addNavButton(Pane parent, String title, NavigationItem navigationItem)
|
||||||
{
|
{
|
||||||
Pane pane = new Pane();
|
Pane pane = new Pane();
|
||||||
pane.setPrefSize(50, 50);
|
pane.setPrefSize(50, 50);
|
||||||
ToggleButton toggleButton = new ToggleButton("", Icons.getIconImageView(iconId));
|
ToggleButton toggleButton = new ToggleButton("", Icons.getIconImageView(navigationItem.getIcon()));
|
||||||
toggleButton.setToggleGroup(toggleGroup);
|
toggleButton.setToggleGroup(toggleGroup);
|
||||||
toggleButton.setId("nav-button");
|
toggleButton.setId("nav-button");
|
||||||
toggleButton.setPrefSize(50, 50);
|
toggleButton.setPrefSize(50, 50);
|
||||||
|
@ -275,9 +273,9 @@ public class MainController implements Initializable, NavigationController
|
||||||
((ImageView) (prevToggleButton.getGraphic())).setImage(prevToggleButtonIcon);
|
((ImageView) (prevToggleButton.getGraphic())).setImage(prevToggleButtonIcon);
|
||||||
}
|
}
|
||||||
prevToggleButtonIcon = ((ImageView) (toggleButton.getGraphic())).getImage();
|
prevToggleButtonIcon = ((ImageView) (toggleButton.getGraphic())).getImage();
|
||||||
((ImageView) (toggleButton.getGraphic())).setImage(Icons.getIconImage(iconIdActivated));
|
((ImageView) (toggleButton.getGraphic())).setImage(Icons.getIconImage(navigationItem.getActiveIcon()));
|
||||||
|
|
||||||
childController = navigateToView(navTarget);
|
childController = loadView(navigationItem);
|
||||||
|
|
||||||
if (childController instanceof MarketController)
|
if (childController instanceof MarketController)
|
||||||
((MarketController) childController).setDirection(navigationItem == NavigationItem.BUY ? Direction.BUY : Direction.SELL);
|
((MarketController) childController).setDirection(navigationItem == NavigationItem.BUY ? Direction.BUY : Direction.SELL);
|
||||||
|
|
|
@ -3,6 +3,4 @@ package io.bitsquare.gui;
|
||||||
public interface NavigationController
|
public interface NavigationController
|
||||||
{
|
{
|
||||||
ChildController navigateToView(NavigationItem navigationItem);
|
ChildController navigateToView(NavigationItem navigationItem);
|
||||||
|
|
||||||
ChildController navigateToView(String fxmlView);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,71 @@
|
||||||
package io.bitsquare.gui;
|
package io.bitsquare.gui;
|
||||||
|
|
||||||
|
import io.bitsquare.gui.util.Icons;
|
||||||
|
|
||||||
public enum NavigationItem
|
public enum NavigationItem
|
||||||
{
|
{
|
||||||
HOME, BUY, SELL, ORDERS, FUNDS, MSG, SETTINGS
|
MAIN("MAIN", "/io/bitsquare/gui/MainView.fxml"),
|
||||||
|
HOME("HOME", "/io/bitsquare/gui/home/HomeView.fxml", Icons.HOME, Icons.HOME_ACTIVE),
|
||||||
|
BUY("BUY", "/io/bitsquare/gui/market/MarketView.fxml", Icons.NAV_BUY, Icons.NAV_BUY_ACTIVE),
|
||||||
|
SELL("SELL", "/io/bitsquare/gui/market/MarketView.fxml", Icons.NAV_SELL, Icons.NAV_SELL_ACTIVE),
|
||||||
|
ORDERS("ORDERS", "/io/bitsquare/gui/orders/OrdersView.fxml", Icons.ORDERS, Icons.ORDERS_ACTIVE),
|
||||||
|
FUNDS("FUNDS", "/io/bitsquare/gui/funds/FundsView.fxml", Icons.FUNDS, Icons.FUNDS_ACTIVE),
|
||||||
|
MSG("MSG", "/io/bitsquare/gui/msg/MsgView.fxml", Icons.MSG, Icons.MSG_ACTIVE),
|
||||||
|
SETTINGS("SETTINGS", "/io/bitsquare/gui/settings/SettingsView.fxml", Icons.SETTINGS, Icons.SETTINGS_ACTIVE),
|
||||||
|
|
||||||
|
ORDER_BOOK("ORDER_BOOK", "/io/bitsquare/gui/market/orderbook/OrderBookView.fxml"),
|
||||||
|
TAKER_TRADE("TAKER_TRADE", "/io/bitsquare/gui/market/trade/TakerTradeView.fxml"),
|
||||||
|
OFFERER_TRADE("OFFERER_TRADE", "/io/bitsquare/gui/orders/OffererTradeView.fxml"),
|
||||||
|
CREATE_OFFER("CREATE_OFFER", "/io/bitsquare/gui/market/createOffer/CreateOfferView.fxml"),
|
||||||
|
|
||||||
|
CLOSED_TRADE("CLOSED_TRADE", "/io/bitsquare/gui/orders/closed/ClosedTradeView.fxml"),
|
||||||
|
OFFER("OFFER", "/io/bitsquare/gui/orders/offer/OfferView.fxml"),
|
||||||
|
PENDING_TRADE("PENDING_TRADE", "/io/bitsquare/gui/orders/pending/PendingTradeView.fxml"),
|
||||||
|
|
||||||
|
DEPOSIT("DEPOSIT", "/io/bitsquare/gui/funds/deposit/DepositView.fxml"),
|
||||||
|
WITHDRAWAL("WITHDRAWAL", "/io/bitsquare/gui/funds/withdrawal/WithdrawalView.fxml"),
|
||||||
|
TRANSACTIONS("TRANSACTIONS", "/io/bitsquare/gui/funds/transactions/TransactionsView.fxml"),
|
||||||
|
|
||||||
|
ARBITRATOR_PROFILE("ARBITRATOR_PROFILE", "/io/bitsquare/gui/arbitrators/profile/ArbitratorProfileView.fxml"),
|
||||||
|
ARBITRATOR_OVERVIEW("ARBITRATOR_OVERVIEW", "/io/bitsquare/gui/arbitrators/overview/ArbitratorOverviewView.fxml"),
|
||||||
|
ARBITRATOR_REGISTRATION("ARBITRATOR_REGISTRATION", "/io/bitsquare/gui/arbitrators/registration/ArbitratorRegistrationView.fxml");
|
||||||
|
|
||||||
|
private String fxmlUrl;
|
||||||
|
private String id;
|
||||||
|
private String icon;
|
||||||
|
private String activeIcon;
|
||||||
|
|
||||||
|
NavigationItem(String id, String fxmlUrl, String icon, String activeIcon)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
this.fxmlUrl = fxmlUrl;
|
||||||
|
this.icon = icon;
|
||||||
|
this.activeIcon = activeIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
NavigationItem(String id, String fxmlUrl)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
this.fxmlUrl = fxmlUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFxmlUrl()
|
||||||
|
{
|
||||||
|
return fxmlUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIcon()
|
||||||
|
{
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getActiveIcon()
|
||||||
|
{
|
||||||
|
return activeIcon;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
package io.bitsquare.gui;
|
|
||||||
|
|
||||||
public class NavigationViewURL
|
|
||||||
{
|
|
||||||
public static final String MAIN = "/io/bitsquare/gui/MainView.fxml";
|
|
||||||
|
|
||||||
public static final String HOME = "/io/bitsquare/gui/home/HomeView.fxml";
|
|
||||||
public static final String MARKET = "/io/bitsquare/gui/market/MarketView.fxml";
|
|
||||||
public static final String ORDERS = "/io/bitsquare/gui/orders/OrdersView.fxml";
|
|
||||||
public static final String FUNDS = "/io/bitsquare/gui/funds/FundsView.fxml";
|
|
||||||
public static final String MSG = "/io/bitsquare/gui/msg/MsgView.fxml";
|
|
||||||
public static final String SETTINGS = "/io/bitsquare/gui/settings/SettingsView.fxml";
|
|
||||||
|
|
||||||
public static final String ORDER_BOOK = "/io/bitsquare/gui/market/orderbook/OrderBookView.fxml";
|
|
||||||
public static final String TAKER_TRADE = "/io/bitsquare/gui/market/trade/TakerTradeView.fxml";
|
|
||||||
public static final String OFFERER_TRADE = "/io/bitsquare/gui/orders/OffererTradeView.fxml";
|
|
||||||
public static final String CREATE_OFFER = "/io/bitsquare/gui/market/createOffer/CreateOfferView.fxml";
|
|
||||||
|
|
||||||
public static final String CLOSED_TRADE = "/io/bitsquare/gui/orders/closed/ClosedTradeView.fxml";
|
|
||||||
public static final String OFFER = "/io/bitsquare/gui/orders/offer/OfferView.fxml";
|
|
||||||
public static final String PENDING_TRADE = "/io/bitsquare/gui/orders/pending/PendingTradeView.fxml";
|
|
||||||
|
|
||||||
public static final String DEPOSIT = "/io/bitsquare/gui/funds/deposit/DepositView.fxml";
|
|
||||||
public static final String WITHDRAWAL = "/io/bitsquare/gui/funds/withdrawal/WithdrawalView.fxml";
|
|
||||||
public static final String TRANSACTIONS = "/io/bitsquare/gui/funds/transactions/TransactionsView.fxml";
|
|
||||||
|
|
||||||
public static final String ARBITRATOR_PROFILE = "/io/bitsquare/gui/arbitrators/profile/ArbitratorProfileView.fxml";
|
|
||||||
public static final String ARBITRATOR_OVERVIEW = "/io/bitsquare/gui/arbitrators/overview/ArbitratorOverviewView.fxml";
|
|
||||||
public static final String ARBITRATOR_REGISTRATION = "/io/bitsquare/gui/arbitrators/registration/ArbitratorRegistrationView.fxml";
|
|
||||||
|
|
||||||
}
|
|
|
@ -5,7 +5,6 @@ import io.bitsquare.di.GuiceFXMLLoader;
|
||||||
import io.bitsquare.gui.ChildController;
|
import io.bitsquare.gui.ChildController;
|
||||||
import io.bitsquare.gui.NavigationController;
|
import io.bitsquare.gui.NavigationController;
|
||||||
import io.bitsquare.gui.NavigationItem;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.NavigationViewURL;
|
|
||||||
import io.bitsquare.gui.arbitrators.profile.ArbitratorProfileController;
|
import io.bitsquare.gui.arbitrators.profile.ArbitratorProfileController;
|
||||||
import io.bitsquare.locale.LanguageUtil;
|
import io.bitsquare.locale.LanguageUtil;
|
||||||
import io.bitsquare.locale.Localisation;
|
import io.bitsquare.locale.Localisation;
|
||||||
|
@ -73,7 +72,7 @@ public class ArbitratorOverviewController implements Initializable, ChildControl
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL url, ResourceBundle rb)
|
public void initialize(URL url, ResourceBundle rb)
|
||||||
{
|
{
|
||||||
navigateToView(NavigationViewURL.ARBITRATOR_PROFILE);
|
navigateToView(NavigationItem.ARBITRATOR_PROFILE);
|
||||||
checkButtonState();
|
checkButtonState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,17 +101,10 @@ public class ArbitratorOverviewController implements Initializable, ChildControl
|
||||||
@Override
|
@Override
|
||||||
public ChildController navigateToView(NavigationItem navigationItem)
|
public ChildController navigateToView(NavigationItem navigationItem)
|
||||||
{
|
{
|
||||||
return navigateToView(navigationItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ChildController navigateToView(String fxmlView)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (arbitratorProfileController != null)
|
if (arbitratorProfileController != null)
|
||||||
arbitratorProfileController.cleanup();
|
arbitratorProfileController.cleanup();
|
||||||
|
|
||||||
final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(fxmlView), Localisation.getResourceBundle());
|
final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(navigationItem.getFxmlUrl()), Localisation.getResourceBundle());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
final Node view = loader.load();
|
final Node view = loader.load();
|
||||||
|
|
|
@ -4,7 +4,6 @@ import com.google.inject.Inject;
|
||||||
import io.bitsquare.gui.ChildController;
|
import io.bitsquare.gui.ChildController;
|
||||||
import io.bitsquare.gui.NavigationController;
|
import io.bitsquare.gui.NavigationController;
|
||||||
import io.bitsquare.gui.NavigationItem;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.NavigationViewURL;
|
|
||||||
import io.bitsquare.gui.components.LazyLoadingTabPane;
|
import io.bitsquare.gui.components.LazyLoadingTabPane;
|
||||||
import io.bitsquare.storage.Storage;
|
import io.bitsquare.storage.Storage;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
@ -41,7 +40,7 @@ public class FundsController implements Initializable, ChildController, Navigati
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL url, ResourceBundle rb)
|
public void initialize(URL url, ResourceBundle rb)
|
||||||
{
|
{
|
||||||
tabPane.initialize(this, storage, NavigationViewURL.DEPOSIT, NavigationViewURL.WITHDRAWAL, NavigationViewURL.TRANSACTIONS);
|
tabPane.initialize(this, storage, NavigationItem.DEPOSIT.getFxmlUrl(), NavigationItem.WITHDRAWAL.getFxmlUrl(), NavigationItem.TRANSACTIONS.getFxmlUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,14 +66,7 @@ public class FundsController implements Initializable, ChildController, Navigati
|
||||||
@Override
|
@Override
|
||||||
public ChildController navigateToView(NavigationItem navigationItem)
|
public ChildController navigateToView(NavigationItem navigationItem)
|
||||||
{
|
{
|
||||||
return navigateToView(navigationItem);
|
return tabPane.navigateToView(navigationItem.getFxmlUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public ChildController navigateToView(String fxmlView)
|
|
||||||
{
|
|
||||||
return tabPane.navigateToView(fxmlView);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import io.bitsquare.btc.AddressEntry;
|
||||||
import io.bitsquare.btc.WalletFacade;
|
import io.bitsquare.btc.WalletFacade;
|
||||||
import io.bitsquare.gui.funds.withdrawal.WithdrawalListItem;
|
import io.bitsquare.gui.funds.withdrawal.WithdrawalListItem;
|
||||||
|
|
||||||
class DepositListItem extends WithdrawalListItem
|
public class DepositListItem extends WithdrawalListItem
|
||||||
{
|
{
|
||||||
public DepositListItem(AddressEntry addressEntry, WalletFacade walletFacade)
|
public DepositListItem(AddressEntry addressEntry, WalletFacade walletFacade)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,7 @@ import javafx.scene.control.Tooltip;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
class TransactionsListItem
|
public class TransactionsListItem
|
||||||
{
|
{
|
||||||
private static final Logger log = LoggerFactory.getLogger(TransactionsListItem.class);
|
private static final Logger log = LoggerFactory.getLogger(TransactionsListItem.class);
|
||||||
private final StringProperty date = new SimpleStringProperty();
|
private final StringProperty date = new SimpleStringProperty();
|
||||||
|
@ -124,7 +124,6 @@ class TransactionsListItem
|
||||||
progressIndicator.setPrefWidth(30);
|
progressIndicator.setPrefWidth(30);
|
||||||
Tooltip.install(progressIndicator, tooltip);
|
Tooltip.install(progressIndicator, tooltip);
|
||||||
|
|
||||||
|
|
||||||
if (address != null)
|
if (address != null)
|
||||||
{
|
{
|
||||||
confidenceListener = walletFacade.addConfidenceListener(new ConfidenceListener(address)
|
confidenceListener = walletFacade.addConfidenceListener(new ConfidenceListener(address)
|
||||||
|
|
|
@ -273,15 +273,7 @@ public class WithdrawalController implements Initializable, ChildController, Hib
|
||||||
public void updateItem(final WithdrawalListItem item, boolean empty)
|
public void updateItem(final WithdrawalListItem item, boolean empty)
|
||||||
{
|
{
|
||||||
super.updateItem(item, empty);
|
super.updateItem(item, empty);
|
||||||
|
setGraphic((item != null && !empty) ? item.getBalanceLabel() : null);
|
||||||
if (item != null && !empty)
|
|
||||||
{
|
|
||||||
setGraphic(item.getBalanceLabel());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setGraphic(null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import io.bitsquare.di.GuiceFXMLLoader;
|
||||||
import io.bitsquare.gui.ChildController;
|
import io.bitsquare.gui.ChildController;
|
||||||
import io.bitsquare.gui.NavigationController;
|
import io.bitsquare.gui.NavigationController;
|
||||||
import io.bitsquare.gui.NavigationItem;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.NavigationViewURL;
|
|
||||||
import io.bitsquare.gui.arbitrators.registration.ArbitratorRegistrationController;
|
import io.bitsquare.gui.arbitrators.registration.ArbitratorRegistrationController;
|
||||||
import io.bitsquare.locale.Localisation;
|
import io.bitsquare.locale.Localisation;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
@ -52,17 +51,10 @@ public class HomeController implements Initializable, ChildController, Navigatio
|
||||||
@Override
|
@Override
|
||||||
public ChildController navigateToView(NavigationItem navigationItem)
|
public ChildController navigateToView(NavigationItem navigationItem)
|
||||||
{
|
{
|
||||||
return navigateToView(navigationItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ChildController navigateToView(String fxmlView)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (arbitratorRegistrationController != null)
|
if (arbitratorRegistrationController != null)
|
||||||
arbitratorRegistrationController.cleanup();
|
arbitratorRegistrationController.cleanup();
|
||||||
|
|
||||||
final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(fxmlView), Localisation.getResourceBundle());
|
final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(navigationItem.getFxmlUrl()), Localisation.getResourceBundle());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
final Node view = loader.load();
|
final Node view = loader.load();
|
||||||
|
@ -95,13 +87,13 @@ public class HomeController implements Initializable, ChildController, Navigatio
|
||||||
@FXML
|
@FXML
|
||||||
public void onArbitratorRegistration(ActionEvent actionEvent)
|
public void onArbitratorRegistration(ActionEvent actionEvent)
|
||||||
{
|
{
|
||||||
navigateToView(NavigationViewURL.ARBITRATOR_REGISTRATION);
|
navigateToView(NavigationItem.ARBITRATOR_REGISTRATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void onArbitratorEdit(ActionEvent actionEvent)
|
public void onArbitratorEdit(ActionEvent actionEvent)
|
||||||
{
|
{
|
||||||
navigateToView(NavigationViewURL.ARBITRATOR_REGISTRATION);
|
navigateToView(NavigationItem.ARBITRATOR_REGISTRATION);
|
||||||
arbitratorRegistrationController.setEditMode(true);
|
arbitratorRegistrationController.setEditMode(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import io.bitsquare.di.GuiceFXMLLoader;
|
||||||
import io.bitsquare.gui.ChildController;
|
import io.bitsquare.gui.ChildController;
|
||||||
import io.bitsquare.gui.NavigationController;
|
import io.bitsquare.gui.NavigationController;
|
||||||
import io.bitsquare.gui.NavigationItem;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.NavigationViewURL;
|
|
||||||
import io.bitsquare.gui.market.orderbook.OrderBookController;
|
import io.bitsquare.gui.market.orderbook.OrderBookController;
|
||||||
import io.bitsquare.locale.Localisation;
|
import io.bitsquare.locale.Localisation;
|
||||||
import io.bitsquare.trade.Direction;
|
import io.bitsquare.trade.Direction;
|
||||||
|
@ -35,7 +34,7 @@ public class MarketController implements Initializable, NavigationController, Ch
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL url, ResourceBundle rb)
|
public void initialize(URL url, ResourceBundle rb)
|
||||||
{
|
{
|
||||||
navigateToView(NavigationViewURL.ORDER_BOOK);
|
navigateToView(NavigationItem.ORDER_BOOK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,19 +45,14 @@ public class MarketController implements Initializable, NavigationController, Ch
|
||||||
@Override
|
@Override
|
||||||
public ChildController navigateToView(NavigationItem navigationItem)
|
public ChildController navigateToView(NavigationItem navigationItem)
|
||||||
{
|
{
|
||||||
return navigateToView(navigationItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
if (navigationItem == NavigationItem.ORDER_BOOK && orderbookCreated)
|
||||||
public ChildController navigateToView(String fxmlView)
|
|
||||||
{
|
|
||||||
if (fxmlView.equals(NavigationViewURL.ORDER_BOOK) && orderbookCreated)
|
|
||||||
{
|
{
|
||||||
tabPane.getSelectionModel().select(0);
|
tabPane.getSelectionModel().select(0);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(fxmlView), Localisation.getResourceBundle());
|
final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(navigationItem.getFxmlUrl()), Localisation.getResourceBundle());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Pane view = loader.load();
|
Pane view = loader.load();
|
||||||
|
@ -72,7 +66,7 @@ public class MarketController implements Initializable, NavigationController, Ch
|
||||||
tab.setContent(view);
|
tab.setContent(view);
|
||||||
tabPane.getTabs().add(tab);
|
tabPane.getTabs().add(tab);
|
||||||
|
|
||||||
if (fxmlView.equals(NavigationViewURL.ORDER_BOOK))
|
if (navigationItem == NavigationItem.ORDER_BOOK)
|
||||||
{
|
{
|
||||||
tab.setClosable(false);
|
tab.setClosable(false);
|
||||||
orderbookCreated = true;
|
orderbookCreated = true;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import io.bitsquare.btc.WalletFacade;
|
||||||
import io.bitsquare.gui.ChildController;
|
import io.bitsquare.gui.ChildController;
|
||||||
import io.bitsquare.gui.Hibernate;
|
import io.bitsquare.gui.Hibernate;
|
||||||
import io.bitsquare.gui.NavigationController;
|
import io.bitsquare.gui.NavigationController;
|
||||||
import io.bitsquare.gui.NavigationViewURL;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.components.confidence.ConfidenceProgressIndicator;
|
import io.bitsquare.gui.components.confidence.ConfidenceProgressIndicator;
|
||||||
import io.bitsquare.gui.popups.Popups;
|
import io.bitsquare.gui.popups.Popups;
|
||||||
import io.bitsquare.gui.util.BitSquareConverter;
|
import io.bitsquare.gui.util.BitSquareConverter;
|
||||||
|
@ -238,7 +238,7 @@ public class CreateOfferController implements Initializable, ChildController, Hi
|
||||||
TabPane tabPane = ((TabPane) (rootContainer.getParent().getParent()));
|
TabPane tabPane = ((TabPane) (rootContainer.getParent().getParent()));
|
||||||
tabPane.getTabs().remove(tabPane.getSelectionModel().getSelectedItem());
|
tabPane.getTabs().remove(tabPane.getSelectionModel().getSelectedItem());
|
||||||
|
|
||||||
navigationController.navigateToView(NavigationViewURL.ORDER_BOOK);
|
navigationController.navigateToView(NavigationItem.ORDER_BOOK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,10 @@ import io.bitsquare.bank.BankAccountTypeInfo;
|
||||||
import io.bitsquare.btc.BtcFormatter;
|
import io.bitsquare.btc.BtcFormatter;
|
||||||
import io.bitsquare.btc.FeePolicy;
|
import io.bitsquare.btc.FeePolicy;
|
||||||
import io.bitsquare.btc.WalletFacade;
|
import io.bitsquare.btc.WalletFacade;
|
||||||
import io.bitsquare.gui.*;
|
import io.bitsquare.gui.ChildController;
|
||||||
|
import io.bitsquare.gui.MainController;
|
||||||
|
import io.bitsquare.gui.NavigationController;
|
||||||
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.market.createOffer.CreateOfferController;
|
import io.bitsquare.gui.market.createOffer.CreateOfferController;
|
||||||
import io.bitsquare.gui.market.trade.TakerTradeController;
|
import io.bitsquare.gui.market.trade.TakerTradeController;
|
||||||
import io.bitsquare.gui.popups.Popups;
|
import io.bitsquare.gui.popups.Popups;
|
||||||
|
@ -301,7 +304,7 @@ public class OrderBookController implements Initializable, ChildController
|
||||||
{
|
{
|
||||||
if (walletFacade.isUnusedTradeAddressBalanceAboveCreationFee())
|
if (walletFacade.isUnusedTradeAddressBalanceAboveCreationFee())
|
||||||
{
|
{
|
||||||
ChildController nextController = navigationController.navigateToView(NavigationViewURL.CREATE_OFFER);
|
ChildController nextController = navigationController.navigateToView(NavigationItem.CREATE_OFFER);
|
||||||
((CreateOfferController) nextController).setOrderBookFilter(orderBookFilter);
|
((CreateOfferController) nextController).setOrderBookFilter(orderBookFilter);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -324,7 +327,7 @@ public class OrderBookController implements Initializable, ChildController
|
||||||
if (isRegistered())
|
if (isRegistered())
|
||||||
{
|
{
|
||||||
String title = offer.getDirection() == Direction.BUY ? "Trade: Sell Bitcoin" : "Trade: Buy Bitcoin";
|
String title = offer.getDirection() == Direction.BUY ? "Trade: Sell Bitcoin" : "Trade: Buy Bitcoin";
|
||||||
TakerTradeController takerTradeController = (TakerTradeController) navigationController.navigateToView(NavigationViewURL.TAKER_TRADE);
|
TakerTradeController takerTradeController = (TakerTradeController) navigationController.navigateToView(NavigationItem.TAKER_TRADE);
|
||||||
|
|
||||||
BigInteger requestedAmount = offer.getAmount();
|
BigInteger requestedAmount = offer.getAmount();
|
||||||
if (!amount.getText().equals(""))
|
if (!amount.getText().equals(""))
|
||||||
|
|
|
@ -5,7 +5,7 @@ import com.google.inject.Inject;
|
||||||
import io.bitsquare.btc.*;
|
import io.bitsquare.btc.*;
|
||||||
import io.bitsquare.gui.ChildController;
|
import io.bitsquare.gui.ChildController;
|
||||||
import io.bitsquare.gui.NavigationController;
|
import io.bitsquare.gui.NavigationController;
|
||||||
import io.bitsquare.gui.NavigationViewURL;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.components.confidence.ConfidenceProgressIndicator;
|
import io.bitsquare.gui.components.confidence.ConfidenceProgressIndicator;
|
||||||
import io.bitsquare.gui.components.processbar.ProcessStepBar;
|
import io.bitsquare.gui.components.processbar.ProcessStepBar;
|
||||||
import io.bitsquare.gui.components.processbar.ProcessStepItem;
|
import io.bitsquare.gui.components.processbar.ProcessStepItem;
|
||||||
|
@ -398,7 +398,7 @@ public class TakerTradeController implements Initializable, ChildController
|
||||||
TabPane tabPane = ((TabPane) (rootContainer.getParent().getParent()));
|
TabPane tabPane = ((TabPane) (rootContainer.getParent().getParent()));
|
||||||
tabPane.getTabs().remove(tabPane.getSelectionModel().getSelectedItem());
|
tabPane.getTabs().remove(tabPane.getSelectionModel().getSelectedItem());
|
||||||
|
|
||||||
navigationController.navigateToView(NavigationViewURL.ORDER_BOOK);
|
navigationController.navigateToView(NavigationItem.ORDER_BOOK);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Other Private methods
|
// Other Private methods
|
||||||
|
|
|
@ -4,7 +4,6 @@ import com.google.inject.Inject;
|
||||||
import io.bitsquare.gui.ChildController;
|
import io.bitsquare.gui.ChildController;
|
||||||
import io.bitsquare.gui.NavigationController;
|
import io.bitsquare.gui.NavigationController;
|
||||||
import io.bitsquare.gui.NavigationItem;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.NavigationViewURL;
|
|
||||||
import io.bitsquare.gui.components.LazyLoadingTabPane;
|
import io.bitsquare.gui.components.LazyLoadingTabPane;
|
||||||
import io.bitsquare.storage.Storage;
|
import io.bitsquare.storage.Storage;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
@ -41,7 +40,7 @@ public class OrdersController implements Initializable, ChildController, Navigat
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL url, ResourceBundle rb)
|
public void initialize(URL url, ResourceBundle rb)
|
||||||
{
|
{
|
||||||
tabPane.initialize(this, storage, NavigationViewURL.OFFER, NavigationViewURL.PENDING_TRADE, NavigationViewURL.CLOSED_TRADE);
|
tabPane.initialize(this, storage, NavigationItem.OFFER.getFxmlUrl(), NavigationItem.PENDING_TRADE.getFxmlUrl(), NavigationItem.CLOSED_TRADE.getFxmlUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,13 +66,7 @@ public class OrdersController implements Initializable, ChildController, Navigat
|
||||||
@Override
|
@Override
|
||||||
public ChildController navigateToView(NavigationItem navigationItem)
|
public ChildController navigateToView(NavigationItem navigationItem)
|
||||||
{
|
{
|
||||||
return navigateToView(navigationItem);
|
return tabPane.navigateToView(navigationItem.getFxmlUrl());
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ChildController navigateToView(String fxmlView)
|
|
||||||
{
|
|
||||||
return tabPane.navigateToView(fxmlView);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,6 +115,9 @@ public class Popups
|
||||||
// Support handling of uncaught exception from any thread (also non gui thread)
|
// Support handling of uncaught exception from any thread (also non gui thread)
|
||||||
public static void handleUncaughtExceptions(Throwable throwable)
|
public static void handleUncaughtExceptions(Throwable throwable)
|
||||||
{
|
{
|
||||||
|
// while dev
|
||||||
|
throwable.printStackTrace();
|
||||||
|
|
||||||
Runnable runnable = () ->
|
Runnable runnable = () ->
|
||||||
{
|
{
|
||||||
if (Throwables.getRootCause(throwable) instanceof BlockStoreException)
|
if (Throwables.getRootCause(throwable) instanceof BlockStoreException)
|
||||||
|
@ -135,6 +138,8 @@ public class Popups
|
||||||
runnable.run();
|
runnable.run();
|
||||||
else
|
else
|
||||||
Platform.runLater(runnable);
|
Platform.runLater(runnable);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// custom
|
// custom
|
||||||
|
|
|
@ -11,7 +11,6 @@ import io.bitsquare.di.GuiceFXMLLoader;
|
||||||
import io.bitsquare.gui.ChildController;
|
import io.bitsquare.gui.ChildController;
|
||||||
import io.bitsquare.gui.NavigationController;
|
import io.bitsquare.gui.NavigationController;
|
||||||
import io.bitsquare.gui.NavigationItem;
|
import io.bitsquare.gui.NavigationItem;
|
||||||
import io.bitsquare.gui.NavigationViewURL;
|
|
||||||
import io.bitsquare.gui.util.BitSquareValidator;
|
import io.bitsquare.gui.util.BitSquareValidator;
|
||||||
import io.bitsquare.gui.util.Icons;
|
import io.bitsquare.gui.util.Icons;
|
||||||
import io.bitsquare.locale.*;
|
import io.bitsquare.locale.*;
|
||||||
|
@ -208,16 +207,11 @@ public class SettingsController implements Initializable, ChildController, Navig
|
||||||
@Override
|
@Override
|
||||||
public ChildController navigateToView(NavigationItem navigationItem)
|
public ChildController navigateToView(NavigationItem navigationItem)
|
||||||
{
|
{
|
||||||
return navigateToView(navigationItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ChildController navigateToView(String fxmlView)
|
|
||||||
{
|
|
||||||
if (childController != null)
|
if (childController != null)
|
||||||
childController.cleanup();
|
childController.cleanup();
|
||||||
|
|
||||||
final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(fxmlView), Localisation.getResourceBundle());
|
final GuiceFXMLLoader loader = new GuiceFXMLLoader(getClass().getResource(navigationItem.getFxmlUrl()), Localisation.getResourceBundle());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
final Node view = loader.load();
|
final Node view = loader.load();
|
||||||
|
@ -238,7 +232,7 @@ public class SettingsController implements Initializable, ChildController, Navig
|
||||||
Scene scene = new Scene((Parent) view, 800, 600);
|
Scene scene = new Scene((Parent) view, 800, 600);
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
stage.setOnHidden(windowEvent -> {
|
stage.setOnHidden(windowEvent -> {
|
||||||
if (fxmlView.equals(NavigationViewURL.ARBITRATOR_OVERVIEW))
|
if (navigationItem == NavigationItem.ARBITRATOR_OVERVIEW)
|
||||||
updateArbitrators();
|
updateArbitrators();
|
||||||
});
|
});
|
||||||
stage.show();
|
stage.show();
|
||||||
|
@ -283,7 +277,7 @@ public class SettingsController implements Initializable, ChildController, Navig
|
||||||
@FXML
|
@FXML
|
||||||
public void onAddArbitrator(ActionEvent actionEvent)
|
public void onAddArbitrator(ActionEvent actionEvent)
|
||||||
{
|
{
|
||||||
navigateToView(NavigationViewURL.ARBITRATOR_OVERVIEW);
|
navigateToView(NavigationItem.ARBITRATOR_OVERVIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -304,17 +304,6 @@ public class CountryUtil
|
||||||
allLocales = new ArrayList<>();
|
allLocales = new ArrayList<>();
|
||||||
allLocales.addAll(allLocalesAsSet);
|
allLocales.addAll(allLocalesAsSet);
|
||||||
allLocales.sort((locale1, locale2) -> locale1.getDisplayCountry().compareTo(locale2.getDisplayCountry()));
|
allLocales.sort((locale1, locale2) -> locale1.getDisplayCountry().compareTo(locale2.getDisplayCountry()));
|
||||||
/*
|
|
||||||
allLocales.sort(new Comparator<Locale>()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public int compare(Locale locale1, Locale locale2)
|
|
||||||
{
|
|
||||||
return locale1.getDisplayCountry().compareTo(locale2.getDisplayCountry());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
*/
|
|
||||||
return allLocales;
|
return allLocales;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,11 @@ public class Settings implements Serializable
|
||||||
acceptedArbitrators.remove(item);
|
acceptedArbitrators.remove(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Getters
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
public List<Arbitrator> getAcceptedArbitrators()
|
public List<Arbitrator> getAcceptedArbitrators()
|
||||||
{
|
{
|
||||||
return acceptedArbitrators;
|
return acceptedArbitrators;
|
||||||
|
@ -88,10 +93,6 @@ public class Settings implements Serializable
|
||||||
return acceptedLanguageLocales;
|
return acceptedLanguageLocales;
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Getters
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
public List<Country> getAcceptedCountries()
|
public List<Country> getAcceptedCountries()
|
||||||
{
|
{
|
||||||
return acceptedCountryLocales;
|
return acceptedCountryLocales;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue