Class SimplePatternParser
java.lang.Object
com.lowagie.text.pdf.hyphenation.SimplePatternParser
- All Implemented Interfaces:
PatternConsumer, SimpleXMLDocHandler
@Deprecated
public class SimplePatternParser
extends Object
implements SimpleXMLDocHandler, PatternConsumer
Deprecated.
Parses the xml hyphenation pattern.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) PatternConsumerDeprecated.(package private) intDeprecated.(package private) static final intDeprecated.(package private) static final intDeprecated.(package private) static final intDeprecated.(package private) static final intDeprecated.Deprecated.(package private) charDeprecated.(package private) SimpleXMLParserDeprecated.(package private) StringBufferDeprecated. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Add a character class.voidaddException(String w, ArrayList e) Deprecated.Add a hyphenation exception.voidaddPattern(String p, String v) Deprecated.Add hyphenation patterns.voidDeprecated.Called after the document is parsed.voidendElement(String tag) Deprecated.Called when an end tag is found.protected StringgetExceptionWord(List<Object> ex) Deprecated.protected static StringDeprecated.protected static StringgetPattern(String word) Deprecated.static voidDeprecated.normalizeException(List<Object> ex) Deprecated.voidparse(InputStream stream, PatternConsumer consumer) Deprecated.voidDeprecated.Called when the document starts to be parsed.voidstartElement(String tag, Map<String, String> h) Deprecated.Called when a start tag is found.voidDeprecated.Called when a text element is found.
-
Field Details
-
ELEM_CLASSES
static final int ELEM_CLASSESDeprecated.- See Also:
-
ELEM_EXCEPTIONS
static final int ELEM_EXCEPTIONSDeprecated.- See Also:
-
ELEM_PATTERNS
static final int ELEM_PATTERNSDeprecated.- See Also:
-
ELEM_HYPHEN
static final int ELEM_HYPHENDeprecated.- See Also:
-
currElement
int currElementDeprecated. -
consumer
PatternConsumer consumerDeprecated. -
token
StringBuffer tokenDeprecated. -
exception
-
hyphenChar
char hyphenCharDeprecated. -
parser
SimpleXMLParser parserDeprecated.
-
-
Constructor Details
-
SimplePatternParser
public SimplePatternParser()Deprecated.Creates a new instance of PatternParser2
-
-
Method Details
-
getPattern
-
getInterletterValues
-
main
Deprecated. -
parse
Deprecated. -
normalizeException
-
getExceptionWord
-
endDocument
public void endDocument()Deprecated.Description copied from interface:SimpleXMLDocHandlerCalled after the document is parsed.- Specified by:
endDocumentin interfaceSimpleXMLDocHandler
-
endElement
Deprecated.Description copied from interface:SimpleXMLDocHandlerCalled when an end tag is found.- Specified by:
endElementin interfaceSimpleXMLDocHandler- Parameters:
tag- the tag name
-
startDocument
public void startDocument()Deprecated.Description copied from interface:SimpleXMLDocHandlerCalled when the document starts to be parsed.- Specified by:
startDocumentin interfaceSimpleXMLDocHandler
-
startElement
Deprecated.Description copied from interface:SimpleXMLDocHandlerCalled when a start tag is found.- Specified by:
startElementin interfaceSimpleXMLDocHandler- Parameters:
tag- the tag nameh- the tag's attributes
-
text
Deprecated.Description copied from interface:SimpleXMLDocHandlerCalled when a text element is found.- Specified by:
textin interfaceSimpleXMLDocHandler- Parameters:
str- the text element, probably a fragment.
-
addClass
Deprecated.Description copied from interface:PatternConsumerAdd a character class. A character class defines characters that are considered equivalent for the purpose of hyphenation (e.g. "aA"). It usually means to ignore case.- Specified by:
addClassin interfacePatternConsumer- Parameters:
c- character group
-
addException
Deprecated.Description copied from interface:PatternConsumerAdd a hyphenation exception. An exception replaces the result obtained by the algorithm for cases for which this fails or the user wants to provide his own hyphenation. A hyphenatedword is a vector of alternating String's andHypheninstances- Specified by:
addExceptionin interfacePatternConsumer- Parameters:
w- The word to changee- A vector of alternating String's andHypheninstances
-
addPattern
Deprecated.Description copied from interface:PatternConsumerAdd hyphenation patterns.- Specified by:
addPatternin interfacePatternConsumer- Parameters:
p- the patternv- interletter values expressed as a string of digit characters.
-