use of eu.ggnet.dwoss.mandator.api.value.Contractors in project dwoss by gg-net.
the class ResolveRepaymentAction method actionPerformed.
@Override
public void actionPerformed(ActionEvent e) {
Ui.exec(() -> {
Contractors contractors = Ui.progress().call(() -> Dl.local().lookup(CachedMandators.class).loadContractors());
Ui.exec(() -> {
Ui.build().dialog().eval(() -> {
ChoiceDialog<TradeName> dialog = new ChoiceDialog<>(contractors.all().iterator().next(), contractors.all());
dialog.setTitle("Gutschriften");
dialog.setHeaderText(RESOLVE_REPAYMENT.toName());
dialog.setContentText("Lieferant auswählen:");
return dialog;
}).opt().ifPresent(c -> Ui.build().fxml().show(() -> c, ResolveRepaymentController.class));
});
});
}
use of eu.ggnet.dwoss.mandator.api.value.Contractors in project dwoss by gg-net.
the class RevenueReportSelectionViewTryout method main.
public static void main(String[] args) {
Mandators mandatorSupporterMock = mock(Mandators.class);
when(mandatorSupporterMock.loadContractors()).thenReturn(new Contractors(EnumSet.of(TradeName.FUJITSU), EnumSet.of(TradeName.FUJITSU)));
// Not yet implemented
Dl.remote().add(Mandators.class, mandatorSupporterMock);
Ui.exec(() -> {
UiCore.startSwing(() -> new JLabel("Main Applikation"));
Ui.build().fx().eval(() -> new RevenueReportSelectionView()).opt().ifPresent(System.out::println);
});
}
use of eu.ggnet.dwoss.mandator.api.value.Contractors in project dwoss by gg-net.
the class CreateNewReportViewTryout method main.
public static void main(String[] args) {
Mandators mandators = mock(Mandators.class);
when(mandators.loadContractors()).thenReturn(new Contractors(EnumSet.allOf(TradeName.class), EnumSet.allOf(TradeName.class)));
Dl.remote().add(Mandators.class, mandators);
Ui.exec(() -> {
UiCore.startSwing(() -> new JLabel("Application"));
Ui.build().swing().eval(() -> OkCancelWrap.vetoResult(new CreateNewReportView())).opt().ifPresent(v -> System.out.println(v.getPayload().getParameter()));
});
}
Aggregations