|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfor.jfor.rtflib.rtfdoc.RtfElement
Base class for all elements of an RTF file.
Field Summary | |
protected RtfAttributes |
m_attrib
|
protected RtfContainer |
m_parent
|
protected java.io.Writer |
m_writer
|
Constructor Summary | |
(package private) |
RtfElement(RtfContainer parent,
java.io.Writer w)
Create an RTF element as a child of given container |
(package private) |
RtfElement(RtfContainer parent,
java.io.Writer w,
RtfAttributes attr)
Create an RTF element as a child of given container with given attributes |
Method Summary | |
void |
close()
Does nothing, meant to allow elements to write themselves without waiting for write(), but not implemented yet |
(package private) void |
dump(java.io.Writer w,
int indent)
debugging to given PrintWriter |
(package private) RtfElement |
getParentOfClass(java.lang.Class c)
find the first parent where c.isAssignableFrom(parent.getClass()) is true |
RtfAttributes |
getRtfAttributes()
|
(package private) RtfFile |
getRtfFile()
access our RtfFile, which is always the topmost parent |
(package private) boolean |
isClosed()
true if close() has been called |
abstract boolean |
isEmpty()
true if this element would generate no "useful" RTF content |
protected boolean |
okToWriteRtf()
can be overridden to suppress all RTF output |
java.lang.String |
toString()
minimal debugging display |
protected void |
writeAttributes(RtfAttributes attr,
java.lang.String[] nameList)
write given attribute values to our Writer |
protected void |
writeControlWord(java.lang.String word)
write an RTF control word to our Writer |
protected void |
writeControlWordNS(java.lang.String word)
write rtf control word without the space behind it |
protected void |
writeExceptionInRtf(java.lang.Exception ie)
|
protected void |
writeGroupMark(boolean isStart)
Write a start or end group mark |
protected void |
writeOneAttribute(java.lang.String name,
java.lang.Object value)
write one attribute to our Writer |
protected void |
writeOneAttributeNS(java.lang.String name,
java.lang.Object value)
write one attribute to our Writer without a space |
void |
writeRtf()
write the RTF code of this element to our Writer |
protected abstract void |
writeRtfContent()
must be implemented to write RTF content to m_writer |
protected void |
writeRtfPrefix()
called before writeRtfContent() |
protected void |
writeRtfSuffix()
called after writeRtfContent() |
protected void |
writeStarControlWord(java.lang.String word)
write an RTF control word to our Writer, preceeded by a star '*' meaning "ignore this if you don't know what it means" |
protected void |
writeStarControlWordNS(java.lang.String word)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected final java.io.Writer m_writer
protected final RtfContainer m_parent
protected final RtfAttributes m_attrib
Constructor Detail |
RtfElement(RtfContainer parent, java.io.Writer w) throws java.io.IOException
RtfElement(RtfContainer parent, java.io.Writer w, RtfAttributes attr) throws java.io.IOException
Method Detail |
public final void close() throws java.io.IOException
java.io.IOException
public final void writeRtf() throws java.io.IOException
java.io.IOException
protected final void writeControlWord(java.lang.String word) throws java.io.IOException
java.io.IOException
protected final void writeStarControlWord(java.lang.String word) throws java.io.IOException
java.io.IOException
protected final void writeStarControlWordNS(java.lang.String word) throws java.io.IOException
java.io.IOException
protected final void writeControlWordNS(java.lang.String word) throws java.io.IOException
java.io.IOException
protected void writeRtfPrefix() throws java.io.IOException
java.io.IOException
protected abstract void writeRtfContent() throws java.io.IOException
java.io.IOException
protected void writeRtfSuffix() throws java.io.IOException
java.io.IOException
protected final void writeGroupMark(boolean isStart) throws java.io.IOException
java.io.IOException
protected void writeAttributes(RtfAttributes attr, java.lang.String[] nameList) throws java.io.IOException
nameList
- if given, only attribute names from this list are considered
java.io.IOException
protected void writeOneAttribute(java.lang.String name, java.lang.Object value) throws java.io.IOException
java.io.IOException
protected void writeOneAttributeNS(java.lang.String name, java.lang.Object value) throws java.io.IOException
java.io.IOException
protected boolean okToWriteRtf()
void dump(java.io.Writer w, int indent) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
boolean isClosed()
RtfFile getRtfFile()
RtfElement getParentOfClass(java.lang.Class c)
public abstract boolean isEmpty()
protected void writeExceptionInRtf(java.lang.Exception ie) throws java.io.IOException
java.io.IOException
public RtfAttributes getRtfAttributes()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |