Search in sources :

Example 1 with AccountSettingsView

use of io.bitsquare.gui.main.account.settings.AccountSettingsView in project bitsquare by bitsquare.

the class AccountView method loadView.

private void loadView(Class<? extends View> viewClass) {
    View view = viewLoader.load(viewClass);
    if (view instanceof AccountSettingsView) {
        selectedTab = accountSettingsTab;
        accountSettingsView = (AccountSettingsView) view;
        selectedTab.setText("Account");
        if (arbitratorRegistrationTab != null) {
            arbitratorRegistrationTab.setDisable(false);
            if (arbitratorRegistrationView != null)
                arbitratorRegistrationView.onTabSelection(false);
        }
    } else if (view instanceof ArbitratorRegistrationView) {
        if (arbitratorRegistrationTab != null) {
            selectedTab = arbitratorRegistrationTab;
            arbitratorRegistrationView = (ArbitratorRegistrationView) view;
            arbitratorRegistrationView.onTabSelection(true);
        }
    } else {
        throw new IllegalArgumentException("View not supported: " + view);
    }
    selectedTab.setContent(view.getRoot());
    root.getSelectionModel().select(selectedTab);
}
Also used : AccountSettingsView(io.bitsquare.gui.main.account.settings.AccountSettingsView) ArbitratorRegistrationView(io.bitsquare.gui.main.account.arbitratorregistration.ArbitratorRegistrationView) MainView(io.bitsquare.gui.main.MainView) AccountSettingsView(io.bitsquare.gui.main.account.settings.AccountSettingsView) FiatAccountsView(io.bitsquare.gui.main.account.content.fiataccounts.FiatAccountsView) ArbitratorRegistrationView(io.bitsquare.gui.main.account.arbitratorregistration.ArbitratorRegistrationView)

Aggregations

MainView (io.bitsquare.gui.main.MainView)1 ArbitratorRegistrationView (io.bitsquare.gui.main.account.arbitratorregistration.ArbitratorRegistrationView)1 FiatAccountsView (io.bitsquare.gui.main.account.content.fiataccounts.FiatAccountsView)1 AccountSettingsView (io.bitsquare.gui.main.account.settings.AccountSettingsView)1