Add HTML export action
This commit is contained in:
@@ -13,18 +13,21 @@ public class HTMLExporter {
|
||||
private final SCollection model;
|
||||
|
||||
private HTMLExporter() throws FileNotFoundException {
|
||||
model = SCollection.of(
|
||||
this(SCollection.of(
|
||||
SRectangle.create(10, 10, 40, 60, Color.RED),
|
||||
SRectangle.create(70, 10, 40, 60),
|
||||
SCollection.of(
|
||||
SRectangle.create(100, 200, 40, 60, Color.MAGENTA),
|
||||
SRectangle.create(150, 200, 40, 60, Color.MAGENTA)
|
||||
)
|
||||
);
|
||||
export();
|
||||
));
|
||||
}
|
||||
|
||||
private void export() throws FileNotFoundException {
|
||||
public HTMLExporter(SCollection model){
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public void export() throws FileNotFoundException {
|
||||
try (final PrintWriter html = new PrintWriter("out.html")) {
|
||||
try (final PrintWriter css = new PrintWriter("style.css")) {
|
||||
HTMLDraftman draftman = new HTMLDraftman(html, css);
|
||||
|
||||
Reference in New Issue
Block a user