Package com.aowagie.text.pdf.hyphenation
Class Hyphenator
- java.lang.Object
-
- com.aowagie.text.pdf.hyphenation.Hyphenator
-
public class Hyphenator extends java.lang.Object
This class is the main entry point to the hyphenation package. You can use only the static methods or create an instance.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
defaultHyphLocation
private static java.lang.String
hyphenDir
Holds value of property hyphenDir.private HyphenationTree
hyphenTree
private static java.util.Hashtable
hyphenTrees
TODO: Don't use staticsprivate int
pushCharCount
private int
remainCharCount
-
Constructor Summary
Constructors Constructor Description Hyphenator(java.lang.String lang, java.lang.String country, int leftMin, int rightMin)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static HyphenationTree
getFileHyphenationTree(java.lang.String key)
private static HyphenationTree
getHyphenationTree(java.lang.String lang, java.lang.String country)
private static HyphenationTree
getResourceHyphenationTree(java.lang.String key)
Hyphenation
hyphenate(java.lang.String word)
void
setMinPushCharCount(int min)
void
setMinRemainCharCount(int min)
-
-
-
Field Detail
-
hyphenTrees
private static java.util.Hashtable hyphenTrees
TODO: Don't use statics
-
hyphenTree
private HyphenationTree hyphenTree
-
remainCharCount
private int remainCharCount
-
pushCharCount
private int pushCharCount
-
defaultHyphLocation
private static final java.lang.String defaultHyphLocation
- See Also:
- Constant Field Values
-
hyphenDir
private static java.lang.String hyphenDir
Holds value of property hyphenDir.
-
-
Method Detail
-
getHyphenationTree
private static HyphenationTree getHyphenationTree(java.lang.String lang, java.lang.String country)
- Parameters:
lang
-country
-- Returns:
- the hyphenation tree
-
getResourceHyphenationTree
private static HyphenationTree getResourceHyphenationTree(java.lang.String key)
- Parameters:
key
-- Returns:
- a hyphenation tree
-
getFileHyphenationTree
private static HyphenationTree getFileHyphenationTree(java.lang.String key)
- Parameters:
key
-- Returns:
- a hyphenation tree
-
setMinRemainCharCount
public void setMinRemainCharCount(int min)
- Parameters:
min
- minimum to set
-
setMinPushCharCount
public void setMinPushCharCount(int min)
- Parameters:
min
- minimum to set
-
hyphenate
public Hyphenation hyphenate(java.lang.String word)
- Parameters:
word
- word to set- Returns:
- a hyphenation object
-
-