Search in sources :

Example 1 with TradesChartsView

use of io.bitsquare.gui.main.market.trades.TradesChartsView 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);
}
Also used : TradesChartsView(io.bitsquare.gui.main.market.trades.TradesChartsView) SpreadView(io.bitsquare.gui.main.market.spread.SpreadView) Tab(javafx.scene.control.Tab) ScrollPane(javafx.scene.control.ScrollPane) OfferBookChartView(io.bitsquare.gui.main.market.offerbook.OfferBookChartView) MainView(io.bitsquare.gui.main.MainView) OfferBookChartView(io.bitsquare.gui.main.market.offerbook.OfferBookChartView) SpreadView(io.bitsquare.gui.main.market.spread.SpreadView) TradesChartsView(io.bitsquare.gui.main.market.trades.TradesChartsView)

Aggregations

MainView (io.bitsquare.gui.main.MainView)1 OfferBookChartView (io.bitsquare.gui.main.market.offerbook.OfferBookChartView)1 SpreadView (io.bitsquare.gui.main.market.spread.SpreadView)1 TradesChartsView (io.bitsquare.gui.main.market.trades.TradesChartsView)1 ScrollPane (javafx.scene.control.ScrollPane)1 Tab (javafx.scene.control.Tab)1