|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.rtf.parser.ctrlwords.RtfCtrlWordHandler
public class RtfCtrlWordHandler
RtfCtrlWordBase
is the base class for all
control word handlers to extend from.
Field Summary | |
---|---|
protected String |
ctrlWord
The control word for this class. |
protected RtfCtrlWordData |
ctrlWordData
The control word as parsed by the parser. |
protected String |
ctrlWordPrefix
The prefix for all control words. |
protected String |
ctrlWordSuffix
The prefix for all control words. |
protected int |
ctrlWordType
Control Word type. |
private static boolean |
debug
Debug flag - internal use |
protected int |
defaultParameterValue
The default value for this control word. |
protected String |
groupPrefix
String containing the value of "{" or "" (blank) depending on if this is the first control word in a group. |
protected boolean |
passDefaultParameterValue
Does this control word use the default value? |
protected RtfParser |
rtfParser
Local variable referencing the parser object. |
protected float |
rtfVersionSupported
What version of the RTF spec the control word was introduced. |
protected String |
specialHandler
Class, property, etc. |
Constructor Summary | |
---|---|
private |
RtfCtrlWordHandler()
Hidden default constructor. |
|
RtfCtrlWordHandler(RtfParser rtfParser,
String ctrlWord,
int defaultParameterValue,
boolean passDefaultParameterValue,
int ctrlWordType,
String prefix,
String suffix,
String specialHandler)
Constructor: |
Method Summary | |
---|---|
protected boolean |
afterControlWord()
Post-processing after the control word. |
protected boolean |
beforeControlWord()
Pre-processing before the control word. |
boolean |
handleControlword(RtfCtrlWordData ctrlWordDataIn)
The primary control word handler method. |
protected boolean |
onControlWord()
Handle the control word. |
private void |
printDebug(String txt)
Debug function to print class/method |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final boolean debug
protected RtfParser rtfParser
protected String ctrlWord
protected int defaultParameterValue
protected boolean passDefaultParameterValue
protected int ctrlWordType
protected String specialHandler
protected float rtfVersionSupported
protected RtfCtrlWordData ctrlWordData
protected String groupPrefix
protected String ctrlWordPrefix
protected String ctrlWordSuffix
Constructor Detail |
---|
private RtfCtrlWordHandler()
RtfCtrlWordHandler(RtfParser rtfParser, String ctrlWord, int defaultParameterValue, boolean passDefaultParameterValue, int ctrlWordType, String prefix, String suffix, String specialHandler)
public RtfCtrlWordHandler(RtfParser rtfParser, String ctrlWord, int defaultParameterValue, boolean passDefaultParameterValue, int ctrlWordType, String prefix, String suffix, String specialHandler)
rtfParser
- The parser for this control word.ctrlWord
- The string value of this control word.defaultParameterValue
- The default value of this control word. Not all control words have values.passDefaultParameterValue
- Flag indicating if this control word should use the default value.ctrlWordType
- Indicator of the type of control word this is. DESTINATION|DESTINATION_EX|VALUE|FLAG|TOGGLE|SYMBOLprefix
- String to prefix the ctrl word with. "\" or "\*\" are the 2 used values.suffix
- String to add as suffix to the ctrl word. " " and "" are the 2 used values.specialHandler
- If TOGGLE then the property name as String (propertyGroup.propertyName format ex. "character.bold")
If FLAG then the property name as String (propertyGroup.propertyName format ex. "character.bold")
If VALUE then the property name as String (propertyGroup.propertyName format ex. "character.bold")
If SYMBOL then the character to use for substitution as String
If DESTINATION|DESTINATION_EX then the RtfDestination class name as StringMethod Detail |
---|
public final boolean handleControlword(RtfCtrlWordData ctrlWordDataIn)
ctrlWordDataIn
- The control word and associated parameter if applicable.
true
or false
if the control word was handled.protected boolean beforeControlWord()
false
= stop processing, true
= continue processingprotected boolean onControlWord()
true
if control word was handled, false
if it was not handled.protected boolean afterControlWord()
false
= stop processing, true
= continue processingprivate final void printDebug(String txt)
txt
- The String
to output.
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |