|
![]() |
||||||||
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 |
private static byte[] |
FIELD
Constant for a rtf field |
private static byte[] |
FIELD_ALT
Constant for an alt field |
private static byte[] |
FIELD_DIRTY
Constant for a dirty field |
private static byte[] |
FIELD_EDIT
Constant for a edited field |
private static byte[] |
FIELD_INSTRUCTIONS
Constant for the field instructions |
private static byte[] |
FIELD_LOCKED
Constant for a locked field |
private static byte[] |
FIELD_PRIVATE
Constant for a private field |
private static byte[] |
FIELD_RESULT
Constant for the field result |
private boolean |
fieldAlt
Is it an alt field |
private boolean |
fieldDirty
Is the field dirty |
private boolean |
fieldEdit
Is the field edited |
private boolean |
fieldLocked
Is the field locked |
private boolean |
fieldPrivate
Is the field private |
private RtfFont |
font
The RtfFont of this RtfField |
private boolean |
inHeader
Whether this RtfElement is in a header |
private boolean |
inTable
Whether this RtfField is in a table |
Fields inherited from class com.lowagie.text.Chunk |
---|
ACTION, attributes, BACKGROUND, CHAR_SPACING, COLOR, content, ENCODING, GENERICTAG, HSCALE, HYPHENATION, IMAGE, LOCALDESTINATION, LOCALGOTO, NEWLINE, NEWPAGE, NEXTPAGE, OBJECT_REPLACEMENT_CHARACTER, PDFANNOTATION, REMOTEGOTO, SEPARATOR, SKEW, SPLITCHARACTER, SUBSUPSCRIPT, TAB, TEXTRENDERMODE, UNDERLINE |
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement |
---|
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR |
Fields inherited from interface com.lowagie.text.Element |
---|
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK |
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 |
boolean |
isInHeader()
Gets whether this RtfField is in a header. |
boolean |
isInTable()
Gets whether this RtfField is in a table. |
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 |
setFont(Font font)
Override setFont to perform the correct font handling. |
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 |
void |
writeContent(OutputStream result)
Writes the field to the OutputStream . |
private void |
writeFieldBegin(OutputStream result)
Writes the field beginning. |
private void |
writeFieldEnd(OutputStream result)
Writes the end of the field |
private void |
writeFieldInstBegin(OutputStream result)
Writes the beginning of the field instruction area. |
protected abstract void |
writeFieldInstContent(OutputStream result)
Writes the content of the field instruction area. |
private void |
writeFieldInstEnd(OutputStream result)
Writes the end of the field instruction area. |
private void |
writeFieldResultBegin(OutputStream result)
Writes the beginning of the field result area |
protected abstract void |
writeFieldResultContent(OutputStream result)
Writes the content of the pre-calculated field result. |
private void |
writeFieldResultEnd(OutputStream result)
Writes the end of the field result area |
Methods inherited from class com.lowagie.text.Chunk |
---|
append, getAttributes, getCharacterSpacing, getChunks, getContent, getFont, getHorizontalScaling, getHyphenation, getImage, getTextRise, getWidthPoint, hasAttributes, isContent, isNestable, process, setAction, setAnchor, setAnchor, setAnnotation, setAttributes, setBackground, setBackground, setCharacterSpacing, setGenericTag, setHorizontalScaling, setHyphenation, setLocalDestination, setLocalGoto, 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 |
---|
private static final byte[] FIELD
private static final byte[] FIELD_DIRTY
private static final byte[] FIELD_PRIVATE
private static final byte[] FIELD_LOCKED
private static final byte[] FIELD_EDIT
private static final byte[] FIELD_ALT
private static final byte[] FIELD_INSTRUCTIONS
private static final byte[] FIELD_RESULT
private boolean fieldDirty
private boolean fieldEdit
private boolean fieldLocked
private boolean fieldPrivate
private boolean fieldAlt
private boolean inTable
private boolean inHeader
protected RtfDocument document
private RtfFont font
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 useprivate void writeFieldBegin(OutputStream result) throws IOException
result
- The OutputStream
to write to.
IOException
private void writeFieldInstBegin(OutputStream result) throws IOException
result
- The OutputStream
to write to.
IOException
protected abstract void writeFieldInstContent(OutputStream result) throws IOException
result
- The OutputStream
to write to.
IOException
private void writeFieldInstEnd(OutputStream result) throws IOException
result
- The OutputStream
to write to.
IOException
private void writeFieldResultBegin(OutputStream result) throws IOException
result
- The OutputStream
to write to.
IOException
protected abstract void writeFieldResultContent(OutputStream result) throws IOException
result
- The OutputStream
to write to.
IOException
- on i/o errors.private void writeFieldResultEnd(OutputStream result) throws IOException
result
- The OutputStream
to write to.
IOException
- on i/o errors.private void writeFieldEnd(OutputStream result) throws IOException
result
- The OutputStream
to write to.
IOException
- on i/o errors.public void writeContent(OutputStream result) throws IOException
OutputStream
.
writeContent
in interface RtfBasicElement
result
- The OutputStream
to write to.
IOException
- on i/o errors.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 boolean isInTable()
RtfField
is in a table.
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 isInHeader()
RtfField
is in a header.
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.public void setFont(Font font)
setFont
in class Chunk
font
- a Font
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |