Search in sources :

Example 1 with NetworkSettingsView

use of io.bitsquare.gui.main.settings.network.NetworkSettingsView in project bitsquare by bitsquare.

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 = networkSettingsTab;
    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(io.bitsquare.gui.main.settings.preferences.PreferencesView) Tab(javafx.scene.control.Tab) ScrollPane(javafx.scene.control.ScrollPane) NetworkSettingsView(io.bitsquare.gui.main.settings.network.NetworkSettingsView) AboutView(io.bitsquare.gui.main.settings.about.AboutView) MainView(io.bitsquare.gui.main.MainView) NetworkSettingsView(io.bitsquare.gui.main.settings.network.NetworkSettingsView) AboutView(io.bitsquare.gui.main.settings.about.AboutView) PreferencesView(io.bitsquare.gui.main.settings.preferences.PreferencesView)

Aggregations

MainView (io.bitsquare.gui.main.MainView)1 AboutView (io.bitsquare.gui.main.settings.about.AboutView)1 NetworkSettingsView (io.bitsquare.gui.main.settings.network.NetworkSettingsView)1 PreferencesView (io.bitsquare.gui.main.settings.preferences.PreferencesView)1 ScrollPane (javafx.scene.control.ScrollPane)1 Tab (javafx.scene.control.Tab)1