|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Hyphenator
Interface for the HyphenationTable.
In the table the hyphenation patterns (see \patterns
and the user hyphenations (see \hyphenation) are stored.
| Method Summary | |
|---|---|
void |
addHyphenation(UnicodeCharList word,
TypesetterOptions context)
Add a user-defined hyphenation. |
void |
addPattern(Tokens pattern)
Add a pattern to the hyphenation table. |
long |
getLeftHyphenMin()
Return the value for the minimum number of characters before a hyphenation on the left hand side of a word. |
long |
getRightHyphenMin()
Return the value for the minimum number of characters before a hyphenation on the right hand side of a word. |
boolean |
hyphenate(NodeList nodelist,
TypesetterOptions context,
UnicodeChar hyphen,
int start,
boolean forall,
NodeFactory nodeFactory)
Insert the hyphenation marks for a horizontal list of nodes. |
boolean |
isHyphenating()
Return true, if hyphenation is active,
otherwise false; |
void |
setHyphenating(boolean active)
Activate or deactivate the hyphenation for this language. |
void |
setLeftHyphenMin(long left)
Set the value for the minimum number of characters before a hyphenation on the left hand side of a word. |
void |
setRightHyphenMin(long right)
Set the value for the minimum number of characters before a hyphenation on the right hand side of a word. |
| Method Detail |
|---|
void addHyphenation(UnicodeCharList word,
TypesetterOptions context)
throws HyphenationException
The hyphenation template consists of a word of characters. The Unicode soft hyphenation character has a special meaning. This character is used to indicate places where a hyphenation is permitted. The other characters – i.e. normal Unicode characters – are used as-is.
word - the word with the hyphenation markscontext - the interpreter context
HyphenationException - in case of an error
void addPattern(Tokens pattern)
throws HyphenationException
pattern - the pattern word with numbers
HyphenationException - in case of an error
long getLeftHyphenMin()
throws HyphenationException
HyphenationException - in case of an error
long getRightHyphenMin()
throws HyphenationException
HyphenationException - in case of an error
boolean hyphenate(NodeList nodelist,
TypesetterOptions context,
UnicodeChar hyphen,
int start,
boolean forall,
NodeFactory nodeFactory)
throws HyphenationException
nodelist - the horizontal node listcontext - the contexthyphen - the tokens to be inserted for hyphensstart - the start indexforall - the indicator that all words to the end should be
processed. if false then only the next word is hyphenated.nodeFactory - the node factory
true iff the hyphenator is responsible for this
word. Usually this means that some hyphenation marks have been inserted.
HyphenationException - in case of an error
boolean isHyphenating()
throws HyphenationException
true, if hyphenation is active,
otherwise false;
true iff the hyphenation for this language is
enabled
HyphenationException - in case of an error
void setHyphenating(boolean active)
throws HyphenationException
active - the indicator that the hyphenation is activated
HyphenationException - in case of an error
void setLeftHyphenMin(long left)
throws HyphenationException
left - the new value
HyphenationException - in case of an error
void setRightHyphenMin(long right)
throws HyphenationException
right - the new value
HyphenationException - in case of an error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||