Class TextPatternBuilder
java.lang.Object
com.luciad.layers.styles.complexstrokes.builders.TextPatternBuilder
- All Implemented Interfaces:
AutoCloseable
Creates a pattern containing text.
- Since:
- 2023.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the text pattern as configured.void
close()
protected void
finalize()
offset
(double offset) Sets the offset of the text, relative to the base line, in pixels.rotateUp
(boolean rotateUp) Indicates if the text should be flipped when it is turned upside down.Sets the text as a single line.Sets multiple lines of text, with each element being a separate line.Sets the style of the text.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
build
Build the text pattern as configured.- Returns:
- the
ComplexStrokePattern
. - Throws:
IllegalStateException
- when the text has not been set.
-
text
Sets the text as a single line.- Parameters:
text
- the text to be displayed.- Returns:
- this builder.
-
text
@NotNull public TextPatternBuilder text(@NotNull List<@NotNull String> text) throws IllegalArgumentException Sets multiple lines of text, with each element being a separate line.- Parameters:
text
- the text to be displayed. May not be empty.- Returns:
- this builder.
- Throws:
IllegalArgumentException
- text may not be empty.
-
textStyle
Sets the style of the text.- Parameters:
textStyle
- the style of the text.- Returns:
- this builder.
-
rotateUp
Indicates if the text should be flipped when it is turned upside down.Defaults to true.
- Parameters:
rotateUp
- if the text should be flipped when it is turned upside down.- Returns:
- this builder.
-
offset
Sets the offset of the text, relative to the base line, in pixels.Defaults to
0
.- Parameters:
offset
- the offset of the text.- Returns:
- this builder.
-