kvision / pl.treksoft.kvision.panel

Package pl.treksoft.kvision.panel

Rich set of container classes, supporting both simple use cases and sophisticated layouts (including CSS flexbox, CSS grid and Bootstrap responsive 12 columns gid).

Types

Direction

enum class Direction

Split panel direction.

DockPanel

open class DockPanel : SimplePanel

The container with dock layout (up, down, left, right and center positions).

FlexAlignContent

enum class FlexAlignContent

CSS flexbox content alignment options.

FlexAlignItems

enum class FlexAlignItems

CSS flexbox alignments options.

FlexDir

enum class FlexDir

CSS flexbox directions.

FlexJustify

enum class FlexJustify

CSS flexbox justification options.

FlexPanel

open class FlexPanel : SimplePanel

The container with CSS flexbox layout support.

FlexWrap

enum class FlexWrap

CSS flexbox wrap modes.

GridAlign

enum class GridAlign

CSS grid alignment options.

GridAlignContent

enum class GridAlignContent

CSS grid content alignment options.

GridFlow

enum class GridFlow

CSS grid flow options.

GridJustify

enum class GridJustify

CSS grid justification options.

GridJustifyContent

enum class GridJustifyContent

CSS grid content justification options.

GridPanel

open class GridPanel : SimplePanel

The container with CSS grid layout support.

GridSize

enum class GridSize

Bootstrap grid sizes.

GridWrapper

class GridWrapper : WidgetWrapper

HPanel

open class HPanel : FlexPanel

The container with horizontal layout.

ResponsiveGridPanel

open class ResponsiveGridPanel : SimplePanel

The container with support for Bootstrap responsive grid layout.

Root

class Root : SimplePanel

Root container.

Side

enum class Side

Dock layout directions.

SideTabSize

enum class SideTabSize

Left or right tab size.

SimplePanel

open class SimplePanel : Widget, Container

Basic container class, rendered as a DIV element with all children directly within.

SplitPanel

open class SplitPanel : SimplePanel

The container with draggable splitter.

StackPanel

open class StackPanel : SimplePanel

The container with only one active (visible) child at any moment.

TabPanel

open class TabPanel : SimplePanel

The container rendering it's children as tabs.

TabPosition

enum class TabPosition

Tab position.

VPanel

open class VPanel : FlexPanel

The container with vertical layout.

Functions

dockPanel

fun Container.dockPanel(classes: Set<String> = setOf(), init: (DockPanel.() -> Unit)? = null): DockPanel

DSL builder extension function.

flexPanel

fun Container.flexPanel(direction: FlexDir? = null, wrap: FlexWrap? = null, justify: FlexJustify? = null, alignItems: FlexAlignItems? = null, alignContent: FlexAlignContent? = null, spacing: Int? = null, classes: Set<String> = setOf(), init: (FlexPanel.() -> Unit)? = null): FlexPanel

DSL builder extension function.

gridPanel

fun Container.gridPanel(autoColumns: String? = null, autoRows: String? = null, autoFlow: GridFlow? = null, templateColumns: String? = null, templateRows: String? = null, templateAreas: List<String>? = null, columnGap: Int? = null, rowGap: Int? = null, justifyItems: GridJustify? = null, alignItems: GridAlign? = null, justifyContent: GridJustifyContent? = null, alignContent: GridAlignContent? = null, classes: Set<String> = setOf(), init: (GridPanel.() -> Unit)? = null): GridPanel

DSL builder extension function.

hPanel

fun Container.hPanel(wrap: FlexWrap? = null, justify: FlexJustify? = null, alignItems: FlexAlignItems? = null, spacing: Int? = null, classes: Set<String> = setOf(), init: (HPanel.() -> Unit)? = null): HPanel

DSL builder extension function.

responsiveGridPanel

fun Container.responsiveGridPanel(gridSize: GridSize = GridSize.MD, rows: Int = 0, cols: Int = 0, align: Align? = null, classes: Set<String> = setOf(), init: (ResponsiveGridPanel.() -> Unit)? = null): ResponsiveGridPanel

DSL builder extension function.

root

fun Application.root(id: String, fixed: Boolean = false, init: Root.() -> Unit): Root

Create new Root container based on ID

fun Application.root(element: <ERROR CLASS>, fixed: Boolean = false, init: Root.() -> Unit): Root

Create new Root container based on HTML element

simplePanel

fun Container.simplePanel(classes: Set<String> = setOf(), init: (SimplePanel.() -> Unit)? = null): SimplePanel

DSL builder extension function.

splitPanel

fun Container.splitPanel(direction: Direction = Direction.VERTICAL, classes: Set<String> = setOf(), init: (SplitPanel.() -> Unit)? = null): SplitPanel

DSL builder extension function.

stackPanel

fun Container.stackPanel(activateLast: Boolean = true, classes: Set<String> = setOf(), init: (StackPanel.() -> Unit)? = null): StackPanel

DSL builder extension function.

tabPanel

fun Container.tabPanel(tabPosition: TabPosition = TabPosition.TOP, sideTabSize: SideTabSize = SideTabSize.SIZE_3, scrollableTabs: Boolean = false, classes: Set<String> = setOf(), init: (TabPanel.() -> Unit)? = null): TabPanel

DSL builder extension function.

vPanel

fun Container.vPanel(justify: FlexJustify? = null, alignItems: FlexAlignItems? = null, spacing: Int? = null, classes: Set<String> = setOf(), init: (VPanel.() -> Unit)? = null): VPanel

DSL builder extension function.