aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/data
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2017-11-03 15:52:47 +0100
committerRobert Jaros <rjaros@finn.pl>2017-11-03 15:52:47 +0100
commit398cfa0a80bc10c6580557e9688ba4390b89917b (patch)
tree1c0f4e9701fec484bfd32e4d730078aa970e45d9 /src/main/kotlin/pl/treksoft/kvision/data
parent960a82bafa9e9b1a8e07b0eaa20d5eebb72aabc2 (diff)
downloadkvision-398cfa0a80bc10c6580557e9688ba4390b89917b.tar.gz
kvision-398cfa0a80bc10c6580557e9688ba4390b89917b.tar.bz2
kvision-398cfa0a80bc10c6580557e9688ba4390b89917b.zip
Select form component
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/data')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/data/DataContainer.kt16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/data/DataContainer.kt b/src/main/kotlin/pl/treksoft/kvision/data/DataContainer.kt
index 3b6d3aa8..5af2eb66 100644
--- a/src/main/kotlin/pl/treksoft/kvision/data/DataContainer.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/data/DataContainer.kt
@@ -7,8 +7,8 @@ import pl.treksoft.kvision.core.Widget
import pl.treksoft.kvision.panel.VPanel
class DataContainer<M : DataComponent, C : Widget>(val model: ObservableList<M>,
- private val binding: (M, Int) -> C,
- private val child: Container = VPanel()) :
+ private val binding: (M, Int) -> C,
+ private val child: Container = VPanel()) :
Widget(setOf()), Container, DataUpdatable {
override var visible
@@ -26,19 +26,23 @@ class DataContainer<M : DataComponent, C : Widget>(val model: ObservableList<M>,
}
override fun add(child: Widget): Container {
- return this.child.add(child)
+ this.child.add(child)
+ return this
}
override fun addAll(children: List<Widget>): Container {
- return this.child.addAll(children)
+ this.child.addAll(children)
+ return this
}
override fun remove(child: Widget): Container {
- return this.child.remove(child)
+ this.child.remove(child)
+ return this
}
override fun removeAll(): Container {
- return this.child.removeAll()
+ this.child.removeAll()
+ return this
}
override fun getChildren(): List<Widget> {