diff options
author | Robert Jaros <rjaros@finn.pl> | 2017-10-01 03:12:58 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2017-10-01 03:12:58 +0200 |
commit | d732f672bfbfa565c6ec4fc037381554de251ad3 (patch) | |
tree | b0a8388de30e568d2ca5b6d33c330ccdedfebe09 /src/main/kotlin/pl/treksoft/kvision/Showcase.kt | |
parent | 69826202db3424beb47923f80d86bf1412053941 (diff) | |
download | kvision-d732f672bfbfa565c6ec4fc037381554de251ad3.tar.gz kvision-d732f672bfbfa565c6ec4fc037381554de251ad3.tar.bz2 kvision-d732f672bfbfa565c6ec4fc037381554de251ad3.zip |
GridPanel, HPanel and VPanel
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/Showcase.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/Showcase.kt | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/Showcase.kt b/src/main/kotlin/pl/treksoft/kvision/Showcase.kt index 283a9236..221ac609 100644 --- a/src/main/kotlin/pl/treksoft/kvision/Showcase.kt +++ b/src/main/kotlin/pl/treksoft/kvision/Showcase.kt @@ -7,14 +7,18 @@ import pl.treksoft.kvision.core.Root import pl.treksoft.kvision.dropdown.DD.* import pl.treksoft.kvision.dropdown.DropDown import pl.treksoft.kvision.html.* +import pl.treksoft.kvision.html.TAG.DIV import pl.treksoft.kvision.html.TAG.H1 import pl.treksoft.kvision.modal.Alert import pl.treksoft.kvision.modal.Confirm import pl.treksoft.kvision.modal.Modal import pl.treksoft.kvision.panel.DIRECTION +import pl.treksoft.kvision.panel.GridPanel +import pl.treksoft.kvision.panel.HPanel import pl.treksoft.kvision.panel.SplitPanel +import pl.treksoft.kvision.panel.TabPanel +import pl.treksoft.kvision.panel.VPanel import pl.treksoft.kvision.routing.routing -import pl.treksoft.kvision.tabs.Tabs class Showcase : ApplicationBase() { @@ -62,11 +66,11 @@ class Showcase : ApplicationBase() { dd3.add(Image(Img("kotlin.png"))) root.add(dd3) - val tabs2 = Tabs() + val tabs2 = TabPanel() tabs2.addTab("XXX", Label("XXX"), "fa-flag") tabs2.addTab("YYY", Label("YYY"), "fa-flag") - val tabs = Tabs() + val tabs = TabPanel() tabs.addTab("Test zakładki", Label("test zakładki"), "fa-flag") tabs.addTab("Test zakładki2", Label("test zakładki2")) tabs.addTab("Test zakładki3", tabs2, "fa-bars") @@ -110,6 +114,31 @@ class Showcase : ApplicationBase() { val img = Image(Img("kotlin.png"), "Image", true, IMAGESHAPE.ROUNDED) root.add(img) + val grid = GridPanel(align = ALIGN.RIGHT) + grid.add(Tag(DIV, "0,0"), 0, 0) + grid.add(Tag(DIV, "1,1"), 1, 1) + grid.add(Tag(DIV, "2,2"), 2, 2) + grid.add(Tag(DIV, "3,3"), 3, 3) + root.add(grid) + + val grid2 = GridPanel(align = ALIGN.CENTER) + grid2.add(Tag(DIV, "0,0"), 0, 0, 8) + grid2.add(Tag(DIV, "0,1"), 0, 1, 4) + grid2.add(Tag(DIV, "1,1"), 1, 1, 8, 4) + root.add(grid2) + + val hPanel = HPanel(align = ALIGN.RIGHT) + hPanel.add(Label("1")) + hPanel.add(Label("2")) + hPanel.add(Label("3")) + root.add(hPanel) + + val vPanel = VPanel(align = ALIGN.CENTER) + vPanel.add(Label("1")) + vPanel.add(Label("2")) + vPanel.add(Label("3")) + root.add(vPanel) + val modal = Modal("Test okienka") modal.add(Tag(TAG.H4, "ABC")) modal.add(Image(Img("kotlin.png"))) |