|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.hyphenation.Hyphenator
This class is the main entry point to the hyphenation package. You can use only the static methods or create an instance.
Field Summary | |
protected static org.apache.commons.logging.Log |
log
logging instance |
Constructor Summary | |
Hyphenator(java.lang.String lang,
java.lang.String country,
int leftMin,
int rightMin)
Creates a new hyphenator. |
Method Summary | |
static HyphenationTree |
getFopHyphenationTree(java.lang.String key)
Returns a hyphenation tree. |
static HyphenationTree |
getHyphenationTree(java.lang.String lang,
java.lang.String country)
Returns a hyphenation tree for a given language and country. |
static HyphenationTree |
getHyphenationTree(java.lang.String lang,
java.lang.String country,
HyphenationTreeResolver resolver)
Returns a hyphenation tree for a given language and country. |
static HyphenationTreeCache |
getHyphenationTreeCache()
|
static HyphenationTree |
getUserHyphenationTree(java.lang.String key,
HyphenationTreeResolver resolver)
Load tree from serialized file or xml file using configuration settings |
static HyphenationTree |
getUserHyphenationTree(java.lang.String key,
java.lang.String hyphenDir)
Load tree from serialized file or xml file using configuration settings |
Hyphenation |
hyphenate(char[] word,
int offset,
int len)
Hyphenates a word. |
Hyphenation |
hyphenate(java.lang.String word)
Hyphenates a word. |
static Hyphenation |
hyphenate(java.lang.String lang,
java.lang.String country,
char[] word,
int offset,
int len,
int leftMin,
int rightMin)
Hyphenates a word. |
static Hyphenation |
hyphenate(java.lang.String lang,
java.lang.String country,
HyphenationTreeResolver resolver,
char[] word,
int offset,
int len,
int leftMin,
int rightMin)
Hyphenates a word. |
static Hyphenation |
hyphenate(java.lang.String lang,
java.lang.String country,
HyphenationTreeResolver resolver,
java.lang.String word,
int leftMin,
int rightMin)
Hyphenates a word. |
static Hyphenation |
hyphenate(java.lang.String lang,
java.lang.String country,
java.lang.String word,
int leftMin,
int rightMin)
Hyphenates a word. |
void |
setLanguage(java.lang.String lang,
java.lang.String country)
Sets the language and country for the hyphenation process. |
void |
setMinPushCharCount(int min)
Sets the minimum number of characters after the hyphenation point |
void |
setMinRemainCharCount(int min)
Sets the minimum number of characters before the hyphenation point |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static org.apache.commons.logging.Log log
Constructor Detail |
public Hyphenator(java.lang.String lang, java.lang.String country, int leftMin, int rightMin)
lang
- the languagecountry
- the country (may be null or "none")leftMin
- the minimum number of characters before the hyphenation pointrightMin
- the minimum number of characters after the hyphenation pointMethod Detail |
public static HyphenationTreeCache getHyphenationTreeCache()
public static HyphenationTree getHyphenationTree(java.lang.String lang, java.lang.String country)
lang
- the languagecountry
- the country (may be null or "none")
public static HyphenationTree getHyphenationTree(java.lang.String lang, java.lang.String country, HyphenationTreeResolver resolver)
lang
- the languagecountry
- the country (may be null or "none")resolver
- resolver to find the hyphenation files
public static HyphenationTree getFopHyphenationTree(java.lang.String key)
key
- the language/country key
public static HyphenationTree getUserHyphenationTree(java.lang.String key, java.lang.String hyphenDir)
key
- language key for the requested hyphenation filehyphenDir
- base directory to find hyphenation files in
public static HyphenationTree getUserHyphenationTree(java.lang.String key, HyphenationTreeResolver resolver)
key
- language key for the requested hyphenation fileresolver
- resolver to find the hyphenation files
public static Hyphenation hyphenate(java.lang.String lang, java.lang.String country, HyphenationTreeResolver resolver, java.lang.String word, int leftMin, int rightMin)
lang
- the languagecountry
- the optional country code (may be null or "none")resolver
- resolver to find the hyphenation filesword
- the word to hyphenateleftMin
- the minimum number of characters before the hyphenation pointrightMin
- the minimum number of characters after the hyphenation point
public static Hyphenation hyphenate(java.lang.String lang, java.lang.String country, java.lang.String word, int leftMin, int rightMin)
lang
- the languagecountry
- the optional country code (may be null or "none")word
- the word to hyphenateleftMin
- the minimum number of characters before the hyphenation pointrightMin
- the minimum number of characters after the hyphenation point
public static Hyphenation hyphenate(java.lang.String lang, java.lang.String country, HyphenationTreeResolver resolver, char[] word, int offset, int len, int leftMin, int rightMin)
lang
- the languagecountry
- the optional country code (may be null or "none")resolver
- resolver to find the hyphenation filesword
- the word to hyphenateoffset
- the offset of the first character in the "word" character arraylen
- the length of the wordleftMin
- the minimum number of characters before the hyphenation pointrightMin
- the minimum number of characters after the hyphenation point
public static Hyphenation hyphenate(java.lang.String lang, java.lang.String country, char[] word, int offset, int len, int leftMin, int rightMin)
lang
- the languagecountry
- the optional country code (may be null or "none")word
- the word to hyphenateoffset
- the offset of the first character in the "word" character arraylen
- the length of the wordleftMin
- the minimum number of characters before the hyphenation pointrightMin
- the minimum number of characters after the hyphenation point
public void setMinRemainCharCount(int min)
min
- the number of characterspublic void setMinPushCharCount(int min)
min
- the number of characterspublic void setLanguage(java.lang.String lang, java.lang.String country)
lang
- the languagecountry
- the country (may be null or "none")public Hyphenation hyphenate(char[] word, int offset, int len)
word
- the word to hyphenateoffset
- the offset of the first character in the "word" character arraylen
- the length of the word
public Hyphenation hyphenate(java.lang.String word)
word
- the word to hyphenate
|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |