public class HTMLWorker extends Object implements SimpleXMLDocHandler, DocListener
| Modifier and Type | Field and Description |
|---|---|
protected DocListener |
document |
protected ArrayList |
objectList |
static HashMap |
tagsSupported |
static String |
tagsSupportedString |
| Constructor and Description |
|---|
HTMLWorker(DocListener document)
Creates a new instance of HTMLWorker
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Element element) |
void |
clearTextWrap() |
void |
close() |
void |
endDocument() |
void |
endElement(String tag) |
HashMap |
getInterfaceProps() |
StyleSheet |
getStyleSheet() |
boolean |
newPage() |
void |
open() |
void |
parse(Reader reader) |
static ArrayList |
parseToList(Reader reader,
StyleSheet style) |
static ArrayList |
parseToList(Reader reader,
StyleSheet style,
HashMap interfaceProps) |
void |
resetFooter() |
void |
resetHeader() |
void |
resetPageCount() |
void |
setFooter(HeaderFooter footer) |
void |
setHeader(HeaderFooter header) |
void |
setInterfaceProps(HashMap interfaceProps) |
boolean |
setMarginMirroring(boolean marginMirroring) |
boolean |
setMarginMirroringTopBottom(boolean marginMirroring) |
boolean |
setMargins(float marginLeft,
float marginRight,
float marginTop,
float marginBottom) |
void |
setPageCount(int pageN) |
boolean |
setPageSize(Rectangle pageSize) |
void |
setStyleSheet(StyleSheet style) |
void |
startDocument() |
void |
startElement(String tag,
HashMap h) |
void |
text(String str) |
protected ArrayList objectList
protected DocListener document
public static final String tagsSupportedString
public static final HashMap tagsSupported
public HTMLWorker(DocListener document)
document - A class that implements DocListenerpublic void setStyleSheet(StyleSheet style)
public StyleSheet getStyleSheet()
public void setInterfaceProps(HashMap interfaceProps)
public HashMap getInterfaceProps()
public void parse(Reader reader) throws IOException
IOExceptionpublic static ArrayList parseToList(Reader reader, StyleSheet style) throws IOException
IOExceptionpublic static ArrayList parseToList(Reader reader, StyleSheet style, HashMap interfaceProps) throws IOException
IOExceptionpublic void endDocument()
endDocument in interface SimpleXMLDocHandlerpublic void startDocument()
startDocument in interface SimpleXMLDocHandlerpublic void startElement(String tag, HashMap h)
startElement in interface SimpleXMLDocHandlerpublic void endElement(String tag)
endElement in interface SimpleXMLDocHandlerpublic void text(String str)
text in interface SimpleXMLDocHandlerpublic boolean add(Element element) throws DocumentException
add in interface ElementListenerDocumentExceptionpublic void clearTextWrap()
throws DocumentException
DocumentExceptionpublic void close()
close in interface DocListenerpublic boolean newPage()
newPage in interface DocListenerpublic void open()
open in interface DocListenerpublic void resetFooter()
resetFooter in interface DocListenerpublic void resetHeader()
resetHeader in interface DocListenerpublic void resetPageCount()
resetPageCount in interface DocListenerpublic void setFooter(HeaderFooter footer)
setFooter in interface DocListenerpublic void setHeader(HeaderFooter header)
setHeader in interface DocListenerpublic boolean setMarginMirroring(boolean marginMirroring)
setMarginMirroring in interface DocListenerpublic boolean setMarginMirroringTopBottom(boolean marginMirroring)
setMarginMirroringTopBottom in interface DocListenerDocListener.setMarginMirroring(boolean)public boolean setMargins(float marginLeft,
float marginRight,
float marginTop,
float marginBottom)
setMargins in interface DocListenerpublic void setPageCount(int pageN)
setPageCount in interface DocListenerpublic boolean setPageSize(Rectangle pageSize)
setPageSize in interface DocListenerCopyright © 2017. All rights reserved.