|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PatternConsumer
Implementations of this interface take the information parsed by a
PatternParser
while it is parsing a Liang-style hyphenation file,
and do something useful with it, presumably storing it in a structure that
makes it available to other applications.
Method Summary | |
---|---|
void |
addClass(String characterClass)
Add a Liang-style character class. |
void |
addException(String exceptionWord,
int qtyMorphing)
Add a Liang-style hyphenation exception. |
void |
addMorphException(String exceptionWord,
String pre,
String post,
String no)
Add a morphing hyphenation break to an exception word. |
void |
addPattern(String pattern)
Add a Liang-style hyphenation pattern. |
void |
setHyphenChar(char hyphenChar)
Sets the character that should be interpreted as the hyphenation character in exceptions. |
void |
setMinAfter(byte minAfter)
Sets the minimum number of characters that should be left on a line before a hyphenation break. |
void |
setMinBefore(byte minBefore)
Sets the minimum number of characters that should be at the beginning of a line after a hyphenation break. |
Method Detail |
---|
void setHyphenChar(char hyphenChar)
hyphenChar
- The hyphenation character to set.addException(String, int)
void setMinBefore(byte minBefore)
minBefore
- The minimum number of characters that should be at the
beginning of a line after a hyphenation break.void setMinAfter(byte minAfter)
minAfter
- The minimum number of characters that should be left on a
line before a hyphenation break.void addClass(String characterClass)
characterClass
- The character class to add.void addException(String exceptionWord, int qtyMorphing)
exceptionWord
- The raw word for which the exception is being
created.
For example, the English pattern dictionary distributed with TeX includes
the exception "oblig-a-tory", which is the text expected here.qtyMorphing
- The number of morph exceptions that will be added to
this exception word.addMorphException(String, String, String, String)
void addMorphException(String exceptionWord, String pre, String post, String no) throws org.axsl.hyphen.HyphenationException
exceptionWord
- The raw word for which the exception is being
created.
This must be the same word that was used in
addException(String, int)
.pre
- The "pre" portion of the special exception.post
- The "post" portion of the special exception.no
- The "no" portion of the special exception.
org.axsl.hyphen.HyphenationException
- If exceptionWord
is not found
in the exception words.void addPattern(String pattern)
pattern
- The raw Liang-style pattern to be added, for example
".ab4i".
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |