Skip to content

Commit

Permalink
Refined TableViewDirtyTest test app
Browse files Browse the repository at this point in the history
  • Loading branch information
Edvin Syse committed Jan 17, 2017
1 parent 1c74031 commit 4c397c1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/tornadofx/Component.kt
Expand Up @@ -296,6 +296,14 @@ abstract class UIComponent(viewTitle: String? = "") : Component(), EventTarget {
open val refreshable: BooleanExpression get() = properties.getOrPut("tornadofx.refreshable") { SimpleBooleanProperty(true) } as BooleanExpression
open val savable: BooleanExpression get() = properties.getOrPut("tornadofx.savable") { SimpleBooleanProperty(true) } as BooleanExpression

fun savableWhen(savable: () -> BooleanExpression) {
properties["tornadofx.savable"] = savable()
}

fun refreshableWhen(refreshable: () -> BooleanExpression) {
properties["tornadofx.refreshable"] = refreshable()
}

var onDockListeners: MutableList<(UIComponent) -> Unit>? = null
var onUndockListeners: MutableList<(UIComponent) -> Unit>? = null
val accelerators = HashMap<KeyCombination, () -> Unit>()
Expand Down

0 comments on commit 4c397c1

Please sign in to comment.