use of bisq.desktop.main.settings.network.NetworkSettingsView 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);
}
Aggregations