Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » rtf » field » [javadoc | source]
com.lowagie.text.rtf.field
abstract public class: RtfField [javadoc | source]
java.lang.Object
   com.lowagie.text.Chunk
      com.lowagie.text.rtf.field.RtfField

All Implemented Interfaces:
    RtfBasicElement, Element

Direct Known Subclasses:
    RtfTOCEntry, RtfTableOfContents, RtfTotalPageNumber, RtfAnchor, RtfPageNumber

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 com.lowagie.text.Chunk:
OBJECT_REPLACEMENT_CHARACTER,  NEWLINE,  NEXTPAGE,  content,  font,  attributes,  SEPARATOR,  TAB,  HSCALE,  UNDERLINE,  SUBSUPSCRIPT,  SKEW,  BACKGROUND,  TEXTRENDERMODE,  SPLITCHARACTER,  HYPHENATION,  REMOTEGOTO,  LOCALGOTO,  LOCALDESTINATION,  GENERICTAG,  IMAGE,  ACTION,  NEWPAGE,  PDFANNOTATION,  COLOR,  ENCODING
Constructor:
 protected RtfField(RtfDocument doc) 
    Constructs a RtfField for a RtfDocument. This is not very useful, since the RtfField by itself does not do anything. Use one of the subclasses instead.
    Parameters:
    doc - The RtfDocument this RtfField belongs to.
 protected RtfField(RtfDocument doc,
    Font font) 
    Constructs a RtfField for a RtfDocument. This is not very useful, since the RtfField by itself does not do anything. Use one of the subclasses instead.
    Parameters:
    doc - The RtfDocument this RtfField belongs to.
    font - The Font this RtfField should use
Method from com.lowagie.text.rtf.field.RtfField Summary:
isEmpty,   isFieldAlt,   isFieldDirty,   isFieldEdit,   isFieldLocked,   isFieldPrivate,   isInHeader,   isInTable,   setFieldAlt,   setFieldDirty,   setFieldEdit,   setFieldLocked,   setFieldPrivate,   setFont,   setInHeader,   setInTable,   setRtfDocument,   writeContent,   writeFieldInstContent,   writeFieldResultContent
Methods from com.lowagie.text.Chunk:
append,   getAttributes,   getChunks,   getContent,   getFont,   getHorizontalScaling,   getHyphenation,   getImage,   getTextRise,   getWidthPoint,   hasAttributes,   isContent,   isEmpty,   isNestable,   process,   setAction,   setAnchor,   setAnchor,   setAnnotation,   setAttributes,   setBackground,   setBackground,   setFont,   setGenericTag,   setHorizontalScaling,   setHyphenation,   setLocalDestination,   setLocalGoto,   setNewPage,   setRemoteGoto,   setRemoteGoto,   setSkew,   setSplitCharacter,   setTextRenderMode,   setTextRise,   setUnderline,   setUnderline,   toString,   type
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.rtf.field.RtfField Detail:
 public boolean isEmpty() 
    An RtfField is never empty.
 public boolean isFieldAlt() 
    Get whether this field is an alt field
 public boolean isFieldDirty() 
    Get whether this field is dirty
 public boolean isFieldEdit() 
    Get whether this field is edited
 public boolean isFieldLocked() 
    Get whether this field is locked
 public boolean isFieldPrivate() 
    Get whether this field is private
 public boolean isInHeader() 
    Gets whether this RtfField is in a header.
 public boolean isInTable() 
    Gets whether this RtfField is in a table.
 public  void setFieldAlt(boolean fieldAlt) 
    Set whether this field is an alt field
 public  void setFieldDirty(boolean fieldDirty) 
    Set whether this field is dirty
 public  void setFieldEdit(boolean fieldEdit) 
    Set whether this field is edited.
 public  void setFieldLocked(boolean fieldLocked) 
    Set whether this field is locked
 public  void setFieldPrivate(boolean fieldPrivate) 
    Set whether this field is private
 public  void setFont(Font font) 
    Override setFont to perform the correct font handling.
 public  void setInHeader(boolean inHeader) 
    Sets whether this RtfField is in a header
 public  void setInTable(boolean inTable) 
    Sets whether this RtfField is in a table
 public  void setRtfDocument(RtfDocument doc) 
    Sets the RtfDocument this RtfElement belongs to
 public  void writeContent(OutputStream result) throws IOException 
    Writes the field to the OutputStream.
 abstract protected  void writeFieldInstContent(OutputStream result) throws IOException
    Writes the content of the field instruction area. Override this method in your subclasses.
 abstract protected  void writeFieldResultContent(OutputStream result) throws IOException
    Writes the content of the pre-calculated field result. Override this method in your subclasses.