public static final class FlexTextComponent.Builder
extends java.lang.Object
FlexTextComponent builder static inner class.| Constructor and Description |
|---|
Builder(java.lang.String text)
to construct a
FlexTextComponent builder with text field. |
| Modifier and Type | Method and Description |
|---|---|
FlexTextComponent |
build()
Returns a
FlexTextComponent built from the parameters previously set. |
FlexTextComponent.Builder |
setAction(Action action)
Sets the
action and returns a reference to this Builder so that the methods can be chained together. |
FlexTextComponent.Builder |
setAlign(FlexMessageComponent.Alignment align)
Sets the
align and returns a reference to this Builder so that the methods can be chained together. |
FlexTextComponent.Builder |
setColor(java.lang.String color)
Sets the
color and returns a reference to this Builder so that the methods can be chained together. |
FlexTextComponent.Builder |
setFlex(int flex)
Sets the
flex and returns a reference to this Builder so that the methods can be chained together. |
FlexTextComponent.Builder |
setGravity(FlexMessageComponent.Gravity gravity)
Sets the
gravity and returns a reference to this Builder so that the methods can be chained together. |
FlexTextComponent.Builder |
setMargin(FlexMessageComponent.Margin margin)
Sets the
margin and returns a reference to this Builder so that the methods can be chained together. |
FlexTextComponent.Builder |
setMaxLines(int maxLines)
Sets the
maxLines and returns a reference to this Builder so that the methods can be chained together. |
FlexTextComponent.Builder |
setSize(FlexMessageComponent.Size size)
Sets the
size and returns a reference to this Builder so that the methods can be chained together. |
FlexTextComponent.Builder |
setWeight(FlexMessageComponent.Weight weight)
Sets the
weight and returns a reference to this Builder so that the methods can be chained together. |
FlexTextComponent.Builder |
setWrap(java.lang.Boolean wrap)
Sets the
wrap and returns a reference to this Builder so that the methods can be chained together. |
public Builder(@NonNull
java.lang.String text)
FlexTextComponent builder with text field.text - content text of this component.public FlexTextComponent.Builder setFlex(int flex)
flex and returns a reference to this Builder so that the methods can be chained together.flex - the flex to setpublic FlexTextComponent.Builder setMargin(@Nullable FlexMessageComponent.Margin margin)
margin and returns a reference to this Builder so that the methods can be chained together.margin - the margin to setpublic FlexTextComponent.Builder setSize(@Nullable FlexMessageComponent.Size size)
size and returns a reference to this Builder so that the methods can be chained together.size - the size to setpublic FlexTextComponent.Builder setAlign(@Nullable FlexMessageComponent.Alignment align)
align and returns a reference to this Builder so that the methods can be chained together.align - the align to setpublic FlexTextComponent.Builder setGravity(@Nullable FlexMessageComponent.Gravity gravity)
gravity and returns a reference to this Builder so that the methods can be chained together.gravity - the gravity to setpublic FlexTextComponent.Builder setWrap(@Nullable java.lang.Boolean wrap)
wrap and returns a reference to this Builder so that the methods can be chained together.wrap - the wrap to setpublic FlexTextComponent.Builder setMaxLines(int maxLines)
maxLines and returns a reference to this Builder so that the methods can be chained together.maxLines - the maxLines to setpublic FlexTextComponent.Builder setWeight(@Nullable FlexMessageComponent.Weight weight)
weight and returns a reference to this Builder so that the methods can be chained together.weight - the weight to setpublic FlexTextComponent.Builder setColor(@Nullable java.lang.String color)
color and returns a reference to this Builder so that the methods can be chained together.color - the color to setpublic FlexTextComponent.Builder setAction(@Nullable Action action)
action and returns a reference to this Builder so that the methods can be chained together.action - the action to setpublic FlexTextComponent build()
FlexTextComponent built from the parameters previously set.FlexTextComponent built with parameters of this FlexTextComponent.Builder