public interface AQHtmlWriter extends AQDataWriter
Example:
var d = aqua.data.newDataSet( [ 'column1','column2','column3' ] ); d.addRowWithValues("a","b","<html>"); 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');
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this writer and releases any system resources associated with it.
|
void |
saveToFile(java.lang.String filename)
Save the generated HTML to a file using UTF-8 encoding.
|
void |
saveToFile(java.lang.String filename,
java.lang.String encoding)
Save the generated HTML to a file using the specified encoding.
|
void |
setCellStyle(java.lang.String style)
Sets the style of subsequent table cells (<TD> elements).
|
void |
setEmbeddedStyleSheet(java.lang.String styleSheet)
Sets embedded style sheet.
|
void |
setRowStyle(java.lang.String style)
Sets the style of subsequent table rows (<TR> elements).
|
void |
setTableStyle(java.lang.String style)
Sets the style of subsequent <TABLE> element.
|
void |
setTitle(java.lang.String title)
Sets document <TITLE> tag.
|
java.lang.String |
toHtml()
Returns generated HTML.
|
void |
writeLink(java.lang.String text,
java.lang.String url)
Writes a hyperlink (<A HREF> element).
|
void |
writeText(java.lang.String text)
Writes arbitrary text.
|
setColumnStructure, write, write, write, write, writeColumnNames
void setTitle(java.lang.String title)
title
- Document title.void setEmbeddedStyleSheet(java.lang.String styleSheet)
styleSheet
- the style sheetvoid setTableStyle(java.lang.String style)
style
- the stylevoid setRowStyle(java.lang.String style)
style
- the stylevoid setCellStyle(java.lang.String style)
style
- the stylevoid writeText(java.lang.String text) throws java.lang.Exception
AQDataWriter.write(Object)
method.text
- Text to be written.java.lang.Exception
- On errorvoid writeLink(java.lang.String text, java.lang.String url) throws java.lang.Exception
text
- User-visible text.url
- Link URL.java.lang.Exception
- On errorjava.lang.String toHtml()
void saveToFile(java.lang.String filename) throws java.lang.Exception
filename
- the filenamejava.lang.Exception
- On errorvoid saveToFile(java.lang.String filename, java.lang.String encoding) throws java.lang.Exception
filename
- the filenameencoding
- the encodingjava.lang.Exception
- On errorvoid close() throws java.io.IOException
close
in interface AQDataWriter
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
java.io.IOException
- On error
Copyright © 2019 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.