com.lowagie.text.rtf

Class AbstractRtfField

abstract class AbstractRtfField extends Chunk implements RtfField

Deprecated: Please move to the RtfWriter2 and associated classes.

This class implements an abstract RtfField. This class is based on the RtfWriter-package from Mark Hall. ONLY FOR USE WITH THE RtfWriter NOT with the RtfWriter2.

Since: Mon Aug 19 14:50:39 2002

Version: $Id: AbstractRtfField.java 2698 2007-04-19 12:03:08Z blowagie $

Author: Dirk Weigenand (Dirk.Weigenand@smb-tec.com)

Field Summary
static byte[]fldAlt
static byte[]fldDirty
static byte[]fldEdit
static byte[]fldLock
static byte[]fldPriv
booleanrtfFieldIsAlt
Determines whether this RtfField shall refer to an end note.
booleanrtfFieldIsDirty
Determines whether a formatting change has been made since the field was last updated.
booleanrtfFieldIsLocked
Determines whether this RtfField is locked, i.e. it cannot be updated.
booleanrtfFieldIsPrivate
Determines whether the field is in suitable form for display.
booleanrtfFieldWasEdited
Determines whether text has been added, removed from thre field result since the field was last updated.
Constructor Summary
AbstractRtfField(String content, Font font)
public constructor
Method Summary
Stringcontent()
empty implementation for Chunk.
StringgetContent()
empty implementation for Chunk.
booleanisAlt()
Determines whether this RtfField shall refer to an end note.
booleanisDirty()
Determines whether the field was changed since the field was last updated
booleanisLocked()
Determines whtether the field is locked, i.e. it cannot be updated.
booleanisPrivate()
Determines whether the field is in suitable form for display.
voidsetAlt(boolean rtfFieldIsAlt)
Determines whether this RtfField shall refer to an end note.
voidsetDirty(boolean rtfFieldIsDirty)
Set whether a formatting change has been made since the field was last updated
voidsetEdited(boolean rtfFieldWasEdited)
Set whether text has been added, removed from thre field result since the field was last updated.
voidsetLocked(boolean rtfFieldIsLocked)
Set whether the field can be updated.
voidsetPrivate(boolean rtfFieldIsPrivate)
Set whether the field is in suitable form for display.
booleanwasEdited()
Determines whether text has been added, removed from the field result since the field was last updated.
voidwrite(RtfWriter writer, OutputStream out)
For Interface RtfField.
protected voidwriteRtfFieldBegin(OutputStream out)
Write the beginning of an RtfField to the OutputStream.
protected voidwriteRtfFieldEnd(OutputStream out)
Close the RtfField.
abstract voidwriteRtfFieldInitializationStuff(OutputStream out)
Abstract method for writing custom stuff to the Field Initialization Stuff part of an RtfField.
protected voidwriteRtfFieldInstBegin(OutputStream out)
Write RtfField Initialization Stuff to OutputStream.
protected voidwriteRtfFieldInstEnd(OutputStream out)
Write end of RtfField Initialization Stuff to OutputStream.
protected voidwriteRtfFieldModifiers(OutputStream out)
Write the modifiers defined for a RtfField to the OutputStream.
protected voidwriteRtfFieldResultBegin(OutputStream out)
Write beginning of RtfField Result to OutputStream.
protected voidwriteRtfFieldResultEnd(OutputStream out)
Write end of RtfField Result to OutputStream.
abstract voidwriteRtfFieldResultStuff(OutputStream out)
Abstract method for writing custom stuff to the Field Result part of an RtfField.

Field Detail

fldAlt

private static final byte[] fldAlt

fldDirty

private static final byte[] fldDirty

fldEdit

private static final byte[] fldEdit

fldLock

private static final byte[] fldLock

fldPriv

private static final byte[] fldPriv

rtfFieldIsAlt

private boolean rtfFieldIsAlt
Determines whether this RtfField shall refer to an end note.

rtfFieldIsDirty

private boolean rtfFieldIsDirty
Determines whether a formatting change has been made since the field was last updated. Defaults to false.

rtfFieldIsLocked

private boolean rtfFieldIsLocked
Determines whether this RtfField is locked, i.e. it cannot be updated. Defaults to false.

rtfFieldIsPrivate

private boolean rtfFieldIsPrivate
Determines whether the field is in suitable form for display. Defaults to false.

rtfFieldWasEdited

