PhysicalConnectivity/src/main/kotlin/net/shadowfacts/cacao/view/textfield/TextField.kt

22 lines
535 B
Kotlin

package net.shadowfacts.cacao.view.textfield
/**
* A simple, no-frills text field. This text field accepts any value.
*
* @author shadowfacts
* @param initialText The initial value of this text field.
* @param handler A function that is invoked when the value of the text field changes.
*/
class TextField(
initialText: String,
handler: ((TextField) -> Unit)? = null
): AbstractTextField<TextField>(initialText) {
init {
this.handler = handler
}
override fun validate(proposedText: String): Boolean {
return true
}
}