- Jaswand applies the concept of re-usable web components and offers a Java Library to generate HTML reports quickly.
- Jaswand makes use of the pre-existing data models from j2html to render HTML files.
- MaterializeCSS 1.0 is used as the CSS framework.
- sourceCompatibility is 1.8.
You can view proof-of-concept sample of a Jaswand generated report here.
More reports and code samples are available in the /samples/
directory.
Make sure to check out the Jaswand Docs.
Jaswand is available via the Central. Add it your project as a dependency:
<dependency>
<groupId>io.github.arkits</groupId>
<artifactId>jaswand</artifactId>
<version>0.0.5</version>
</dependency>
dependencies {
compile group: 'io.github.arkits', name: 'jaswand', version: '0.0.5'
}
Basic Usage
// First create a Report object
Report report = new Report("Benchmark Report");
// and then export your Report as a HTML!
report.export("out/rendered.html");
Creating and Adding Elements
// Create an ElementFactory
ElementFactory elementFactory = new ElementFactory();
// Generate a ReportCard element using the ElementFactory
ContainerTag card = elementFactory.reportCard(
"Time Taken to Process", "20 ms");
// Add the card into your report
report.add(card);