Search in sources :

Example 1 with AboutView

use of bisq.desktop.main.settings.about.AboutView in project bisq-desktop by bisq-network.

the class SettingsView method loadView.

private void loadView(Class<? extends View> viewClass) {
    final Tab tab;
    View view = viewLoader.load(viewClass);
    if (view instanceof PreferencesView)
        tab = preferencesTab;
    else if (view instanceof NetworkSettingsView)
        tab = networkTab;
    else if (view instanceof AboutView)
        tab = aboutTab;
    else
        throw new IllegalArgumentException("Navigation to " + viewClass + " is not supported");
    if (tab.getContent() != null && tab.getContent() instanceof ScrollPane) {
        ((ScrollPane) tab.getContent()).setContent(view.getRoot());
    } else {
        tab.setContent(view.getRoot());
    }
    root.getSelectionModel().select(tab);
}
Also used : PreferencesView(bisq.desktop.main.settings.preferences.PreferencesView) Tab(javafx.scene.control.Tab) ScrollPane(javafx.scene.control.ScrollPane) NetworkSettingsView(bisq.desktop.main.settings.network.NetworkSettingsView) AboutView(bisq.desktop.main.settings.about.AboutView) FxmlView(bisq.desktop.common.view.FxmlView) AboutView(bisq.desktop.main.settings.about.AboutView) View(bisq.desktop.common.view.View) MainView(bisq.desktop.main.MainView) NetworkSettingsView(bisq.desktop.main.settings.network.NetworkSettingsView) PreferencesView(bisq.desktop.main.settings.preferences.PreferencesView)

Aggregations

FxmlView (bisq.desktop.common.view.FxmlView)1 View (bisq.desktop.common.view.View)1 MainView (bisq.desktop.main.MainView)1 AboutView (bisq.desktop.main.settings.about.AboutView)1 NetworkSettingsView (bisq.desktop.main.settings.network.NetworkSettingsView)1 PreferencesView (bisq.desktop.main.settings.preferences.PreferencesView)1 ScrollPane (javafx.scene.control.ScrollPane)1 Tab (javafx.scene.control.Tab)1