1 package org.simantics.document.linking.report;
4 * Interface for creating documents.
6 * @author Marko Luukkainen <marko.luukkainen@vtt.fi>
9 public interface Document {
11 public static String TOC = "toc";
13 public enum TextSize {TINY,SMALL,MEDIUM,LARGE,HUGE};
16 * Creates a new element of given class
21 public <T extends DocumentElement> T newElement(Class<T> cls,String... options) throws Exception;
24 * Creates a new element of given class, copies parameters from previous element of the same class.
29 public <T extends DocumentElement> T nextElement(Class<T> cls, String... options) throws Exception;
32 * Returns last element of given class.
36 public <T extends DocumentElement> T getCurrentElement(Class<T> cls);
40 * Creates a new item of given class
45 public <T extends DocumentItem> T newItem(Class<T> cls,String... options) throws Exception;
48 * Requests a new page. After this call getCurrentLine() is expected to return 1.
51 public void nextPage() throws Exception;
54 * Returns current line (of the page). The number for first line is 1.
57 public int getCurrentLine();
60 * Returns estimated available lines for current page. For non-paged implementations returns Integer.MAX_VALUE;
63 public int getAvailableLines();
66 * Closes the document.
70 public void close() throws Exception;