use of io.bitsquare.gui.main.market.spread.SpreadView in project bitsquare by bitsquare.
the class MarketView method loadView.
private void loadView(Class<? extends View> viewClass) {
final Tab tab;
View view = viewLoader.load(viewClass);
if (view instanceof OfferBookChartView)
tab = chartsTab;
else if (view instanceof TradesChartsView)
tab = tradesTab;
else if (view instanceof SpreadView)
tab = statisticsTab;
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