com.lowagie.text.rtf.parser.destinations
public abstract class RtfDestination extends Object
RtfDestination
is the base class for destinations according
to the RTF Specification. All destinations must extend from this class.
Since: 2.0.8
Field Summary | |
---|---|
protected RtfCtrlWordData | lastCtrlWord The last control word handled by this destination |
static ArrayList | listeners The RtfDestinationListener . |
protected boolean | modified Is data in destination modified? |
protected RtfParser | rtfParser Parser object |
Constructor Summary | |
---|---|
RtfDestination()
Constructor. | |
RtfDestination(RtfParser parser)
Constructor |
Method Summary | |
---|---|
boolean | addListener(RtfDestinationListener listener)
Adds a RtfDestinationListener to the RtfDestinationMgr .
|
protected int | afterCharacter(int ch) |
protected RtfCtrlWordData | afterCtrlWord(RtfCtrlWordData ctrlWordData) |
protected int | beforeCharacter(int ch) |
protected RtfCtrlWordData | beforeCtrlWord(RtfCtrlWordData ctrlWordData) |
abstract boolean | closeDestination()
Clean up when destination is closed. |
int | getNewTokeniserState() |
abstract boolean | handleCharacter(int ch)
Handle text for this destination |
abstract boolean | handleCloseGroup()
Clean up when group is closed. |
abstract boolean | handleControlWord(RtfCtrlWordData ctrlWordData)
Handle control word for this destination |
abstract boolean | handleOpenGroup()
Setup when group is opened. |
abstract boolean | handleOpeningSubGroup()
Handle a new subgroup contained within this group |
boolean | isModified()
Method to indicate if data in this destination has changed. |
protected int | onCharacter(int ch) |
protected boolean | onCloseGroup() |
protected RtfCtrlWordData | onCtrlWord(RtfCtrlWordData ctrlWordData) |
protected boolean | onOpenGroup() |
boolean | removeListener(RtfDestinationListener listener)
Removes a RtfDestinationListener from the RtfDestinationMgr .
|
void | setParser(RtfParser parser)
Set the parser to use with the RtfDestination object.
|
abstract void | setToDefaults()
Method to set this object to the default values. |
RtfDestinationListener
.Parameters: parser RtfParser
object.
RtfDestinationListener
to the RtfDestinationMgr
.
Parameters: listener the new RtfDestinationListener.
Returns: true if handled, false if not handled
Returns: true if handled, false if not handled
Returns: true if handled, false if not handled
Parameters: ctrlWordData The control word and parameter information object
Returns: true if handled, false if not handled
Returns: true if handled, false if not handled
Returns: true if handled, false if not handled
Returns: true if modified, false if not modified.
Returns: true if all goes well
Returns: true if all goes well
RtfDestinationListener
from the RtfDestinationMgr
.
Parameters: listener the RtfCtrlWordListener that has to be removed.
Parameters: parser The RtfParser object.