Class DocBookCreator
java.lang.Object
com.nomagic.magicreport.format.html.AbstractDocumentCreator
com.nomagic.magicreport.format.html.DocBookCreator
- All Implemented Interfaces:
IHTMLHandler,IDocumentCreator
The class use for create DocBook content.
- Since:
- Jan 30, 2013
- Version:
- 1.0 Jan 30, 2013
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] data) Receive notification of character data inside a tag.voidcomment(char[] data) Receive notification of comment data.voidConvert the HTML content from reader into DocBook document.voidReceive notification of end document.voidReceive notification of the end of a tag.voidputAttributeToStack(AttributeSet attributes) put start tag attributes in to htmlTagStack.voidsetDocumentPage(com.nomagic.magicreport.DocumentPage page) set document page property.voidsetPaperHeight(float height) set height of paper.voidsetPaperWidth(float width) set width of paper.voidsetProperties(Properties properties) Set properties.voidstartTag(HTML.Tag tag, AttributeSet attributes) Receive notification of the start of a tag.Methods inherited from class com.nomagic.magicreport.format.html.AbstractDocumentCreator
createImageTool, getFormatter, getStyleByCSSParser, getStyledDocument, setFormatter, setStyledDocument
-
Constructor Details
-
DocBookCreator
public DocBookCreator()
-
-
Method Details
-
convert
Convert the HTML content from reader into DocBook document.- Specified by:
convertin interfaceIDocumentCreator- Parameters:
reader- the reader containing HTML source.writer- the writer containing DocBook document.- Throws:
IOException- If any IO errors occur.- See Also:
-
setPaperWidth
public void setPaperWidth(float width) Description copied from interface:IDocumentCreatorset width of paper.- Specified by:
setPaperWidthin interfaceIDocumentCreator- Parameters:
width- paper width.
-
setPaperHeight
public void setPaperHeight(float height) Description copied from interface:IDocumentCreatorset height of paper.- Specified by:
setPaperHeightin interfaceIDocumentCreator- Parameters:
height- paper width.
-
setProperties
Description copied from interface:IDocumentCreatorSet properties.- Specified by:
setPropertiesin interfaceIDocumentCreator- Parameters:
properties- properties
-
comment
public void comment(char[] data) Description copied from interface:IHTMLHandlerReceive notification of comment data.- Specified by:
commentin interfaceIHTMLHandler- Parameters:
data- An array holding the characters in the document.
-
startTag
Description copied from interface:IHTMLHandlerReceive notification of the start of a tag.- Specified by:
startTagin interfaceIHTMLHandler- Parameters:
tag- HTML Tag.attributes- The attributes attached to the tag. If there are no attributes, it shall be an empty Attributes object.
-
endTag
Description copied from interface:IHTMLHandlerReceive notification of the end of a tag.- Specified by:
endTagin interfaceIHTMLHandler- Parameters:
tag- HTML Tag.
-
characters
public void characters(char[] data) Description copied from interface:IHTMLHandlerReceive notification of character data inside a tag.- Specified by:
charactersin interfaceIHTMLHandler- Parameters:
data- The characters.
-
endDocument
public void endDocument()Description copied from interface:IHTMLHandlerReceive notification of end document.- Specified by:
endDocumentin interfaceIHTMLHandler
-
putAttributeToStack
put start tag attributes in to htmlTagStack.- Parameters:
attributes- set of attribute
-
setDocumentPage
public void setDocumentPage(com.nomagic.magicreport.DocumentPage page) Description copied from interface:IDocumentCreatorset document page property.- Specified by:
setDocumentPagein interfaceIDocumentCreator- Parameters:
page- page property.
-