Search in sources :

Example 1 with ReportLineGenerator

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);
}
Also used : TradeName(eu.ggnet.dwoss.rules.TradeName) ReportLine(eu.ggnet.dwoss.report.ee.entity.ReportLine) JLabel(javax.swing.JLabel) RemoteLookup(eu.ggnet.saft.core.cap.RemoteLookup) ViewReportResult(eu.ggnet.dwoss.report.ee.ReportAgent.ViewReportResult) ReportController(eu.ggnet.dwoss.report.ui.main.ReportController) ReportLineGenerator(eu.ggnet.dwoss.report.ee.assist.gen.ReportLineGenerator)

Example 2 with ReportLineGenerator

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());
    });
}
Also used : ReportLine(eu.ggnet.dwoss.report.ee.entity.ReportLine) ReturnsReportView(eu.ggnet.dwoss.report.ui.returns.ReturnsReportView) ArrayList(java.util.ArrayList) JLabel(javax.swing.JLabel) ReportLineGenerator(eu.ggnet.dwoss.report.ee.assist.gen.ReportLineGenerator)

Aggregations

ReportLineGenerator (eu.ggnet.dwoss.report.ee.assist.gen.ReportLineGenerator)2 ReportLine (eu.ggnet.dwoss.report.ee.entity.ReportLine)2 JLabel (javax.swing.JLabel)2 ViewReportResult (eu.ggnet.dwoss.report.ee.ReportAgent.ViewReportResult)1 ReportController (eu.ggnet.dwoss.report.ui.main.ReportController)1 ReturnsReportView (eu.ggnet.dwoss.report.ui.returns.ReturnsReportView)1 TradeName (eu.ggnet.dwoss.rules.TradeName)1 RemoteLookup (eu.ggnet.saft.core.cap.RemoteLookup)1 ArrayList (java.util.ArrayList)1