use of eu.ggnet.dwoss.report.ee.assist.gen.ReportLineGenerator in project dwoss by gg-net.
the class ReportViewTryout method main.
public static void main(String[] args) {
Dl.local().add(RemoteLookup.class, new RemoteLookup() {
@Override
public <T> boolean contains(Class<T> clazz) {
return false;
}
@Override
public <T> T lookup(Class<T> clazz) {
return null;
}
});
TradeName tradeName = TradeName.FUJITSU;
UiCore.startSwing(() -> new JLabel("Main Applikation"));
EnumMap<ViewReportResult.Type, NavigableSet<ReportLine>> lines = new EnumMap<>(ViewReportResult.Type.class);
ReportLineGenerator op = new ReportLineGenerator();
NavigableSet<ReportLine> invoicedLines = new TreeSet<>();
NavigableSet<ReportLine> repayedLinesLines = new TreeSet<>();
for (int i = 0; i < 30; i++) {
invoicedLines.add(op.makeReportLine(Arrays.asList(tradeName), new Date(), i));
repayedLinesLines.add(op.makeReportLine(Arrays.asList(tradeName), new Date(), i));
}
lines.put(INVOICED, invoicedLines);
lines.put(REPAYMENTS, repayedLinesLines);
ViewReportResult result = new ViewReportResult(lines, ReportParameter.builder().reportName("JUnit " + tradeName + " Report").contractor(tradeName).start(new Date()).end(new Date()).build());
Ui.build().fxml().show(() -> new ReportController.In(result, false), ReportController.class);
}
use of eu.ggnet.dwoss.report.ee.assist.gen.ReportLineGenerator in project dwoss by gg-net.
the class ReturnsReportTryout method main.
public static void main(String[] args) {
ReportLineGenerator gen = new ReportLineGenerator();
List<ReportLine> list = new ArrayList<>();
for (int i = 0; i < 10; i++) {
list.add(gen.makeReportLine());
}
UiCore.startSwing(() -> new JLabel("Main Applikation"));
Ui.exec(() -> {
Ui.build().swing().show(() -> list, () -> new ReturnsReportView());
});
}
Aggregations