aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.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/TabPanel.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/TabPanel.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt
index 4190dbae..e60d9480 100644
--- a/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/panel/TabPanel.kt
@@ -1,7 +1,7 @@
package pl.treksoft.kvision.panel
+import pl.treksoft.kvision.core.Component
import pl.treksoft.kvision.core.ResString
-import pl.treksoft.kvision.core.Widget
import pl.treksoft.kvision.html.Link
import pl.treksoft.kvision.html.TAG
import pl.treksoft.kvision.html.Tag
@@ -25,7 +25,7 @@ open class TabPanel : SimplePanel(setOf()) {
this.addInternal(content)
}
- open fun addTab(title: String, panel: Widget, icon: String? = null,
+ open fun addTab(title: String, panel: Component, icon: String? = null,
image: ResString? = null): TabPanel {
val tag = Tag(TAG.LI)
tag.role = "presentation"
@@ -53,16 +53,16 @@ open class TabPanel : SimplePanel(setOf()) {
return this
}
- override fun add(child: Widget): TabPanel {
+ override fun add(child: Component): TabPanel {
return addTab("", child)
}
- override fun addAll(children: List<Widget>): TabPanel {
+ override fun addAll(children: List<Component>): TabPanel {
children.forEach { add(it) }
return this
}
- override fun remove(child: Widget): TabPanel {
+ override fun remove(child: Component): TabPanel {
val index = content.children.indexOf(child)
return removeTab(index)
}