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/html | |
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/html')
5 files changed, 23 insertions, 13 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/html/Button.kt b/src/main/kotlin/pl/treksoft/kvision/html/Button.kt index d14ce66e..ec0fd881 100644 --- a/src/main/kotlin/pl/treksoft/kvision/html/Button.kt +++ b/src/main/kotlin/pl/treksoft/kvision/html/Button.kt @@ -22,8 +22,10 @@ enum class BUTTONSIZE(val className: String) { XSMALL("btn-xs") } -open class Button(text: String, icon: String? = null, style: BUTTONSTYLE = BUTTONSTYLE.DEFAULT, - disabled: Boolean = false, classes: Set<String> = setOf()) : Widget(classes) { +open class Button( + text: String, icon: String? = null, style: BUTTONSTYLE = BUTTONSTYLE.DEFAULT, + disabled: Boolean = false, classes: Set<String> = setOf() +) : Widget(classes) { var text = text set(value) { field = value diff --git a/src/main/kotlin/pl/treksoft/kvision/html/Image.kt b/src/main/kotlin/pl/treksoft/kvision/html/Image.kt index 7097bdab..913735ef 100644 --- a/src/main/kotlin/pl/treksoft/kvision/html/Image.kt +++ b/src/main/kotlin/pl/treksoft/kvision/html/Image.kt @@ -12,8 +12,10 @@ enum class IMAGESHAPE(val className: String) { THUMBNAIL("img-thumbnail") } -open class Image(src: ResString, alt: String? = null, responsive: Boolean = false, shape: IMAGESHAPE? = null, - centered: Boolean = false, classes: Set<String> = setOf()) : Widget(classes) { +open class Image( + src: ResString, alt: String? = null, responsive: Boolean = false, shape: IMAGESHAPE? = null, + centered: Boolean = false, classes: Set<String> = setOf() +) : Widget(classes) { internal var src = src set(value) { field = value diff --git a/src/main/kotlin/pl/treksoft/kvision/html/Link.kt b/src/main/kotlin/pl/treksoft/kvision/html/Link.kt index f103323b..c61e8a79 100644 --- a/src/main/kotlin/pl/treksoft/kvision/html/Link.kt +++ b/src/main/kotlin/pl/treksoft/kvision/html/Link.kt @@ -1,12 +1,14 @@ package pl.treksoft.kvision.html import com.github.snabbdom.VNode -import pl.treksoft.kvision.panel.SimplePanel import pl.treksoft.kvision.core.ResString +import pl.treksoft.kvision.panel.SimplePanel import pl.treksoft.kvision.snabbdom.StringPair -open class Link(label: String, url: String, icon: String? = null, image: ResString? = null, - classes: Set<String> = setOf()) : SimplePanel(classes) { +open class Link( + label: String, url: String, icon: String? = null, image: ResString? = null, + classes: Set<String> = setOf() +) : SimplePanel(classes) { private var label = label set(value) { field = value diff --git a/src/main/kotlin/pl/treksoft/kvision/html/List.kt b/src/main/kotlin/pl/treksoft/kvision/html/List.kt index 40ebc50b..eb006a33 100644 --- a/src/main/kotlin/pl/treksoft/kvision/html/List.kt +++ b/src/main/kotlin/pl/treksoft/kvision/html/List.kt @@ -2,8 +2,8 @@ package pl.treksoft.kvision.html import com.github.snabbdom.VNode import com.github.snabbdom.h -import pl.treksoft.kvision.panel.SimplePanel import pl.treksoft.kvision.core.KVManager +import pl.treksoft.kvision.panel.SimplePanel import pl.treksoft.kvision.snabbdom.StringBoolPair enum class LIST(val tagName: String) { @@ -15,8 +15,10 @@ enum class LIST(val tagName: String) { DL_HORIZ("dl") } -open class ListTag(type: LIST, elements: List<String>? = null, rich: Boolean = false, - classes: Set<String> = setOf()) : SimplePanel(classes) { +open class ListTag( + type: LIST, elements: List<String>? = null, rich: Boolean = false, + classes: Set<String> = setOf() +) : SimplePanel(classes) { var type = type set(value) { field = value diff --git a/src/main/kotlin/pl/treksoft/kvision/html/Tag.kt b/src/main/kotlin/pl/treksoft/kvision/html/Tag.kt index 71856627..ff22e440 100644 --- a/src/main/kotlin/pl/treksoft/kvision/html/Tag.kt +++ b/src/main/kotlin/pl/treksoft/kvision/html/Tag.kt @@ -1,8 +1,8 @@ package pl.treksoft.kvision.html import com.github.snabbdom.VNode -import pl.treksoft.kvision.panel.SimplePanel import pl.treksoft.kvision.core.KVManager +import pl.treksoft.kvision.panel.SimplePanel import pl.treksoft.kvision.snabbdom.StringBoolPair @Suppress("EnumNaming") @@ -49,8 +49,10 @@ enum class ALIGN(val className: String) { NOWRAP("text-nowrap") } -open class Tag(type: TAG, text: String? = null, rich: Boolean = false, align: ALIGN? = null, - classes: Set<String> = setOf()) : SimplePanel(classes) { +open class Tag( + type: TAG, text: String? = null, rich: Boolean = false, align: ALIGN? = null, + classes: Set<String> = setOf() +) : SimplePanel(classes) { var type = type set(value) { field = value |