use of eu.ggnet.dwoss.report.ee.entity.Report in project dwoss by gg-net.
the class ReportHtmlTryout method tryout.
@Test
public void tryout() throws InterruptedException, InvocationTargetException, MalformedURLException {
Report report = new Report("TestReport", ALSO, _2011_10_01, _2011_10_07);
report.setComment("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.");
// Implicit start the platform.
new JFXPanel();
Platform.runLater(() -> {
Stage stage = new Stage();
stage.setTitle("HtmlViewer");
WebView view = new WebView();
view.getEngine().loadContent(Css.toHtml5WithStyle(report.toHtml()));
BorderPane p = new BorderPane(view);
Scene scene = new Scene(p, Color.ALICEBLUE);
stage.setScene(scene);
stage.showAndWait();
complete = true;
});
while (!complete) {
Thread.sleep(500);
}
}
use of eu.ggnet.dwoss.report.ee.entity.Report in project dwoss by gg-net.
the class SelectExistingReportViewTryout method main.
public static void main(String[] args) {
ReportAgent rastub = new ReportAgent() {
private int counter = 0;
// <editor-fold defaultstate="collapsed" desc="Unused Methods">
@Override
public List<SimpleReportLine> findSimple(SearchParameter search, int firstResult, int maxResults) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<ReportLine> find(SearchParameter search, int firstResult, int maxResults) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public long count(SearchParameter search) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public ViewReportResult prepareReport(ReportParameter p, boolean loadUnreported) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<ReportLine> findReportLinesByDocumentType(DocumentType type, Date from, Date till) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Report store(Report report, Collection<Storeable> storeables) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public ViewReportResult findReportResult(long reportId) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public List<ReportLine> findAllReportLinesReverse(int firstResult, int maxResults) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public Set<ReportLine> attachDanglingComplaints(TradeName type, Date till) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public <T> long count(Class<T> entityClass) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public <T> List<T> findAll(Class<T> entityClass) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public <T> List<T> findAll(Class<T> entityClass, int start, int amount) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public <T> List<T> findAllEager(Class<T> entityClass) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public <T> List<T> findAllEager(Class<T> entityClass, int start, int amount) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public <T> T findById(Class<T> entityClass, Object id) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public <T> T findById(Class<T> entityClass, Object id, LockModeType lockModeType) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public <T> T findByIdEager(Class<T> entityClass, Object id) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public <T> T findByIdEager(Class<T> entityClass, Object id, LockModeType lockModeType) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean updateReportLineComment(int optLock, long reportId, String comment) {
// To change body of generated methods, choose Tools | Templates.
throw new UnsupportedOperationException("Not supported yet.");
}
// </editor-fold>
@Override
public Reply<String> updateReportName(Report.OptimisticKey key, String name) {
System.out.println("Report Name updated with " + name + " calles");
counter++;
if ((counter % 2) != 0) {
System.out.println("Counter=" + counter + " simulating Error");
return Reply.failure("Counter=" + counter + " simulating Error");
} else {
System.out.println("Counter=" + counter + " simulating Success");
return Reply.success(name);
}
}
};
Dl.remote().add(ReportAgent.class, rastub);
UiCore.startSwing(() -> new JLabel("Main Applikation"));
final Date today = new Date();
final Date enddate = new Date();
final Date startdate = new Date();
final Set<TradeName> trades = new HashSet<>();
trades.add(TradeName.HP);
trades.add(TradeName.ACER);
// build some sample Reports
List<Report> allReports = new ArrayList();
for (int i = 0; i < 8; i++) {
for (TradeName traden : trades) {
startdate.setYear(62 + i);
long sum = today.getTime() + startdate.getTime();
Date sumDate = new Date(sum);
String name = "Report: " + i + "-" + traden + "-" + sumDate.toString();
Report e = new Report(name, traden, sumDate, enddate);
allReports.add(e);
}
}
Ui.exec(() -> {
Ui.build().fx().show(() -> allReports, () -> new SelectExistingReportView());
});
}
Aggregations