aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2017-11-25 13:39:39 +0100
committerRobert Jaros <rjaros@finn.pl>2017-11-25 13:39:39 +0100
commit343390df5a0e01f45539939291c35d535a1b8af6 (patch)
treefcba5b87efa1b740bd5a011739af1e066cba28f0 /src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt
parent4a31ea44d479358658a614ad56a5675436260813 (diff)
downloadkvision-343390df5a0e01f45539939291c35d535a1b8af6.tar.gz
kvision-343390df5a0e01f45539939291c35d535a1b8af6.tar.bz2
kvision-343390df5a0e01f45539939291c35d535a1b8af6.zip
Form validation
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt
index cac5c79b..dac5867c 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt
@@ -1,6 +1,6 @@
package pl.treksoft.kvision.panel
-import pl.treksoft.kvision.core.Widget
+import pl.treksoft.kvision.core.Component
import pl.treksoft.kvision.core.WidgetWrapper
import pl.treksoft.kvision.snabbdom.StringPair
@@ -112,23 +112,23 @@ open class GridPanel(autoColumns: String? = null, autoRows: String? = null, auto
}
@Suppress("LongParameterList")
- fun add(child: Widget, columnStart: Int? = null, rowStart: Int? = null,
+ fun add(child: Component, columnStart: Int? = null, rowStart: Int? = null,
columnEnd: String? = null, rowEnd: String? = null, area: String? = null, justifySelf: GRIDJUSTIFY? = null,
alignSelf: GRIDALIGN? = null, classes: Set<String> = setOf()): GridPanel {
addInternal(GridWrapper(child, columnStart, rowStart, columnEnd, rowEnd, area, justifySelf, alignSelf, classes))
return this
}
- override fun add(child: Widget): GridPanel {
+ override fun add(child: Component): GridPanel {
return add(child, null, null)
}
- override fun addAll(children: List<Widget>): GridPanel {
+ override fun addAll(children: List<Component>): GridPanel {
children.forEach { add(it, null, null) }
return this
}
- override fun remove(child: Widget): GridPanel {
+ override fun remove(child: Component): GridPanel {
children.find { (it as GridWrapper).delegate == child }?.let {
super.remove(it)
it.dispose()
@@ -190,7 +190,7 @@ open class GridPanel(autoColumns: String? = null, autoRows: String? = null, auto
}
}
-class GridWrapper(delegate: Widget, private val columnStart: Int? = null, private val rowStart: Int? = null,
+class GridWrapper(delegate: Component, private val columnStart: Int? = null, private val rowStart: Int? = null,
private val columnEnd: String? = null, private val rowEnd: String? = null,
private val area: String? = null, private val justifySelf: GRIDJUSTIFY? = null,
private val alignSelf: GRIDALIGN? = null,