diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-01-17 19:29:30 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-01-17 19:29:30 +0100 |
commit | 31c9d3c4121107974a8419752aa7face5c96f821 (patch) | |
tree | 77aaac10c5a120b028c14f53ab74eb5491f4a443 /src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt | |
parent | 646e82e383850447fd4d10f71ecc0aeab11623e0 (diff) | |
download | kvision-31c9d3c4121107974a8419752aa7face5c96f821.tar.gz kvision-31c9d3c4121107974a8419752aa7face5c96f821.tar.bz2 kvision-31c9d3c4121107974a8419752aa7face5c96f821.zip |
Code formatting (Kotlin Style Guide)
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/panel/GridPanel.kt | 32 |
1 files changed, 19 insertions, 13 deletions
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<String>? = null, - columnGap: Int? = null, rowGap: Int? = null, justifyItems: GRIDJUSTIFY? = null, - alignItems: GRIDALIGN? = null, justifyContent: GRIDJUSTIFYCONTENT? = null, - alignContent: GRIDALIGNCONTENT? = null, classes: Set<String> = setOf()) : SimplePanel(classes) { +open class 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() +) : 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<String> = 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<String> = 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<String> = 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<String> = setOf() +) : WidgetWrapper(delegate, classes) { override fun getSnStyle(): List<StringPair> { val snstyle = super.getSnStyle().toMutableList() |