Package org.daisy.dotify.api.formatter
Class LayoutMasterProperties.Builder
- java.lang.Object
-
- org.daisy.dotify.api.formatter.LayoutMasterProperties.Builder
-
- Enclosing class:
- LayoutMasterProperties
public static class LayoutMasterProperties.Builder extends Object
Configuration class for a ConfigurableLayoutMaster
-
-
Constructor Summary
Constructors Constructor Description Builder(int pageWidth, int pageHeight)
Creates a new builder for layout master properties with the specified width and height.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LayoutMasterProperties.Builder
border(TextBorderStyle border)
Sets a border surrounding the entire page.LayoutMasterProperties
build()
Creates a new LayoutMasterProperties based on the current state of the builder.LayoutMasterProperties.Builder
duplex(boolean value)
Sets the duplex property, in other words whether to use both sides of a sheet or not.LayoutMasterProperties.Builder
innerMargin(int value)
Sets the inner margin, that is to say the margin closest to the binding edge of the page.LayoutMasterProperties.Builder
outerMargin(int value)
Sets the outer margin, that is to say the margin opposite to the binding edge of the page.LayoutMasterProperties.Builder
rowSpacing(float value)
Sets the row spacing, that is to say the distance between two consecutive rows of text.
-
-
-
Method Detail
-
innerMargin
public LayoutMasterProperties.Builder innerMargin(int value)
Sets the inner margin, that is to say the margin closest to the binding edge of the page.- Parameters:
value
- the inner margin, in characters- Returns:
- returns this builder
-
outerMargin
public LayoutMasterProperties.Builder outerMargin(int value)
Sets the outer margin, that is to say the margin opposite to the binding edge of the page.- Parameters:
value
- the outer margin, in characters- Returns:
- returns this builder
-
rowSpacing
public LayoutMasterProperties.Builder rowSpacing(float value)
Sets the row spacing, that is to say the distance between two consecutive rows of text.- Parameters:
value
- the row spacing, in character heights- Returns:
- returns this builder
- Throws:
IllegalArgumentException
- if the value is <1
-
duplex
public LayoutMasterProperties.Builder duplex(boolean value)
Sets the duplex property, in other words whether to use both sides of a sheet or not. If set to true, both sides of a sheet should be used. If set to false, only one side of a sheet should be used.- Parameters:
value
- the value- Returns:
- returns this builder
-
border
public LayoutMasterProperties.Builder border(TextBorderStyle border)
Sets a border surrounding the entire page.- Parameters:
border
- the border- Returns:
- returns this builder
-
build
public LayoutMasterProperties build()
Creates a new LayoutMasterProperties based on the current state of the builder.- Returns:
- returns a new instance
-
-