|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
isHyphenActive()
Return true , if hyphenation is active,
otherwise false ; |
void |
setHyphenActive(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 |
public 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 errorpublic void addPattern(Tokens pattern) throws HyphenationException
pattern
- the pattern word with numbers
HyphenationException
- in case of an errorpublic long getLeftHyphenmin() throws HyphenationException
HyphenationException
- in case of an errorpublic long getRightHyphenmin() throws HyphenationException
HyphenationException
- in case of an errorpublic 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 errorpublic boolean isHyphenActive() throws HyphenationException
true
, if hyphenation is active,
otherwise false
;
true
iff the hyphenation for this language is
enabled
HyphenationException
- in case of an errorpublic void setHyphenActive(boolean active) throws HyphenationException
active
- the indicator that the hyphenation is activated
HyphenationException
- in case of an errorpublic void setLeftHyphenmin(long left) throws HyphenationException
left
- the new value
HyphenationException
- in case of an errorpublic 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 |