Package org.apache.fop.fo.properties
Class CommonHyphenation
java.lang.Object
org.apache.fop.fo.properties.CommonHyphenation
Store all common hyphenation properties.
See Sec. 7.9 of the XSL-FO Standard.
Public "structure" allows direct member access.
-
Field Summary
Modifier and TypeFieldDescriptionfinal StringProperty
The "country" propertyfinal EnumProperty
The "hyphenate" propertyThe "hyphenation-character" propertyfinal NumberProperty
The "hyphenation-push-character-count" propertyfinal NumberProperty
The "hyphenation-remain-character-count" propertyfinal StringProperty
The "language" propertyfinal StringProperty
The "script" property -
Method Summary
Modifier and TypeMethodDescriptionboolean
getHyphChar
(Font font) Returns the effective hyphenation character for a font.int
getHyphIPD
(Font font) Returns the IPD for the hyphenation character for a font.static CommonHyphenation
getInstance
(PropertyList propertyList) Gets the canonicalCommonHyphenation
instance corresponding to the values of the related properties present on the givenPropertyList
Creates and returns aLocale
representation of the language and country.int
hashCode()
static Locale
Creates and returns aLocale
representation of the given language, and the given country if set.
-
Field Details
-
language
The "language" property -
country
The "country" property -
script
The "script" property -
hyphenate
The "hyphenate" property -
hyphenationCharacter
The "hyphenation-character" property -
hyphenationPushCharacterCount
The "hyphenation-push-character-count" property -
hyphenationRemainCharacterCount
The "hyphenation-remain-character-count" property
-
-
Method Details
-
getInstance
Gets the canonicalCommonHyphenation
instance corresponding to the values of the related properties present on the givenPropertyList
- Parameters:
propertyList
- thePropertyList
- Returns:
- a common hyphenation instance
- Throws:
PropertyException
- if a a property exception occurs
-
getHyphChar
Returns the effective hyphenation character for a font. The hyphenation character specified in XSL-FO may be substituted if it's not available in the font.- Parameters:
font
- the font- Returns:
- the effective hyphenation character.
-
getHyphIPD
Returns the IPD for the hyphenation character for a font.- Parameters:
font
- the font- Returns:
- the IPD in millipoints for the hyphenation character.
-
getLocale
Creates and returns aLocale
representation of the language and country.- Returns:
- the language (and the country if set) represented as a locale,
null
if the language has not been set (i.e., has been left to its initial value of "none")
-
toLocale
Creates and returns aLocale
representation of the given language, and the given country if set. The country is considered to be set if notnull
and not set to "none".- Returns:
- the language and country represented as a locale,
null
if the language is null or "none" (case insensitive)
-
equals
-
hashCode
public int hashCode()
-