private boolean rtfFieldWasEdited
Determines whether text has been added, removed from thre field result since the field was last updated. Defaults to false.

Constructor Detail

AbstractRtfField

public AbstractRtfField(String content, Font font)
public constructor

Parameters: content the content of the field font the font of the field

Method Detail

content

public final String content()

Deprecated: Use getContent instead

empty implementation for Chunk.

Returns: an empty string

getContent

public final String getContent()
empty implementation for Chunk.

Returns: an empty string

isAlt

public final boolean isAlt()
Determines whether this RtfField shall refer to an end note.

Returns: true if this RtfField shall refer to an end note, false otherwise.

isDirty

public final boolean isDirty()
Determines whether the field was changed since the field was last updated

Returns: true if the field was changed since the field was last updated, false otherwise.

isLocked

public final boolean isLocked()
Determines whtether the field is locked, i.e. it cannot be updated.

Returns: true iff the field cannot be updated, false otherwise.

isPrivate

public final boolean isPrivate()
Determines whether the field is in suitable form for display.

Returns: whether the field is in suitable form for display: true yes, false no it cannot be displayed.

setAlt

public final void setAlt(boolean rtfFieldIsAlt)
Determines whether this RtfField shall refer to an end note.

Parameters: rtfFieldIsAlt true if this RtfField shall refer to an end note, false otherwise

setDirty

public final void setDirty(boolean rtfFieldIsDirty)
Set whether a formatting change has been made since the field was last updated

Parameters: rtfFieldIsDirty true if the field was changed since the field was last updated, false otherwise.

setEdited

public final void setEdited(boolean rtfFieldWasEdited)
Set whether text has been added, removed from thre field result since the field was last updated.

Parameters: rtfFieldWasEdited Determines whether text has been added, removed from the field result since the field was last updated (true, false otherwise..

setLocked

public final void setLocked(boolean rtfFieldIsLocked)
Set whether the field can be updated.

Parameters: rtfFieldIsLocked true if the field cannot be updated, false otherwise.

setPrivate

public final void setPrivate(boolean rtfFieldIsPrivate)
Set whether the field is in suitable form for display. I.e. it's not a field with a picture as field result

Parameters: rtfFieldIsPrivate Determines whether the field is in suitable form for display: true it can be displayed, false it cannot be displayed.

wasEdited

public final boolean wasEdited()
Determines whether text has been added, removed from the field result since the field was last updated.

Returns: rtfFieldWasEdited true if text has been added, removed from the field result since the field was last updated, false otherwise.

write

public void write(RtfWriter writer, OutputStream out)
For Interface RtfField.

Parameters: writer out

Throws: IOException

writeRtfFieldBegin

protected final void writeRtfFieldBegin(OutputStream out)
Write the beginning of an RtfField to the OutputStream.

Parameters: out

Throws: IOException

writeRtfFieldEnd

protected final void writeRtfFieldEnd(OutputStream out)
Close the RtfField.

Parameters: out

Throws: IOException

writeRtfFieldInitializationStuff

public abstract void writeRtfFieldInitializationStuff(OutputStream out)
Abstract method for writing custom stuff to the Field Initialization Stuff part of an RtfField.

Parameters: out

Throws: IOException

writeRtfFieldInstBegin

protected final void writeRtfFieldInstBegin(OutputStream out)
Write RtfField Initialization Stuff to OutputStream.

Parameters: out

Throws: IOException

writeRtfFieldInstEnd

protected final void writeRtfFieldInstEnd(OutputStream out)
Write end of RtfField Initialization Stuff to OutputStream.

Parameters: out

Throws: IOException

writeRtfFieldModifiers

protected final void writeRtfFieldModifiers(OutputStream out)
Write the modifiers defined for a RtfField to the OutputStream.

Parameters: out

Throws: IOException

writeRtfFieldResultBegin

protected final void writeRtfFieldResultBegin(OutputStream out)
Write beginning of RtfField Result to OutputStream.

Parameters: out

Throws: IOException

writeRtfFieldResultEnd

protected final void writeRtfFieldResultEnd(OutputStream out)
Write end of RtfField Result to OutputStream.

Parameters: out

Throws: IOException

writeRtfFieldResultStuff

public abstract void writeRtfFieldResultStuff(OutputStream out)
Abstract method for writing custom stuff to the Field Result part of an RtfField.

Parameters: out

Throws: IOException