Package org.daisy.dotify.api.formatter
Class TableProperties.Builder
- java.lang.Object
-
- org.daisy.dotify.api.formatter.TableProperties.Builder
-
- Enclosing class:
- TableProperties
public static class TableProperties.Builder extends Object
Provides a builder for creating table properties.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a new builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TableProperties.Builder
border(Border value)
Sets the border.TableProperties
build()
Creates new table properties based on the current state of this builder.TableProperties.Builder
margin(BlockSpacing value)
Sets the margin.TableProperties.Builder
padding(BlockSpacing value)
Sets the padding.TableProperties.Builder
preferredEmptySpace(int value)
Sets the preferred empty space of the table when the text content of cells are shorter than the largest possible column width.TableProperties.Builder
rowSpacing(float value)
Sets the row spacing for the resulting rows of text, that the table is made up of.TableProperties.Builder
tableColSpacing(int value)
Sets the table column spacing.TableProperties.Builder
tableRowSpacing(int value)
Sets the table row spacing.
-
-
-
Method Detail
-
tableRowSpacing
public TableProperties.Builder tableRowSpacing(int value)
Sets the table row spacing.- Parameters:
value
- the table row spacing- Returns:
- this builder
- Throws:
IllegalArgumentException
- if the value is less than zero
-
tableColSpacing
public TableProperties.Builder tableColSpacing(int value)
Sets the table column spacing.- Parameters:
value
- the table column spacing- Returns:
- this builder
- Throws:
IllegalArgumentException
- if the value is less than zero
-
preferredEmptySpace
public TableProperties.Builder preferredEmptySpace(int value)
Sets the preferred empty space of the table when the text content of cells are shorter than the largest possible column width.- Parameters:
value
- the number of character positions to preferably leave empty- Returns:
- returns this builder
-
rowSpacing
public TableProperties.Builder rowSpacing(float value)
Sets the row spacing for the resulting rows of text, that the table is made up of.- Parameters:
value
- the row spacing- Returns:
- returns this object
-
margin
public TableProperties.Builder margin(BlockSpacing value)
Sets the margin.- Parameters:
value
- the margin- Returns:
- returns this object
-
padding
public TableProperties.Builder padding(BlockSpacing value)
Sets the padding.- Parameters:
value
- the padding- Returns:
- returns this object
-
border
public TableProperties.Builder border(Border value)
Sets the border.- Parameters:
value
- the border- Returns:
- returns this object
-
build
public TableProperties build()
Creates new table properties based on the current state of this builder.- Returns:
- returns new table properties
-
-