ComponentBuilder

class ComponentBuilder

A builder that makes components easy to use from Kotlin.

Constructors

ComponentBuilder
Link copied to clipboard
fun ComponentBuilder()

Functions

append
Link copied to clipboard
fun append(text: String): ComponentBuilder
fun append(component: Component): ComponentBuilder

Add text.

fun append(text: String, color: Color): ComponentBuilder

Adds text with a specified color.

fun append(text: String, vararg decorations: TextDecoration): ComponentBuilder

Add text with decoration.

fun append(text: String, color: Color, vararg decorations: TextDecoration): ComponentBuilder

Adds text with color, decorations

appendln
Link copied to clipboard
fun appendln(): ComponentBuilder

Adds line break.

fun appendln(text: String): ComponentBuilder

Adds text with line break.

fun appendln(component: Component): ComponentBuilder

Adds component with line breaks.

fun appendln(text: String, color: Color): ComponentBuilder

Adds colored text with line breaks.

fun appendln(text: String, vararg decorations: TextDecoration): ComponentBuilder

Adds decorated text with line breaks.

fun appendln(text: String, color: Color, vararg decorations: TextDecoration): ComponentBuilder

Adds decorated colored text with line breaks.

bold
Link copied to clipboard
fun bold(text: String): ComponentBuilder

Adds bold text.

fun bold(text: String, color: Color): ComponentBuilder

Adds bold text with color.

fun bold(text: String, vararg decorations: TextDecoration): ComponentBuilder

Adds bold text with decorations

fun bold(text: String, color: Color, vararg decorations: TextDecoration): ComponentBuilder

Adds bold text with color, decorations

boldColor
Link copied to clipboard
infix fun String.boldColor(color: Color)

Adds colored text with line break

boldColorln
Link copied to clipboard
infix fun String.boldColorln(color: Color)

Adds colored bold text wit hline break

boldln
Link copied to clipboard
fun boldln(text: String): ComponentBuilder

Adds bold text with line breaks.

fun boldln(text: String, color: Color): ComponentBuilder

Adds colored bold text with line breaks.

fun boldln(text: String, vararg decorations: TextDecoration): ComponentBuilder

Adds decorated bold text with line breaks.

fun boldln(text: String, color: Color, vararg decorations: TextDecoration): ComponentBuilder

Adds decorated colored text with line breaks.

color
Link copied to clipboard
infix fun String.color(color: Color)

Adds colored text

colorln
Link copied to clipboard
infix fun String.colorln(color: Color)

Adds colored bold text

unaryPlus
Link copied to clipboard
operator fun String.unaryPlus()

Adds text with unaryPlus

operator fun Component.unaryPlus()

Adds component with unaryPlus