ComponentDecorations

object ComponentDecorations

This object contains functions for creating component decorations.

Functions

border
Link copied to clipboard
common
fun border(border: Border = Border.newBuilder().build(), renderingMode: ComponentDecorationRenderer.RenderingMode = NON_INTERACTIVE): ComponentDecorationRenderer
Can be used to draw a border around a Component.
box
Link copied to clipboard
common
fun box(boxType: BoxType = BoxType.SINGLE, title: String = "", renderingMode: ComponentDecorationRenderer.RenderingMode = NON_INTERACTIVE): ComponentDecorationRenderer
Can be used to draw a box (using box drawing characters) around a Component.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
halfBlock
Link copied to clipboard
common
fun halfBlock(renderingMode: ComponentDecorationRenderer.RenderingMode = NON_INTERACTIVE): ComponentDecorationRenderer
Can be used to add a half box decoration (half-height "border") to a Component.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
padding
Link copied to clipboard
common
fun padding(value: Int): ComponentDecorationRenderer
Can be used to add padding to a Component.
fun padding(y: Int, x: Int): ComponentDecorationRenderer
Can be used to add padding to a Component.
fun padding(top: Int, right: Int, bottom: Int, left: Int): ComponentDecorationRenderer
Can be used to add padding to a Component.
shadow
Link copied to clipboard
common
fun shadow(): ComponentDecorationRenderer
Can be used to draw a shadow around a Component.
side
Link copied to clipboard
common
fun side(leftSideCharacter: Char = '[', rightSideCharacter: Char = ']', renderingMode: ComponentDecorationRenderer.RenderingMode = RenderingMode.INTERACTIVE): ComponentDecorationRenderer
Wraps a Component on the left and the right sides with the given leftSideCharacter and rightSideCharacter.
toString
Link copied to clipboard
common
open fun toString(): String

Sources

(source)
Link copied to clipboard