com.lowagie.text.pdf.hyphenation
Class Hyphenator

java.lang.Object
  |
  +--com.lowagie.text.pdf.hyphenation.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
private static boolean errorDump
           
private static String hyphenDir
          Holds value of property hyphenDir.
private  HyphenationTree hyphenTree
           
(package private) static Hashtable hyphenTrees
           
private  int pushCharCount
           
private  int remainCharCount
           
 
Constructor Summary
Hyphenator(String lang, String country, int leftMin, int rightMin)
           
 
Method Summary
static HyphenationTree getFopHyphenationTree(String key)
           
static HyphenationTree getHyphenationTree(String lang, String country)
           
static String getHyphenDir()
          Getter for property hyphenDir.
private static InputStream getResourceStream(String key)
           
static HyphenationTree getUserHyphenationTree(String key, String hyphenDir)
          load tree from serialized file or xml file using configuration settings
 Hyphenation hyphenate(char[] word, int offset, int len)
           
 Hyphenation hyphenate(String word)
           
static Hyphenation hyphenate(String lang, String country, char[] word, int offset, int len, int leftMin, int rightMin)
           
static Hyphenation hyphenate(String lang, String country, String word, int leftMin, int rightMin)
           
static void setHyphenDir(String _hyphenDir)
          Setter for property hyphenDir.
 void setLanguage(String lang, String country)
           
 void setMinPushCharCount(int min)
           
 void setMinRemainCharCount(int min)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hyphenTrees

static Hashtable hyphenTrees

hyphenTree

private HyphenationTree hyphenTree

remainCharCount

private int remainCharCount

pushCharCount

private int pushCharCount

errorDump

private static boolean errorDump

hyphenDir

private static String hyphenDir
Holds value of property hyphenDir.

Constructor Detail

Hyphenator

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

getHyphenationTree

public static HyphenationTree getHyphenationTree(String lang,
                                                 String country)

getResourceStream

private static InputStream getResourceStream(String key)

getFopHyphenationTree

public static HyphenationTree getFopHyphenationTree(String key)

getUserHyphenationTree

public static HyphenationTree getUserHyphenationTree(String key,
                                                     String hyphenDir)
load tree from serialized file or xml file using configuration settings


hyphenate

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

hyphenate

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

setMinRemainCharCount

public void setMinRemainCharCount(int min)

setMinPushCharCount

public void setMinPushCharCount(int min)

setLanguage

public void setLanguage(String lang,
                        String country)

hyphenate

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

hyphenate

public Hyphenation hyphenate(String word)

getHyphenDir

public static String getHyphenDir()
Getter for property hyphenDir.

Returns:
Value of property hyphenDir.

setHyphenDir

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

Parameters:
_hyphenDir - New value of property hyphenDir.