org.refcodes.mixin.RowHeightAccessor
, org.refcodes.mixin.RowHeightAccessor.RowHeightBuilder<VertAlignTextBuilder>
, org.refcodes.mixin.RowHeightAccessor.RowHeightMutator
, org.refcodes.mixin.RowHeightAccessor.RowHeightProperty
, Text<VertAlignTextBuilder>
, TextAccessor
, TextAccessor.TextBuilder<VertAlignTextBuilder>
, TextAccessor.TextMutator
, TextAccessor.TextProperty
, TextAccessor.TextProvider
, VertAlignTextModeAccessor
, VertAlignTextModeAccessor.VertAlignTextModeBuilder<VertAlignTextBuilder>
, VertAlignTextModeAccessor.VertAlignTextModeMutator
, VertAlignTextModeAccessor.VertAlignTextModeProperty
public class VertAlignTextBuilder extends Object implements org.refcodes.mixin.RowHeightAccessor.RowHeightBuilder<VertAlignTextBuilder>, org.refcodes.mixin.RowHeightAccessor.RowHeightProperty, Text<VertAlignTextBuilder>, VertAlignTextModeAccessor.VertAlignTextModeProperty, VertAlignTextModeAccessor.VertAlignTextModeBuilder<VertAlignTextBuilder>
VertAlignTextMode
attribute.org.refcodes.mixin.RowHeightAccessor.RowHeightBuilder<B extends org.refcodes.mixin.RowHeightAccessor.RowHeightBuilder<B>>, org.refcodes.mixin.RowHeightAccessor.RowHeightMutator, org.refcodes.mixin.RowHeightAccessor.RowHeightProperty
TextAccessor.TextBuilder<B extends TextAccessor.TextBuilder<B>>, TextAccessor.TextMutator, TextAccessor.TextProperty, TextAccessor.TextProvider
VertAlignTextModeAccessor.VertAlignTextModeBuilder<B extends VertAlignTextModeAccessor.VertAlignTextModeBuilder<B>>, VertAlignTextModeAccessor.VertAlignTextModeMutator, VertAlignTextModeAccessor.VertAlignTextModeProperty
Constructor | Description |
---|---|
VertAlignTextBuilder() |
Modifier and Type | Method | Description |
---|---|---|
VertAlignTextBuilder |
build() |
This is a convenience method for easily instantiating the according
builder.
|
char |
getFillChar() |
Retrieves the fill char from the fill char property.
|
int |
getRowHeight() |
|
String[] |
getText() |
Retrieves the text from the text property.
|
VertAlignTextMode |
getVertAlignTextMode() |
Retrieves the vertical align text mode from the vertical align text mode
property.
|
void |
setFillChar(char aFillChar) |
Sets the fill char for the fill char property.
|
void |
setRowHeight(int aRowHeight) |
|
void |
setText(String... aText) |
Sets the text for the text property.
|
void |
setVertAlignTextMode(VertAlignTextMode aVertAlignTextMode) |
Sets the vertical align text mode for the vertical align text mode
property.
|
String |
toString() |
The
String being build by the builder upon the settings of
the attributes. |
String |
toString(String... aText) |
Race condition safe shortcut for using
Text.withText(String...)
followed by TextAccessor.TextProvider.toString() . |
String[] |
toStrings() |
The
String s being build by the builder upon the settings of
the attributes. |
String[] |
toStrings(String... aText) |
Race condition safe shortcut for using
Text.withText(String...)
followed by TextAccessor.TextProvider.toStrings() . |
protected static String[] |
toTextBlock(String[] aTextBlock,
int aHeight,
char aFillChar,
VertAlignTextMode aVertAlignTextMode) |
Fills up or truncates a given text block to the provided height; filling
up or truncating depends on the
VertAlignTextMode specified, the
default is VertAlignTextMode.TOP . |
VertAlignTextBuilder |
withFillChar(char aFillChar) |
Sets the fill char for the fill char property.
|
VertAlignTextBuilder |
withRowHeight(int aRowHeight) |
|
B |
withText(String... aText) |
With text.
|
B |
withText(Collection<String> aText) |
With text.
|
VertAlignTextBuilder |
withVertAlignTextMode(VertAlignTextMode aVertAlignTextMode) |
Sets the align text mode for the align text mode property.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
letRowHeight
getText
withText
setText, setText
letText, letText
toString
letVertAlignTextMode
public VertAlignTextBuilder withFillChar(char aFillChar)
aFillChar
- The fill char to be stored by the align text mode
property.public VertAlignTextBuilder withVertAlignTextMode(VertAlignTextMode aVertAlignTextMode)
withVertAlignTextMode
in interface VertAlignTextModeAccessor.VertAlignTextModeBuilder<VertAlignTextBuilder>
aVertAlignTextMode
- The align text mode to be stored by the align
text mode property.public VertAlignTextBuilder build()
public VertAlignTextBuilder withRowHeight(int aRowHeight)
withRowHeight
in interface org.refcodes.mixin.RowHeightAccessor.RowHeightBuilder<VertAlignTextBuilder>
public void setRowHeight(int aRowHeight)
setRowHeight
in interface org.refcodes.mixin.RowHeightAccessor.RowHeightMutator
public int getRowHeight()
getRowHeight
in interface org.refcodes.mixin.RowHeightAccessor
public void setVertAlignTextMode(VertAlignTextMode aVertAlignTextMode)
setVertAlignTextMode
in interface VertAlignTextModeAccessor.VertAlignTextModeMutator
aVertAlignTextMode
- The vertical align text mode to be stored
by the font style property.public VertAlignTextMode getVertAlignTextMode()
getVertAlignTextMode
in interface VertAlignTextModeAccessor
public char getFillChar()
public void setFillChar(char aFillChar)
aFillChar
- The fill char to be stored by the align text mode
property.public String[] toStrings()
String
s being build by the builder upon the settings of
the attributes.toStrings
in interface TextAccessor.TextProvider
String
arraypublic String[] toStrings(String... aText)
Text.withText(String...)
followed by TextAccessor.TextProvider.toStrings()
. Implementation requirements: This
method must not(!) be implemented by calling Text.withText(String...)
followed by TextAccessor.TextProvider.toStrings()
(do not change the text property) as
this would not be thread safe!toStrings
in interface Text<VertAlignTextBuilder>
aText
- The text to be processed.String
arrayprotected static String[] toTextBlock(String[] aTextBlock, int aHeight, char aFillChar, VertAlignTextMode aVertAlignTextMode)
VertAlignTextMode
specified, the
default is VertAlignTextMode.TOP
. When filling up a line, a
String
filled with space (" ") characters the length of the first
element in the array is used.aTextBlock
- The text block to be filled up / truncated.aHeight
- The height of the resulting text block.aFillChar
- the fill charaVertAlignTextMode
- The mode on how to fill up the text block. The
mode can be VertAlignTextMode.BOTTOM
,
VertAlignTextMode.MIDDLE
or VertAlignTextMode.TOP
public String[] getText()
getText
in interface TextAccessor
public void setText(String... aText)
setText
in interface TextAccessor.TextMutator
aText
- The text to be stored by the text property.public B withText(String... aText)
public B withText(Collection<String> aText)
withText
in interface TextAccessor.TextBuilder<B extends Text<B>>
aText
- the textpublic String toString()
String
being build by the builder upon the settings of
the attributes. In case more then one line has been set as input and
the functionality of the builder is applied to each line in separate,
then this method returns all of them lines concatenated with a line
break between each of them (implementation depended).toString
in interface TextAccessor.TextProvider
toString
in class Object
String
public String toString(String... aText)
Text.withText(String...)
followed by TextAccessor.TextProvider.toString()
. Implementation requirements: This method
must not(!) be implemented by calling Text.withText(String...)
followed by TextAccessor.TextProvider.toString()
(do not change the text property) as this
would not be thread safe!Copyright © 2021. All rights reserved.