|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.betabeans.scroogexhtml.converter.DOMWriter
public final class DOMWriter
The converter uses the ScroogeXHTMLWriter to store the current RTF state,
character properties and paragraph properties, and to build the
Document.
If a paragraph property changes, the writer appends a new
Paragraphobject at the logical
end of the Document object.
If a character property changes, the writer appends a new
FormattedTextobject at the
logical end of the current Paragraph object.
Document
,
Paragraph
,
FormattedText
,
Document
Constructor Summary | |
---|---|
DOMWriter(ScroogeXHTMLBase aconverter)
Constructor for the ScroogeXHTMLWriter object. |
Method Summary | |
---|---|
protected void |
applyParagraphProperties()
Apply the current paragraph properties to the current paragraph object. |
void |
applyTextProperties()
Apply the current text properties to the current text object. |
CharacterProperties |
getCharacterProperties()
|
java.lang.String |
getDefaultFontName()
Gets the defaultFontName. |
Document |
getDocument()
Gets the document. |
java.lang.StringBuffer |
getHtml()
Convert the Document to (X)HTML. |
ParagraphProperties |
getParagraphProperties()
|
java.lang.StringBuffer |
getPlainText()
Convert the document to plain text. |
boolean |
isNumberingStyle()
Gets the writerNumbered attribute. |
void |
popCharacterProperties(CharacterProperties newCharProps)
|
void |
popParagraphProperties(ParagraphProperties newValue)
|
void |
resetCharacterAttributes()
Set all character attributes to the default values. |
void |
resetParagraphAttributes()
reset all paragraph attributes to the default values. |
void |
setAlignment(int newValue)
Set the "alignment" attribute of the current paragraph. |
void |
setBGColor(java.lang.String newValue)
Set the "bgcolor" attribute of the current text. |
void |
setBold(boolean newValue)
Set the "bold" attribute of the current text. |
void |
setDefaultFontName(java.lang.String newValue)
Sets the defaultFontName. |
void |
setFirstIndent(int newValue)
Set the "firstindent" attribute of the current paragraph. |
void |
setFontCharSet(int newValue)
Set the "characterset" attribute of the current text. |
void |
setFontColor(java.lang.String newValue)
Set the "fontcolor" attribute of the current text. |
void |
setFontName(java.lang.String newValue)
Set the "fontname" attribute of the current text. |
void |
setFontSize(int newValue)
Set the "fontsize" attribute of the current text. |
void |
setHLColor(java.lang.String newValue)
Set the "hlcolor" attribute of the current text. |
void |
setItalic(boolean newValue)
Set the "italic" attribute of the current text. |
void |
setLanguage(java.lang.String newValue)
Set the "language" attribute of the current text. |
void |
setLeftIndent(int newValue)
Set the "leftindent" attribute of the current paragraph. |
void |
setNumbered(boolean newValue)
Set the "bullet" attribute of the current paragraph. |
void |
setNumberingLevel(int newValue)
Set the "numberinglevel" attribute of the current paragraph. |
void |
setNumberingStyle(boolean n)
Sets the writerNumbered state. |
void |
setRightIndent(int newValue)
Set the "rightindent" attribute of the current paragraph. |
void |
setRightToLeftChar(boolean newValue)
Set the "rtl" attribute of the current text. |
void |
setRightToLeftPar(boolean newValue)
Set the "rtl" attribute of the current paragraph. |
void |
setStrike(boolean newValue)
Set the "strike" attribute of the current text. |
void |
setSubscript(boolean newValue)
Set the "subscript" attribute of the current text. |
void |
setSuperscript(boolean newValue)
Set the "superscript" attribute of the current text. |
void |
setUnderline(boolean newValue)
Set the "underline" attribute of the current text. |
void |
writeChar(char ch)
Append a character to the Document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DOMWriter(ScroogeXHTMLBase aconverter)
aconverter
- The converter (owner) of this writer.Method Detail |
---|
public CharacterProperties getCharacterProperties()
getCharacterProperties
in interface Writer
public ParagraphProperties getParagraphProperties()
getParagraphProperties
in interface Writer
public void setNumberingStyle(boolean n)
setNumberingStyle
in interface Writer
n
- The new writerNumbered valuepublic void applyTextProperties()
applyTextProperties
in interface Writer
protected void applyParagraphProperties()
public boolean isNumberingStyle()
isNumberingStyle
in interface Writer
public Document getDocument()
getDocument
in interface Writer
public void setDefaultFontName(java.lang.String newValue)
setDefaultFontName
in interface Writer
newValue
- The new defaultFontName valuepublic java.lang.String getDefaultFontName()
getDefaultFontName
in interface Writer
public java.lang.StringBuffer getHtml()
getHtml
in interface Writer
public java.lang.StringBuffer getPlainText()
getPlainText
in interface Writer
public void writeChar(char ch)
writeChar
in interface Writer
ch
- a characterpublic void resetParagraphAttributes()
resetParagraphAttributes
in interface Writer
public void resetCharacterAttributes()
resetCharacterAttributes
in interface Writer
public void setBold(boolean newValue)
setBold
in interface Writer
newValue
- The new bold valuepublic void setRightToLeftChar(boolean newValue)
setRightToLeftChar
in interface Writer
newValue
- booleanpublic void setLanguage(java.lang.String newValue)
setLanguage
in interface Writer
newValue
- The new language propertypublic void setItalic(boolean newValue)
setItalic
in interface Writer
newValue
- The new italic valuepublic void setStrike(boolean newValue)
setStrike
in interface Writer
newValue
- The new strike valuepublic void setUnderline(boolean newValue)
setUnderline
in interface Writer
newValue
- The new underline valuepublic void setFontName(java.lang.String newValue)
setFontName
in interface Writer
newValue
- The new fontName valuepublic void setFontCharSet(int newValue)
setFontCharSet
in interface Writer
newValue
- The new fontCharSet valuepublic void setFontColor(java.lang.String newValue)
setFontColor
in interface Writer
newValue
- The new fontColor valuepublic void setBGColor(java.lang.String newValue)
setBGColor
in interface Writer
newValue
- The new bGColor valuepublic void setHLColor(java.lang.String newValue)
setHLColor
in interface Writer
newValue
- The new hLColor valuepublic void setFontSize(int newValue)
setFontSize
in interface Writer
newValue
- The new fontSize valuepublic void setSubscript(boolean newValue)
setSubscript
in interface Writer
newValue
- The new subscript valuepublic void setSuperscript(boolean newValue)
setSuperscript
in interface Writer
newValue
- The new superscript valuepublic void setRightToLeftPar(boolean newValue)
setRightToLeftPar
in interface Writer
newValue
- booleanpublic void setNumberingLevel(int newValue)
setNumberingLevel
in interface Writer
newValue
- The new numberingLevel valuepublic void setAlignment(int newValue)
setAlignment
in interface Writer
newValue
- The new alignment valuepublic void setNumbered(boolean newValue)
setNumbered
in interface Writer
newValue
- The new bullet valuepublic void setLeftIndent(int newValue)
setLeftIndent
in interface Writer
newValue
- The new leftIndent valuepublic void setRightIndent(int newValue)
setRightIndent
in interface Writer
newValue
- The new rightIndent valuepublic void setFirstIndent(int newValue)
setFirstIndent
in interface Writer
newValue
- The new firstIndent valuepublic void popCharacterProperties(CharacterProperties newCharProps)
popCharacterProperties
in interface Writer
public void popParagraphProperties(ParagraphProperties newValue)
popParagraphProperties
in interface Writer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |