HyphenationEvent
public class HyphenationAuto extends Object implements HyphenationEvent
Modifier and Type | Field | Description |
---|---|---|
protected Hyphenator |
hyphenator |
The hyphenator engine.
|
protected String |
post |
The second part of the hyphenated word.
|
Constructor | Description |
---|---|
HyphenationAuto(String lang,
String country,
int leftMin,
int rightMin) |
Creates a new hyphenation instance usable in
Chunk . |
Modifier and Type | Method | Description |
---|---|---|
String |
getHyphenatedWordPost() |
Gets the second part of the hyphenated word.
|
String |
getHyphenatedWordPre(String word,
BaseFont font,
float fontSize,
float remainingWidth) |
Hyphenates a word and returns the first part of it.
|
String |
getHyphenSymbol() |
Gets the hyphen symbol.
|
protected Hyphenator hyphenator
protected String post
public HyphenationAuto(String lang, String country, int leftMin, int rightMin)
Chunk
.lang
- the language ("en" for English, for example)country
- the country ("GB" for Great-Britain or "none" for no country, for example)leftMin
- the minimum number of letters before the hyphenrightMin
- the minimum number of letters after the hyphenpublic String getHyphenSymbol()
getHyphenSymbol
in interface HyphenationEvent
public String getHyphenatedWordPre(String word, BaseFont font, float fontSize, float remainingWidth)
getHyphenatedWordPost()
.getHyphenatedWordPre
in interface HyphenationEvent
word
- the word to hyphenatefont
- the font used by this wordfontSize
- the font size used by this wordremainingWidth
- the width available to fit this word inpublic String getHyphenatedWordPost()
getHyphenatedWordPre()
.getHyphenatedWordPost
in interface HyphenationEvent
Copyright © 2018. All rights reserved.