com.lowagie.text.pdf.hyphenation

Class Hyphenator

public class Hyphenator extends Object

This class is the main entry point to the hyphenation package. You can use only the static methods or create an instance.

Author: Carlos Villegas

Field Summary
static StringdefaultHyphLocation
static StringhyphenDir
Holds value of property hyphenDir.
HyphenationTreehyphenTree
static HashtablehyphenTrees
TODO: Don't use statics
intpushCharCount
intremainCharCount
Constructor Summary
Hyphenator(String lang, String country, int leftMin, int rightMin)
Method Summary
static HyphenationTreegetFileHyphenationTree(String key)
static HyphenationTreegetHyphenationTree(String lang, String country)
static StringgetHyphenDir()
Getter for property hyphenDir.
static HyphenationTreegetResourceHyphenationTree(String key)
static Hyphenationhyphenate(String lang, String country, String word, int leftMin, int rightMin)
static Hyphenationhyphenate(String lang, String country, char[] word, int offset, int len, int leftMin, int rightMin)
Hyphenationhyphenate(char[] word, int offset, int len)
Hyphenationhyphenate(String word)
static voidsetHyphenDir(String _hyphenDir)
Setter for property hyphenDir.
voidsetLanguage(String lang, String country)
voidsetMinPushCharCount(int min)
voidsetMinRemainCharCount(int min)

Field Detail

defaultHyphLocation

private static final String defaultHyphLocation

hyphenDir

private static String hyphenDir
Holds value of property hyphenDir.

hyphenTree

private HyphenationTree hyphenTree

hyphenTrees

private static Hashtable hyphenTrees
TODO: Don't use statics

pushCharCount

private int pushCharCount

remainCharCount

private int remainCharCount

Constructor Detail

Hyphenator

public Hyphenator(String lang, String country, int leftMin, int rightMin)

Parameters: lang country leftMin rightMin

Method Detail

getFileHyphenationTree

public static HyphenationTree getFileHyphenationTree(String key)

Parameters: key

Returns: a hyphenation tree

getHyphenationTree

public static HyphenationTree getHyphenationTree(String lang, String country)

Parameters: lang country

Returns: the hyphenation tree

getHyphenDir

public static String getHyphenDir()
Getter for property hyphenDir.

Returns: Value of property hyphenDir.

getResourceHyphenationTree

public static HyphenationTree getResourceHyphenationTree(String key)

Parameters: key

Returns: a hyphenation tree

hyphenate

public static Hyphenation hyphenate(String lang, String country, String word, int leftMin, int rightMin)

Parameters: lang country word leftMin rightMin

Returns: a hyphenation object

hyphenate

public static Hyphenation hyphenate(String lang, String country, char[] word, int offset, int len, int leftMin, int rightMin)

Parameters: lang country word offset len leftMin rightMin

Returns: a hyphenation object

hyphenate

public Hyphenation hyphenate(char[] word, int offset, int len)

Parameters: word offset len

Returns: a hyphenation object

hyphenate

public Hyphenation hyphenate(String word)

Parameters: word

Returns: a hyphenation object

setHyphenDir

public static void setHyphenDir(String _hyphenDir)
Setter for property hyphenDir.

Parameters: _hyphenDir New value of property hyphenDir.

setLanguage

public void setLanguage(String lang, String country)

Parameters: lang country

setMinPushCharCount

public void setMinPushCharCount(int min)

Parameters: min

setMinRemainCharCount

public void setMinRemainCharCount(int min)

Parameters: min