Package-level declarations

Functions

Link copied to clipboard
inline fun <T : Element> Element.asOrNull(): T?

Casts the element to the specified class or returns null if it's not an instance of this class.

Link copied to clipboard
inline fun <T : Element> T.cell(): Cell<T>?

Returns the Cell of this element or null if it's not added to a table

Link copied to clipboard
inline fun <T : Element> Element.findElement(elementName: String? = null): T

Finds an element by its name and type. Can return the current element. If elementName is null, only the type is accounted for.

Link copied to clipboard
inline fun <T : Element> Element.findOrNull(elementName: String? = null): T?

Finds an element by its type and name. Can return the current element. If elementName is null, only the type is accounted for.

Link copied to clipboard
@JvmName(name = "setFontLabel")
fun <T : Label> Cell<T>.font(font: Font): Cell<T>

Creates a copy of the wrapped label's style and changes its font.

@JvmName(name = "setFontButton")
fun <T : TextButton> Cell<T>.font(font: Font): Cell<T>

Creates a copy of the wrapped button's label's style and changes its font.

@JvmName(name = "setFontField")
fun <T : TextField> Cell<T>.font(font: Font): Cell<T>

Creates a copy of the wrapped field's style and changes its font.

Link copied to clipboard
inline fun <T : Element> Cell<Element>.getAs(): T

Returns the element inside a type-erased cell, casted to the providen class

Link copied to clipboard
inline fun <T : Element> Cell<Element?>.getAsOrNull(): T?

Returns the element inside a type-erased cell, casting it to the providen class, or null if it's not an instance of this class or if the cell is empty

Link copied to clipboard
fun <T : Element> Cell<T>.rowPer(number: Int): Cell<T>
Link copied to clipboard
fun <T : Element> Cell<T>.scaleFont(scale: Float): Cell<T>

Changes the font size of the wrapped label or text button and returns the cell

Link copied to clipboard
fun <T : Element> Cell<T>.scaleImage(scaling: Scaling): Cell<T>

Changes Scaling of the wrapped image and returns the cell

Link copied to clipboard
fun Label.setFont(font: Font)

Creates a copy of this label's style and changes its font.

fun TextButton.setFont(font: Font)

Creates a copy of this button's label's style and changes its font.

fun TextField.setFont(font: Font)

Creates a copy of this field's style and changes its font.

Link copied to clipboard
fun Element.shrink(invalidateParents: Boolean = false)

Reduces the size of the element to (0, 0) and invalidates it, effectively reducing its size to the minimum. Label is an exception: itd width is set to its preferred width due to how labels work.

Link copied to clipboard
inline fun <T : Element> T.updateFirst(crossinline action: (T) -> Unit)

Adds a new update listener that invokes before this element's update listener finishes. Allows chaining listeners.

inline fun <T : Element> Cell<T>.updateFirst(crossinline action: (T) -> Unit)

Adds a new update listener that invokes before the wrapped element's update listener finishes. Allows chaining listeners.

Link copied to clipboard
inline fun <T : Element> T.updateLast(crossinline action: (T) -> Unit)

Adds a new update listener that invokes after this element's own update listener finishes. Allows chaining listeners.

inline fun <T : Element> Cell<T>.updateLast(crossinline action: (T) -> Unit)

Adds a new update listener that invokes after the wrapped element's own update listener finishes. Allows chaining listeners.

Properties

Link copied to clipboard

Text of the label

var TextButton.content: CharSequence

Text of the label inside of the text button

var TextField.content: String

Text of the text field

Link copied to clipboard
var TextField.hint: String?

Hint of the text field. Displayed when there's no text in the said field.