use of bisq.desktop.common.view.View in project bisq-desktop by bisq-network.
the class DisputesView 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 (arbitratorsDisputesTab != null && view instanceof ArbitratorDisputeView)
currentTab = arbitratorsDisputesTab;
else
currentTab = tradersDisputesTab;
currentTab.setContent(view.getRoot());
root.getSelectionModel().select(currentTab);
}
use of bisq.desktop.common.view.View in project bisq-desktop by bisq-network.
the class ProposalView method loadView.
private void loadView(Class<? extends View> viewClass) {
View view = viewLoader.load(viewClass);
content.getChildren().setAll(view.getRoot());
if (view instanceof ProposalDashboardView)
dashboard.setSelected(true);
else if (view instanceof MakeProposalView)
make.setSelected(true);
else if (view instanceof ActiveProposalsView)
active.setSelected(true);
else if (view instanceof MyVotesView)
myVotes.setSelected(true);
else if (view instanceof VotesView)
votes.setSelected(true);
else if (view instanceof ClosedProposalsView)
closed.setSelected(true);
}
use of bisq.desktop.common.view.View in project bisq-desktop by bisq-network.
the class MenuItem method loadView.
private void loadView(Class<? extends View> viewClass) {
View view = viewLoader.load(viewClass);
content.getChildren().setAll(view.getRoot());
if (view instanceof BsqDashboardView)
dashboard.setSelected(true);
else if (view instanceof BsqSendView)
send.setSelected(true);
else if (view instanceof BsqReceiveView)
receive.setSelected(true);
else if (view instanceof BsqTxView)
transactions.setSelected(true);
}
use of bisq.desktop.common.view.View in project bisq-desktop by bisq-network.
the class FxmlViewLoaderTests method wellFormedFxmlFileShouldSucceed.
@Test
public void wellFormedFxmlFileShouldSucceed() {
given(viewFactory.call(WellFormed.class)).willReturn(new WellFormed());
View view = viewLoader.load(WellFormed.class);
assertThat(view, instanceOf(WellFormed.class));
}
use of bisq.desktop.common.view.View in project bisq-desktop by bisq-network.
the class DaoView method loadView.
private void loadView(Class<? extends View> viewClass) {
View view = viewLoader.load(viewClass);
if (view instanceof BsqWalletView) {
selectedTab = bsqWalletTab;
bsqWalletView = (BsqWalletView) view;
} else if (view instanceof ProposalView) {
selectedTab = compensationTab;
} else if (view instanceof VotingView) {
selectedTab = votingTab;
}
selectedTab.setContent(view.getRoot());
root.getSelectionModel().select(selectedTab);
}
Aggregations