Search in sources :

Example 1 with OpenOffersView

use of bisq.desktop.main.portfolio.openoffer.OpenOffersView in project bisq-desktop by bisq-network.

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(bisq.desktop.main.portfolio.openoffer.OpenOffersView) PendingTradesView(bisq.desktop.main.portfolio.pendingtrades.PendingTradesView) ClosedTradesView(bisq.desktop.main.portfolio.closedtrades.ClosedTradesView) FailedTradesView(bisq.desktop.main.portfolio.failedtrades.FailedTradesView) OpenOffersView(bisq.desktop.main.portfolio.openoffer.OpenOffersView) PendingTradesView(bisq.desktop.main.portfolio.pendingtrades.PendingTradesView) ClosedTradesView(bisq.desktop.main.portfolio.closedtrades.ClosedTradesView) FxmlView(bisq.desktop.common.view.FxmlView) FailedTradesView(bisq.desktop.main.portfolio.failedtrades.FailedTradesView) View(bisq.desktop.common.view.View) MainView(bisq.desktop.main.MainView)

Aggregations

FxmlView (bisq.desktop.common.view.FxmlView)1 View (bisq.desktop.common.view.View)1 MainView (bisq.desktop.main.MainView)1 ClosedTradesView (bisq.desktop.main.portfolio.closedtrades.ClosedTradesView)1 FailedTradesView (bisq.desktop.main.portfolio.failedtrades.FailedTradesView)1 OpenOffersView (bisq.desktop.main.portfolio.openoffer.OpenOffersView)1 PendingTradesView (bisq.desktop.main.portfolio.pendingtrades.PendingTradesView)1