com.ontimize.util.rtf
Class RTFGenerator
java.lang.Object
com.ontimize.util.rtf.RTFGenerator
- public class RTFGenerator
- extends java.lang.Object
|
Field Summary |
protected java.util.Vector |
colorList
|
protected javax.swing.text.Document |
document
|
protected java.util.Vector |
fontList
|
|
Constructor Summary |
RTFGenerator(javax.swing.text.Document doc)
|
|
Method Summary |
protected java.lang.Double |
convertPixelsToTwips(java.lang.Double value)
|
protected java.lang.String |
convertString(java.lang.String source)
|
protected java.lang.String |
createColorTable(java.util.Vector colorList)
|
protected java.lang.String |
createFontTable(java.util.Vector fontList)
|
protected java.lang.String |
getAfterFontDescription(javax.swing.text.AttributeSet attr)
|
protected java.lang.String |
getBeforeFontDescription(javax.swing.text.AttributeSet attr,
boolean isStyle)
|
protected java.util.Vector |
getColorList(javax.swing.text.Element root,
java.util.Vector list)
|
protected java.util.Vector |
getDefaultColorList()
|
protected javax.swing.text.Element |
getDocumentTree()
|
protected java.util.Vector |
getFontList(javax.swing.text.Element root,
java.util.Vector list)
|
protected java.lang.String |
getParagraphDescription(javax.swing.text.AttributeSet attr)
|
protected boolean |
isInList(java.util.Vector list,
java.lang.Object fontName)
|
void |
write(java.lang.String fileName)
|
void |
write(java.io.Writer out,
int pos,
int len)
|
protected void |
writeCell(javax.swing.text.Element cell,
java.io.Writer out,
int x,
int level)
|
protected void |
writeCellContent(javax.swing.text.Element cell,
java.io.Writer out,
int level)
|
protected void |
writeContent(javax.swing.text.Element root,
java.io.Writer out,
int level,
int pos,
int len)
|
protected void |
writeIcon(javax.swing.text.Element leaf,
java.io.Writer out)
|
protected void |
writeLeaf(javax.swing.text.Element leaf,
java.io.Writer out,
int pos,
int len)
|
protected void |
writeParagraph(javax.swing.text.Element paragraph,
java.io.Writer out,
int level,
boolean lastInTable,
int pos,
int len)
|
protected void |
writeRow(javax.swing.text.Element row,
java.io.Writer out,
int level)
|
protected void |
writeTable(javax.swing.text.Element table,
java.io.Writer out,
int level)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
document
protected javax.swing.text.Document document
fontList
protected java.util.Vector fontList
colorList
protected java.util.Vector colorList
RTFGenerator
public RTFGenerator(javax.swing.text.Document doc)
write
public void write(java.lang.String fileName)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(java.io.Writer out,
int pos,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
writeContent
protected void writeContent(javax.swing.text.Element root,
java.io.Writer out,
int level,
int pos,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
writeParagraph
protected void writeParagraph(javax.swing.text.Element paragraph,
java.io.Writer out,
int level,
boolean lastInTable,
int pos,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
writeLeaf
protected void writeLeaf(javax.swing.text.Element leaf,
java.io.Writer out,
int pos,
int len)
throws java.io.IOException
- Throws:
java.io.IOException
writeIcon
protected void writeIcon(javax.swing.text.Element leaf,
java.io.Writer out)
throws java.io.IOException
- Throws:
java.io.IOException
writeTable
protected void writeTable(javax.swing.text.Element table,
java.io.Writer out,
int level)
throws java.io.IOException
- Throws:
java.io.IOException
writeRow
protected void writeRow(javax.swing.text.Element row,
java.io.Writer out,
int level)
throws java.io.IOException
- Throws:
java.io.IOException
writeCellContent
protected void writeCellContent(javax.swing.text.Element cell,
java.io.Writer out,
int level)
throws java.io.IOException
- Throws:
java.io.IOException
writeCell
protected void writeCell(javax.swing.text.Element cell,
java.io.Writer out,
int x,
int level)
throws java.io.IOException
- Throws:
java.io.IOException
getDocumentTree
protected javax.swing.text.Element getDocumentTree()
getFontList
protected java.util.Vector getFontList(javax.swing.text.Element root,
java.util.Vector list)
isInList
protected boolean isInList(java.util.Vector list,
java.lang.Object fontName)
createFontTable
protected java.lang.String createFontTable(java.util.Vector fontList)
getDefaultColorList
protected java.util.Vector getDefaultColorList()
getColorList
protected java.util.Vector getColorList(javax.swing.text.Element root,
java.util.Vector list)
createColorTable
protected java.lang.String createColorTable(java.util.Vector colorList)
getBeforeFontDescription
protected java.lang.String getBeforeFontDescription(javax.swing.text.AttributeSet attr,
boolean isStyle)
getAfterFontDescription
protected java.lang.String getAfterFontDescription(javax.swing.text.AttributeSet attr)
getParagraphDescription
protected java.lang.String getParagraphDescription(javax.swing.text.AttributeSet attr)
convertPixelsToTwips
protected java.lang.Double convertPixelsToTwips(java.lang.Double value)
convertString
protected java.lang.String convertString(java.lang.String source)