org.sakaiproject.tool.assessment.pdf.itext
Class HTMLWorker

java.lang.Object
  extended by org.sakaiproject.tool.assessment.pdf.itext.HTMLWorker
All Implemented Interfaces:
com.lowagie.text.DocListener, com.lowagie.text.ElementListener, com.lowagie.text.xml.simpleparser.SimpleXMLDocHandler, EventListener
Direct Known Subclasses:
HTMLWorker

public class HTMLWorker
extends Object
implements com.lowagie.text.xml.simpleparser.SimpleXMLDocHandler, com.lowagie.text.DocListener


Field Summary
protected  com.lowagie.text.DocListener document
           
protected  ArrayList objectList
           
static HashMap tagsSupported
           
static String tagsSupportedString
           
 
Constructor Summary
HTMLWorker(com.lowagie.text.DocListener document)
          Creates a new instance of HTMLWorker
 
Method Summary
 boolean add(com.lowagie.text.Element element)
           
 void clearTextWrap()
           
 void close()
           
 void endDocument()
           
 void endElement(String tag)
           
 HashMap getInterfaceProps()
           
 com.lowagie.text.html.simpleparser.StyleSheet getStyleSheet()
           
 boolean newPage()
           
 void open()
           
 void parse(Reader reader)
           
static ArrayList parseToList(Reader reader, com.lowagie.text.html.simpleparser.StyleSheet style)
           
static ArrayList parseToList(Reader reader, com.lowagie.text.html.simpleparser.StyleSheet style, HashMap interfaceProps)
           
 void resetFooter()
           
 void resetHeader()
           
 void resetPageCount()
           
 void setFooter(com.lowagie.text.HeaderFooter footer)
           
 void setHeader(com.lowagie.text.HeaderFooter header)
           
 void setInterfaceProps(HashMap interfaceProps)
           
 boolean setMarginMirroring(boolean marginMirroring)
           
 boolean setMargins(float marginLeft, float marginRight, float marginTop, float marginBottom)
           
 void setMaxWidth(int width)
           
 void setPageCount(int pageN)
           
 boolean setPageSize(com.lowagie.text.Rectangle pageSize)
           
 void setStyleSheet(com.lowagie.text.html.simpleparser.StyleSheet style)
           
 void startDocument()
           
 void startElement(String tag, HashMap h)
           
 void text(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objectList

protected ArrayList objectList

document

protected com.lowagie.text.DocListener document

tagsSupportedString

public static final String tagsSupportedString
See Also:
Constant Field Values

tagsSupported

public static final HashMap tagsSupported
Constructor Detail

HTMLWorker

public HTMLWorker(com.lowagie.text.DocListener document)
Creates a new instance of HTMLWorker

Method Detail

setStyleSheet

public void setStyleSheet(com.lowagie.text.html.simpleparser.StyleSheet style)

getStyleSheet

public com.lowagie.text.html.simpleparser.StyleSheet getStyleSheet()

setInterfaceProps

public void setInterfaceProps(HashMap interfaceProps)

getInterfaceProps

public HashMap getInterfaceProps()

parse

public void parse(Reader reader)
           throws IOException
Throws:
IOException

parseToList

public static ArrayList parseToList(Reader reader,
                                    com.lowagie.text.html.simpleparser.StyleSheet style)
                             throws IOException
Throws:
IOException

parseToList

public static ArrayList parseToList(Reader reader,
                                    com.lowagie.text.html.simpleparser.StyleSheet style,
                                    HashMap interfaceProps)
                             throws IOException
Throws:
IOException

endDocument

public void endDocument()
Specified by:
endDocument in interface com.lowagie.text.xml.simpleparser.SimpleXMLDocHandler

startDocument

public void startDocument()
Specified by:
startDocument in interface com.lowagie.text.xml.simpleparser.SimpleXMLDocHandler

startElement

public void startElement(String tag,
                         HashMap h)
Specified by:
startElement in interface com.lowagie.text.xml.simpleparser.SimpleXMLDocHandler

endElement

public void endElement(String tag)
Specified by:
endElement in interface com.lowagie.text.xml.simpleparser.SimpleXMLDocHandler

text

public void text(String str)
Specified by:
text in interface com.lowagie.text.xml.simpleparser.SimpleXMLDocHandler

add

public boolean add(com.lowagie.text.Element element)
            throws com.lowagie.text.DocumentException
Specified by:
add in interface com.lowagie.text.ElementListener
Throws:
com.lowagie.text.DocumentException

clearTextWrap

public void clearTextWrap()
                   throws com.lowagie.text.DocumentException
Throws:
com.lowagie.text.DocumentException

close

public void close()
Specified by:
close in interface com.lowagie.text.DocListener

newPage

public boolean newPage()
Specified by:
newPage in interface com.lowagie.text.DocListener

open

public void open()
Specified by:
open in interface com.lowagie.text.DocListener

resetFooter

public void resetFooter()
Specified by:
resetFooter in interface com.lowagie.text.DocListener

resetHeader

public void resetHeader()
Specified by:
resetHeader in interface com.lowagie.text.DocListener

resetPageCount

public void resetPageCount()
Specified by:
resetPageCount in interface com.lowagie.text.DocListener

setFooter

public void setFooter(com.lowagie.text.HeaderFooter footer)
Specified by:
setFooter in interface com.lowagie.text.DocListener

setHeader

public void setHeader(com.lowagie.text.HeaderFooter header)
Specified by:
setHeader in interface com.lowagie.text.DocListener

setMarginMirroring

public boolean setMarginMirroring(boolean marginMirroring)
Specified by:
setMarginMirroring in interface com.lowagie.text.DocListener

setMargins

public boolean setMargins(float marginLeft,
                          float marginRight,
                          float marginTop,
                          float marginBottom)
Specified by:
setMargins in interface com.lowagie.text.DocListener

setPageCount

public void setPageCount(int pageN)
Specified by:
setPageCount in interface com.lowagie.text.DocListener

setPageSize

public boolean setPageSize(com.lowagie.text.Rectangle pageSize)
Specified by:
setPageSize in interface com.lowagie.text.DocListener

setMaxWidth

public void setMaxWidth(int width)


Copyright © 2005-2012 Sakai Project. All Rights Reserved.