|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.Chunk
com.lowagie.text.rtf.field.RtfField
public abstract class RtfField
The RtfField class is an abstract base class for all rtf field functionality. Subclasses only need to implement the two abstract methods writeFieldInstContent and writeFieldResultContent. All other field functionality is handled by the RtfField class.
Field Summary | |
---|---|
protected RtfDocument |
document
The RtfDocument this RtfField belongs to |
Fields inherited from class com.lowagie.text.Chunk |
---|
ACTION, attributes, BACKGROUND, COLOR, content, ENCODING, GENERICTAG, HSCALE, HYPHENATION, IMAGE, LOCALDESTINATION, LOCALGOTO, markupAttributes, NEWLINE, NEWPAGE, NEXTPAGE, OBJECT_REPLACEMENT_CHARACTER, PDFANNOTATION, REMOTEGOTO, SKEW, SPLITCHARACTER, SUBSUPSCRIPT, TEXTRENDERMODE, UNDERLINE |
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement |
---|
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR |
Constructor Summary | |
---|---|
protected |
RtfField(RtfDocument doc)
Constructs a RtfField for a RtfDocument. |
protected |
RtfField(RtfDocument doc,
Font font)
Constructs a RtfField for a RtfDocument. |
Method Summary | |
---|---|
boolean |
isEmpty()
An RtfField is never empty. |
boolean |
isFieldAlt()
Get whether this field is an alt field |
boolean |
isFieldDirty()
Get whether this field is dirty |
boolean |
isFieldEdit()
Get whether this field is edited |
boolean |
isFieldLocked()
Get whether this field is locked |
boolean |
isFieldPrivate()
Get whether this field is private |
void |
setFieldAlt(boolean fieldAlt)
Set whether this field is an alt field |
void |
setFieldDirty(boolean fieldDirty)
Set whether this field is dirty |
void |
setFieldEdit(boolean fieldEdit)
Set whether this field is edited. |
void |
setFieldLocked(boolean fieldLocked)
Set whether this field is locked |
void |
setFieldPrivate(boolean fieldPrivate)
Set whether this field is private |
void |
setInHeader(boolean inHeader)
Sets whether this RtfField is in a header |
void |
setInTable(boolean inTable)
Sets whether this RtfField is in a table |
void |
setRtfDocument(RtfDocument doc)
Sets the RtfDocument this RtfElement belongs to |
byte[] |
write()
Write the content of this RtfField. |
protected abstract byte[] |
writeFieldInstContent()
Writes the content of the field instruction area. |
protected abstract byte[] |
writeFieldResultContent()
Writes the content of the pre-calculated field result. |
Methods inherited from class com.lowagie.text.Chunk |
---|
addToArray, append, content, font, getAttributes, getChunks, getHorizontalScaling, getImage, getKeySet, getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, getTextRise, getWidthPoint, hasAttributes, isTag, process, setAction, setAnchor, setAnchor, setAnnotation, setBackground, setBackground, setFont, setGenericTag, setHorizontalScaling, setHyphenation, setLocalDestination, setLocalGoto, setMarkupAttribute, setMarkupAttributes, setNewPage, setRemoteGoto, setRemoteGoto, setSkew, setSplitCharacter, setTextRenderMode, setTextRise, setUnderline, setUnderline, toString, type |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected RtfDocument document
Constructor Detail |
---|
protected RtfField(RtfDocument doc)
doc
- The RtfDocument this RtfField belongs to.protected RtfField(RtfDocument doc, Font font)
doc
- The RtfDocument this RtfField belongs to.font
- The Font this RtfField should useMethod Detail |
---|
public void setRtfDocument(RtfDocument doc)
setRtfDocument
in interface RtfBasicElement
doc
- The RtfDocument to useprotected abstract byte[] writeFieldInstContent() throws IOException
IOException
- If an error occurs.protected abstract byte[] writeFieldResultContent() throws IOException
IOException
- If an error occurspublic byte[] write()
write
in interface RtfBasicElement
public boolean isFieldAlt()
public void setFieldAlt(boolean fieldAlt)
fieldAlt
- The value to usepublic boolean isFieldDirty()
public void setFieldDirty(boolean fieldDirty)
fieldDirty
- The value to usepublic boolean isFieldEdit()
public void setFieldEdit(boolean fieldEdit)
fieldEdit
- The value to usepublic boolean isFieldLocked()
public void setFieldLocked(boolean fieldLocked)
fieldLocked
- The value to usepublic boolean isFieldPrivate()
public void setFieldPrivate(boolean fieldPrivate)
fieldPrivate
- The value to usepublic void setInTable(boolean inTable)
setInTable
in interface RtfBasicElement
inTable
- True
if this RtfField is in a table, false
otherwisepublic void setInHeader(boolean inHeader)
setInHeader
in interface RtfBasicElement
inHeader
- True
if this RtfField is in a header, false
otherwisepublic boolean isEmpty()
isEmpty
in class Chunk
false
if the Chunk contains other characters than
space.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |