-
- All Implemented Interfaces:
-
org.readium.r2.navigator.preferences.PreferencesEditor
public final class EpubPreferencesEditor implements PreferencesEditor<EpubPreferences>
Editor for a set of EpubPreferences.
Use EpubPreferencesEditor to assist you in building a preferences user interface or modifying existing preferences. It includes rules for adjusting preferences, such as the supported values or ranges.
-
-
Field Summary
-
Method Summary
Modifier and Type Method Description EpubPreferencesgetPreferences()final Preference<Color>getBackgroundColor()Default background color. final EnumPreference<ColumnCount>getColumnCount()Number of reflowable columns to display (one-page view or two-page spread). final Preference<FontFamily>getFontFamily()Default typeface for the text. final RangePreference<Double>getFontSize()Base text font size as a percentage. final RangePreference<Double>getFontWeight()Default boldness for the text as a percentage. final Preference<Boolean>getHyphens()Enable hyphenation for latin languages. final EnumPreference<ImageFilter>getImageFilter()Filter applied to images in dark theme. final Preference<Language>getLanguage()Language of the publication content. final RangePreference<Double>getLetterSpacing()Space between letters. final Preference<Boolean>getLigatures()Enable ligatures in Arabic. final RangePreference<Double>getLineHeight()Leading line height. final RangePreference<Double>getPageMargins()Factor applied to horizontal margins. final RangePreference<Double>getParagraphIndent()Text indentation for paragraphs. final RangePreference<Double>getParagraphSpacing()Vertical margins for paragraphs. final Preference<Boolean>getPublisherStyles()Indicates whether the original publisher styles should be observed. final EnumPreference<ReadingProgression>getReadingProgression()Direction of the reading progression across resources. final Preference<Boolean>getScroll()Indicates if the overflow of resources should be handled using scrolling instead of synthetic pagination. final EnumPreference<Spread>getSpread()Indicates if the fixed-layout publication should be rendered with a synthetic spread (dual-page). final EnumPreference<TextAlign>getTextAlign()Page text alignment. final Preference<Color>getTextColor()Default page text color. final Preference<Boolean>getTextNormalization()Normalize text styles to increase accessibility. final EnumPreference<Theme>getTheme()Reader theme (light, dark, sepia). final RangePreference<Double>getTypeScale()Scale applied to all element font sizes. final Preference<Boolean>getVerticalText()Indicates whether the text should be laid out vertically. final RangePreference<Double>getWordSpacing()Space between words. final EpubLayoutgetLayout()Unitclear()Reset all preferences. -
-
Method Detail
-
getPreferences
EpubPreferences getPreferences()
-
getBackgroundColor
final Preference<Color> getBackgroundColor()
Default background color.
For fixed-layout publications, it applies to the navigator background but not the publication pages.
When unset, the current theme background color is effective.
-
getColumnCount
final EnumPreference<ColumnCount> getColumnCount()
Number of reflowable columns to display (one-page view or two-page spread).
Only effective when:
the publication is reflowable
scroll is off
-
getFontFamily
final Preference<FontFamily> getFontFamily()
Default typeface for the text.
Only effective with reflowable publications.
-
getFontSize
final RangePreference<Double> getFontSize()
Base text font size as a percentage. Default to 100%.
Note that allowing a font size that is too large could break the pagination.
Only effective with reflowable publications.
-
getFontWeight
final RangePreference<Double> getFontWeight()
Default boldness for the text as a percentage.
If you want to change the boldness of all text, including headers, you can use this with textNormalization.
Only effective with reflowable publications.
-
getHyphens
final Preference<Boolean> getHyphens()
Enable hyphenation for latin languages.
Only effective when:
the publication is reflowable
publisherStyles is off
the layout is LTR
-
getImageFilter
final EnumPreference<ImageFilter> getImageFilter()
Filter applied to images in dark theme.
Only effective when:
the publication is reflowable
the theme is set to Theme.DARK
-
getLanguage
final Preference<Language> getLanguage()
Language of the publication content.
This has an impact on the resolved layout (e.g. LTR, RTL).
-
getLetterSpacing
final RangePreference<Double> getLetterSpacing()
Space between letters.
Only effective when:
the publication is reflowable
publisherStyles is off
the layout is LTR
-
getLigatures
final Preference<Boolean> getLigatures()
Enable ligatures in Arabic.
Only effective when:
the publication is reflowable
publisherStyles is off
the layout is RTL
-
getLineHeight
final RangePreference<Double> getLineHeight()
-
getPageMargins
final RangePreference<Double> getPageMargins()
Factor applied to horizontal margins. Default to 1.
Only effective with reflowable publications.
-
getParagraphIndent
final RangePreference<Double> getParagraphIndent()
Text indentation for paragraphs.
Only effective when:
the publication is reflowable
publisherStyles is off
the layout is LTR or RTL
-
getParagraphSpacing
final RangePreference<Double> getParagraphSpacing()
Vertical margins for paragraphs.
Only effective when:
the publication is reflowable
publisherStyles is off
-
getPublisherStyles
final Preference<Boolean> getPublisherStyles()
Indicates whether the original publisher styles should be observed. Many advanced settings require this to be off.
Only effective with reflowable publications.
-
getReadingProgression
final EnumPreference<ReadingProgression> getReadingProgression()
Direction of the reading progression across resources.
This can be changed to influence directly the layout (e.g. LTR or RTL).
-
getScroll
final Preference<Boolean> getScroll()
Indicates if the overflow of resources should be handled using scrolling instead of synthetic pagination.
Only effective with reflowable publications.
-
getSpread
final EnumPreference<Spread> getSpread()
Indicates if the fixed-layout publication should be rendered with a synthetic spread (dual-page).
Only effective with fixed-layout publications.
-
getTextAlign
final EnumPreference<TextAlign> getTextAlign()
Page text alignment.
Only effective when:
the publication is reflowable
publisherStyles is off
the layout is LTR or RTL
-
getTextColor
final Preference<Color> getTextColor()
Default page text color.
When unset, the current theme text color is effective. Only effective with reflowable publications.
-
getTextNormalization
final Preference<Boolean> getTextNormalization()
Normalize text styles to increase accessibility.
Only effective with reflowable publications.
-
getTheme
final EnumPreference<Theme> getTheme()
Reader theme (light, dark, sepia).
Only effective with reflowable publications.
-
getTypeScale
final RangePreference<Double> getTypeScale()
Scale applied to all element font sizes.
Only effective when:
the publication is reflowable
publisherStyles is off
-
getVerticalText
final Preference<Boolean> getVerticalText()
Indicates whether the text should be laid out vertically. This is used for example with CJK languages. This setting is automatically derived from the language if no preference is given.
Only effective with reflowable publications.
-
getWordSpacing
final RangePreference<Double> getWordSpacing()
Space between words.
Only effective when:
the publication is reflowable
the layout is LTR
-
getLayout
final EpubLayout getLayout()
-
-
-
-