Class FormatterConfiguration.Builder

  • Enclosing class:
    FormatterConfiguration

    public static class FormatterConfiguration.Builder
    extends Object
    Provides a builder for formatter configuration.
    • Constructor Detail

      • Builder

        public Builder​(String locale,
                       String mode)
        Creates a new builder with the specified properties.
        Parameters:
        locale - the locale
        mode - the braille translation mode
    • 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
      • allowsEndingPageOnHyphen

        public FormatterConfiguration.Builder allowsEndingPageOnHyphen​(boolean value)
        Sets the hyphenation policy for the last line (of the main flow) in each page.
        Parameters:
        value - true if the last line may be hyphenated, false otherwise.
        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. If the FormatterConfiguration.allowsEndingPageOnHyphen() setting is false, it overrides this setting.
        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
      • build

        public FormatterConfiguration build()
        Creates new configuration.
        Returns:
        returns a new configuration instance