From 31c9d3c4121107974a8419752aa7face5c96f821 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 17 Jan 2018 19:29:30 +0100 Subject: Code formatting (Kotlin Style Guide) --- .../kotlin/pl/treksoft/kvision/panel/GridPanel.kt | 32 +++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt') diff --git a/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt b/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt index dac5867c..3b226102 100644 --- a/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt +++ b/src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt @@ -45,11 +45,13 @@ enum class GRIDFLOW(val flow: String) { COLUMNDENSE("column dense") } -open class GridPanel(autoColumns: String? = null, autoRows: String? = null, autoFlow: GRIDFLOW? = null, - templateColumns: String? = null, templateRows: String? = null, templateAreas: List? = null, - columnGap: Int? = null, rowGap: Int? = null, justifyItems: GRIDJUSTIFY? = null, - alignItems: GRIDALIGN? = null, justifyContent: GRIDJUSTIFYCONTENT? = null, - alignContent: GRIDALIGNCONTENT? = null, classes: Set = setOf()) : SimplePanel(classes) { +open class GridPanel( + autoColumns: String? = null, autoRows: String? = null, autoFlow: GRIDFLOW? = null, + templateColumns: String? = null, templateRows: String? = null, templateAreas: List? = null, + columnGap: Int? = null, rowGap: Int? = null, justifyItems: GRIDJUSTIFY? = null, + alignItems: GRIDALIGN? = null, justifyContent: GRIDJUSTIFYCONTENT? = null, + alignContent: GRIDALIGNCONTENT? = null, classes: Set = setOf() +) : SimplePanel(classes) { var autoColumns = autoColumns set(value) { field = value @@ -112,9 +114,11 @@ open class GridPanel(autoColumns: String? = null, autoRows: String? = null, auto } @Suppress("LongParameterList") - 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 = setOf()): GridPanel { + 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 = setOf() + ): GridPanel { addInternal(GridWrapper(child, columnStart, rowStart, columnEnd, rowEnd, area, justifySelf, alignSelf, classes)) return this } @@ -190,11 +194,13 @@ open class GridPanel(autoColumns: String? = null, autoRows: String? = null, auto } } -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, - classes: Set = setOf()) : WidgetWrapper(delegate, classes) { +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, + classes: Set = setOf() +) : WidgetWrapper(delegate, classes) { override fun getSnStyle(): List { val snstyle = super.getSnStyle().toMutableList() -- cgit