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

22 lines
540 B
Kotlin
Raw Normal View History

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