@OpenApiAll public class DocBookCreator extends AbstractDocumentCreator implements IHTMLHandler
Constructor and Description |
---|
DocBookCreator() |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] data)
Receive notification of character data inside a tag.
|
void |
comment(char[] data)
Receive notification of comment data.
|
void |
convert(java.io.Reader reader,
java.io.Writer writer)
Convert the HTML content from reader into DocBook document.
|
void |
endDocument()
Receive notification of end document.
|
void |
endTag(javax.swing.text.html.HTML.Tag tag)
Receive notification of the end of a tag.
|
void |
putAttributeToStack(javax.swing.text.AttributeSet attributes)
put start tag attributes in to htmlTagStack.
|
void |
setDocumentPage(DocumentPage page)
set document page property.
|
void |
setPaperHeight(float height)
set height of paper.
|
void |
setPaperWidth(float width)
set width of paper.
|
void |
setProperties(java.util.Properties properties)
Set properties.
|
void |
startTag(javax.swing.text.html.HTML.Tag tag,
javax.swing.text.AttributeSet attributes)
Receive notification of the start of a tag.
|
createImageTool, getFormatter, getStyleByCSSParser, getStyledDocument, setFormatter, setStyledDocument
public void convert(java.io.Reader reader, java.io.Writer writer) throws java.io.IOException
convert
in interface IDocumentCreator
reader
- the reader containing HTML source.writer
- the writer containing DocBook document.java.io.IOException
- If any IO errors occur.IDocumentCreator.convert(java.io.Reader, java.io.Writer)
public void setPaperWidth(float width)
IDocumentCreator
setPaperWidth
in interface IDocumentCreator
width
- paper width.public void setPaperHeight(float height)
IDocumentCreator
setPaperHeight
in interface IDocumentCreator
height
- paper width.public void setProperties(java.util.Properties properties)
IDocumentCreator
setProperties
in interface IDocumentCreator
properties
- propertiespublic void comment(char[] data)
IHTMLHandler
comment
in interface IHTMLHandler
data
- An array holding the characters in the document.public void startTag(javax.swing.text.html.HTML.Tag tag, javax.swing.text.AttributeSet attributes)
IHTMLHandler
startTag
in interface IHTMLHandler
tag
- HTML Tag.attributes
- The attributes attached to the tag. If there are no attributes, it shall be an empty
Attributes object.public void endTag(javax.swing.text.html.HTML.Tag tag)
IHTMLHandler
endTag
in interface IHTMLHandler
tag
- HTML Tag.public void characters(char[] data)
IHTMLHandler
characters
in interface IHTMLHandler
data
- The characters.public void endDocument()
IHTMLHandler
endDocument
in interface IHTMLHandler
public void putAttributeToStack(javax.swing.text.AttributeSet attributes)
attributes
- set of attributepublic void setDocumentPage(DocumentPage page)
IDocumentCreator
setDocumentPage
in interface IDocumentCreator
page
- page property.Copyright © 2010 - No Magic Asia