|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AQHtmlWriter
This interface provides a set of convenient methods for generating HTML output. An object implementing this interface can be obtained by calling aqua.io.newHtmlWriter().
Example:
var d = aqua.data.newDataSet( [ 'column1','column2','column3' ] );
d.addRowWithValues("a","b","");
d.addRowWithValues("1","2","3");
var w = aqua.io.newHtmlWriter();
w.setTitle("Example");
w.setTableStyle("width:50%;");
w.setRowStyle("background-color:#808080;");
w.write("Table");
w.write(d);
print(w.toHtml());
w.saveToFile('c:/test.html','utf-8');
Method Summary | |
---|---|
void |
close()
Closes this writer and releases any system resources associated with it. |
void |
saveToFile(String filename)
Save the generated HTML to a file using UTF-8 encoding. |
void |
saveToFile(String filename,
String encoding)
Save the generated HTML to a file using the specified encoding. |
void |
setCellStyle(String style)
Sets the style of subsequent table cells (<TD> elements>). |
void |
setEmbeddedStyleSheet(String styleSheet)
Sets embedded style sheet. |
void |
setRowStyle(String style)
Sets the style of subsequent table rows (<TR> elements). |
void |
setTableStyle(String style)
Sets the style of subsequent <TABLE> element. |
void |
setTitle(String title)
Sets document <TITLE> tag. |
String |
toHtml()
Returns generated HTML. |
void |
writeLink(String text,
String url)
Writes a hyperlink (<A HREF> element). |
void |
writeText(String text)
Writes arbitrary text. |
Methods inherited from interface com.aquafold.openapi.io.AQDataWriter |
---|
write, write, write, write |
Method Detail |
---|
void setTitle(String title)
title
- Document title.void setEmbeddedStyleSheet(String styleSheet)
styleSheet
- void setTableStyle(String style)
style
- void setRowStyle(String style)
style
- void setCellStyle(String style)
style
- void writeText(String text) throws Exception
AQDataWriter.write(Object)
method.
text
- Text to be written.
Exception
void writeLink(String text, String url) throws Exception
text
- User-visible text.url
- Link URL.
Exception
String toHtml()
void saveToFile(String filename) throws Exception
filename
-
Exception
void saveToFile(String filename, String encoding) throws Exception
filename
- encoding
-
Exception
void close() throws IOException
close
in interface AQDataWriter
close
in interface Closeable
IOException
|
OpenAPI 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |