Package org.daisy.dotify.api.formatter
Class TextBlockProperties.Builder
- java.lang.Object
-
- org.daisy.dotify.api.formatter.TextBlockProperties.Builder
-
- Enclosing class:
- TextBlockProperties
public static class TextBlockProperties.Builder extends Object
Provides a builder for text block properties.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextBlockProperties.Builder
align(FormattingTypes.Alignment align)
Sets the alignment for the block.TextBlockProperties
build()
Creates a new text block properties object.TextBlockProperties.Builder
firstLineIndent(int firstLineIndent)
Set the first line indent for the block, in characters.TextBlockProperties.Builder
identifier(String identifier)
Sets the identifier for the block.TextBlockProperties.Builder
rightLastLineIndent(int rightLastLineIndent)
Set the right last line indent for the block, in characters.TextBlockProperties.Builder
rightTextIndent(int rightTextIndent)
Set the right text indent for the block, in characters.TextBlockProperties.Builder
rowSpacing(float value)
Sets the row spacing for the block.TextBlockProperties.Builder
textIndent(int textIndent)
Set the text indent for the block, in characters.
-
-
-
Method Detail
-
textIndent
public TextBlockProperties.Builder textIndent(int textIndent)
Set the text indent for the block, in characters. The text indent controls the indent of all text rows except the first one, seefirstLineIndent(int)
. The text indent is applied to text directly within the block, but is not inherited to block children.- Parameters:
textIndent
- the indent, in characters- Returns:
- returns "this" object
-
firstLineIndent
public TextBlockProperties.Builder firstLineIndent(int firstLineIndent)
Set the first line indent for the block, in characters. The first line indent controls the indent of the first text row in a block. The first line indent is applied to text directly within the block, but is not inherited to block children.- Parameters:
firstLineIndent
- the indent, in characters.- Returns:
- returns "this" object
-
rightTextIndent
public TextBlockProperties.Builder rightTextIndent(int rightTextIndent)
Set the right text indent for the block, in characters. The right text indent controls the right indent of all text rows except the last one, seerightLastLineIndent(int)
. The indent is applied to text directly within the block, but is not inherited to block children.- Parameters:
rightTextIndent
- the indent, in characters- Returns:
- returns "this" object
-
rightLastLineIndent
public TextBlockProperties.Builder rightLastLineIndent(int rightLastLineIndent)
Set the right last line indent for the block, in characters. The right last line indent controls the right indent of the last text row in a block. The indent is applied to text directly within the block, but is not inherited to block children.- Parameters:
rightLastLineIndent
- the indent, in characters.- Returns:
- returns "this" object
-
align
public TextBlockProperties.Builder align(FormattingTypes.Alignment align)
Sets the alignment for the block.- Parameters:
align
- the alignment- Returns:
- returns "this" object
-
rowSpacing
public TextBlockProperties.Builder rowSpacing(float value)
Sets the row spacing for the block.- Parameters:
value
- the row spacing- Returns:
- returns this builder
-
identifier
public TextBlockProperties.Builder identifier(String identifier)
Sets the identifier for the block.- Parameters:
identifier
- the identifier- Returns:
- returns this builder
-
build
public TextBlockProperties build()
Creates a new text block properties object.- Returns:
- returns a new instance
-
-