|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--ru.novosoft.dc.rtf.dom.RTFDocument
The root class of the RTF DOM. It consists of the document properties and an array of sections.
| Constructor Summary | |
RTFDocument(SectionContext context)
Create a new document with an empty first section. |
|
| Method Summary | |
DocumentContext |
context()
Return the document context. |
org.w3c.dom.Document |
DOM(org.w3c.dom.DOMImplementation handler,
boolean usedFontsOnly)
Compose a W3C DOM representation of the RTF DOM and return it. |
void |
expansionRequired()
Set request for expanding character contexts while optimization. |
ColorTable |
getColorTable()
Return the color table or null. |
CustomInformation |
getCustomInfo()
Return the custom document information or null. |
FontTable |
getFontTable()
Return the font table or null. |
DocumentInformation |
getInfo()
Return the document information or null. |
StyleSheet |
getStyleSheet()
Return the style sheet table or null. |
void |
mergeRequired()
Set request for merge of near inline strings with the same context while optimization. |
RTFSection |
newSection(SectionContext context)
Create a new section in the document content and return it. |
void |
optimize(boolean needMerge,
boolean needExpand,
int shapeMask)
Optimization of the RTF Document. |
void |
removeSection(int index)
Remove a section at the specified position in the range [0..sectionCount()-1]. |
RTFSection |
section()
Return the last section of the document. |
RTFSection |
section(int index)
Return a section of the specified index in the range [0..sectionCount()-1]. |
int |
sectionCount()
Return the current number of sections. |
void |
setColorTable(ColorTable value)
Set a color table. |
void |
setCustomInfo(CustomInformation value)
Set a custom document information object. |
void |
setFontTable(FontTable value)
Set a font table. |
void |
setInfo(DocumentInformation value)
Set a document information object. |
void |
setStyleSheet(StyleSheet value)
Set a style sheet table. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public RTFDocument(SectionContext context)
| Method Detail |
public final DocumentContext context()
public final RTFSection newSection(SectionContext context)
public final int sectionCount()
public final RTFSection section()
public final RTFSection section(int index)
public final void removeSection(int index)
public final void setFontTable(FontTable value)
public final FontTable getFontTable()
public final void setColorTable(ColorTable value)
public final ColorTable getColorTable()
public final void setStyleSheet(StyleSheet value)
public final StyleSheet getStyleSheet()
public final void setInfo(DocumentInformation value)
public final DocumentInformation getInfo()
public final void setCustomInfo(CustomInformation value)
public final CustomInformation getCustomInfo()
public org.w3c.dom.Document DOM(org.w3c.dom.DOMImplementation handler,
boolean usedFontsOnly)
handler - a DOM implementation constructing documentsusedFontsOnly - if true, only used fonts are exported to the DOMpublic final void mergeRequired()
public final void expansionRequired()
public void optimize(boolean needMerge,
boolean needExpand,
int shapeMask)
needMerge - if true, the merging optimization is applied if it was not
applied before (to merge inlines once more, call the
mergeRequired() method before the optimization)needExpand - if true, the expanding optimization is applied if it
was not applied before (to expand character contexts once more,
call the expansionRequired() method before the optimization)shapeMask - a mask of character shape flags to be removed in all
character contexts. For example,
CharacterShape.M_BOLD|CharacterShape.M_ITALIC
removes BOLD and ITALIC shapes in all character contexts.
See CharacterShape class.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||