Package org.daisy.dotify.api.formatter
Class FormatterConfiguration.Builder
- java.lang.Object
-
- org.daisy.dotify.api.formatter.FormatterConfiguration.Builder
-
- Enclosing class:
- FormatterConfiguration
public static class FormatterConfiguration.Builder extends Object
Provides a builder for formatter configuration
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormatterConfiguration.Builder
allowsEndingVolumeOnHyphen(boolean value)
Sets the hyphenation policy for the last line (of the main flow) in each volume.FormatterConfiguration.Builder
allowsTextOverflowTrimming(boolean value)
Sets the text overflow trimming policy.FormatterConfiguration
build()
Creates new configurationFormatterConfiguration.Builder
hyphenate(boolean value)
Sets the global hyphenation policyFormatterConfiguration.Builder
ignoreStyle(String style)
Adds a style to ignoreFormatterConfiguration.Builder
markCapitalLetters(boolean value)
Sets the global capital letter policy
-
-
-
Method Detail
-
allowsTextOverflowTrimming
public FormatterConfiguration.Builder allowsTextOverflowTrimming(boolean value)
Sets the text overflow trimming policy. If the value is true, text that overflows its boundaries may be truncated if needed. If the value is false, an error should be thrown and the process aborted (default).- Parameters:
value
- the value of the text overflow trimming policy- Returns:
- returns this builder
-
allowsEndingVolumeOnHyphen
public FormatterConfiguration.Builder allowsEndingVolumeOnHyphen(boolean value)
Sets the hyphenation policy for the last line (of the main flow) in each volume.- Parameters:
value
- true if the last line may be hyphenated, false otherwise.- Returns:
- returns this builder
-
hyphenate
public FormatterConfiguration.Builder hyphenate(boolean value)
Sets the global hyphenation policy- Parameters:
value
- the value of the global hyphenation policy- Returns:
- returns this builder
-
markCapitalLetters
public FormatterConfiguration.Builder markCapitalLetters(boolean value)
Sets the global capital letter policy- Parameters:
value
- the value of the capital letters policy- Returns:
- returns this builder
-
ignoreStyle
public FormatterConfiguration.Builder ignoreStyle(String style)
Adds a style to ignore- Parameters:
style
- a style to ignore- Returns:
- returns this builder
-
build
public FormatterConfiguration build()
Creates new configuration- Returns:
- returns a new configuration instance
-
-