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