Search in sources :

Example 1 with OpenOffersView

use of io.bitsquare.gui.main.portfolio.openoffer.OpenOffersView in project bitsquare by bitsquare.

the class PortfolioView method loadView.

private void loadView(Class<? extends View> viewClass) {
    // we want to get activate/deactivate called, so we remove the old view on tab change
    if (currentTab != null)
        currentTab.setContent(null);
    View view = viewLoader.load(viewClass);
    if (view instanceof OpenOffersView)
        currentTab = openOffersTab;
    else if (view instanceof PendingTradesView)
        currentTab = pendingTradesTab;
    else if (view instanceof ClosedTradesView)
        currentTab = closedTradesTab;
    else if (view instanceof FailedTradesView)
        currentTab = failedTradesTab;
    currentTab.setContent(view.getRoot());
    root.getSelectionModel().select(currentTab);
}
Also used : OpenOffersView(io.bitsquare.gui.main.portfolio.openoffer.OpenOffersView) PendingTradesView(io.bitsquare.gui.main.portfolio.pendingtrades.PendingTradesView) ClosedTradesView(io.bitsquare.gui.main.portfolio.closedtrades.ClosedTradesView) FailedTradesView(io.bitsquare.gui.main.portfolio.failedtrades.FailedTradesView) MainView(io.bitsquare.gui.main.MainView) ClosedTradesView(io.bitsquare.gui.main.portfolio.closedtrades.ClosedTradesView) FailedTradesView(io.bitsquare.gui.main.portfolio.failedtrades.FailedTradesView) OpenOffersView(io.bitsquare.gui.main.portfolio.openoffer.OpenOffersView) PendingTradesView(io.bitsquare.gui.main.portfolio.pendingtrades.PendingTradesView)

Aggregations

MainView (io.bitsquare.gui.main.MainView)1 ClosedTradesView (io.bitsquare.gui.main.portfolio.closedtrades.ClosedTradesView)1 FailedTradesView (io.bitsquare.gui.main.portfolio.failedtrades.FailedTradesView)1 OpenOffersView (io.bitsquare.gui.main.portfolio.openoffer.OpenOffersView)1 PendingTradesView (io.bitsquare.gui.main.portfolio.pendingtrades.PendingTradesView)1