aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/data
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-01-31 13:47:26 +0100
committerRobert Jaros <rjaros@finn.pl>2018-01-31 13:47:26 +0100
commitbfbca8460894af40dd53380c8f0d3384a470bc41 (patch)
tree95cd678d5bfbb45affbea512506e40f063cec162 /src/main/kotlin/pl/treksoft/kvision/data
parent9c5324999e486eafbc3db63189c390b7c86a824e (diff)
downloadkvision-bfbca8460894af40dd53380c8f0d3384a470bc41.tar.gz
kvision-bfbca8460894af40dd53380c8f0d3384a470bc41.tar.bz2
kvision-bfbca8460894af40dd53380c8f0d3384a470bc41.zip
Data component refactoring
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/data')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/data/DataComponent.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/data/DataComponent.kt b/src/main/kotlin/pl/treksoft/kvision/data/DataComponent.kt
index 605e1e2e..6eef6f98 100644
--- a/src/main/kotlin/pl/treksoft/kvision/data/DataComponent.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/data/DataComponent.kt
@@ -4,8 +4,8 @@ import kotlin.properties.ObservableProperty
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
-open class DataComponent {
- var container: DataUpdatable? = null
+interface DataComponent {
+ var container: DataUpdatable?
fun <T> obs(initialValue: T): ReadWriteProperty<Any?, T> = object : ObservableProperty<T>(initialValue) {
override fun afterChange(property: KProperty<*>, oldValue: T, newValue: T) {
@@ -13,3 +13,7 @@ open class DataComponent {
}
}
}
+
+open class BaseDataComponent : DataComponent {
+ override var container: DataUpdatable? = null
+}