Package org.daisy.dotify.api.translator
Class DefaultTextAttribute.Builder
- java.lang.Object
-
- org.daisy.dotify.api.translator.DefaultTextAttribute.Builder
-
- Enclosing class:
- DefaultTextAttribute
public static class DefaultTextAttribute.Builder extends Object
Provides a builder for a default text attribute
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultTextAttribute.Builder
add(int val)
Adds a new attribute with the specified widthDefaultTextAttribute.Builder
add(TextAttribute data)
Adds a text attribute to the list of attributesDefaultTextAttribute
build(int length)
Creates a new default text attribute based on the current state of the builder
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a new builder
-
Builder
public Builder(String attribute)
Creates a new builder with the specified attribute name- Parameters:
attribute
- the attribute name
-
-
Method Detail
-
add
public DefaultTextAttribute.Builder add(TextAttribute data)
Adds a text attribute to the list of attributes- Parameters:
data
- the attribute- Returns:
- returns this builder
-
add
public DefaultTextAttribute.Builder add(int val)
Adds a new attribute with the specified width- Parameters:
val
- the width of the attribute- Returns:
- returns this builder
-
build
public DefaultTextAttribute build(int length)
Creates a new default text attribute based on the current state of the builder- Parameters:
length
- the total length of the contained attributes- Returns:
- returns a new default text attribute
-
-