kvision / pl.treksoft.kvision.core / StyledComponent

StyledComponent

abstract class StyledComponent : Component

Base class for components supporting CSS styling.

Constructors

<init>

StyledComponent()

Base class for components supporting CSS styling.

Properties

background

var background: Background?

Background of the current component.

border

var border: Border?

Border of the current component.

borderBottom

var borderBottom: Border?

Bottom border of the current component.

borderLeft

var borderLeft: Border?

Left border of the current component.

borderRight

var borderRight: Border?

Right border of the current component.

borderTop

var borderTop: Border?

Top border of the current component.

bottom

var bottom: CssSize?

Bottom edge of the current component.

color

var color: Color?

Text color for the current component.

colorHex

var colorHex: Int?

Text color for the current component given in hex format (write only).

colorName

var colorName: Col?

Text color for the current component given with named constant (write only).

height

var height: CssSize?

Height of the current component.

left

var left: CssSize?

Left edge of the current component.

margin

var margin: CssSize?

Margin of the current component.

marginBottom

var marginBottom: CssSize?

Bottom margin of the current component.

marginLeft

var marginLeft: CssSize?

Left margin of the current component.

marginRight

var marginRight: CssSize?

Right margin of the current component.

marginTop

var marginTop: CssSize?

Top margin of the current component.

maxHeight

var maxHeight: CssSize?

Maximal height of the current component.

maxWidth

var maxWidth: CssSize?

Maximal width of the current component.

minHeight

var minHeight: CssSize?

Minimal height of the current component.

minWidth

var minWidth: CssSize?

Minimal width of the current component.

opacity

var opacity: Double?

Opacity of the current component.

overflow

var overflow: Overflow?

CSS overflow of the current component.

padding

var padding: CssSize?

Padding of the current component.

paddingBottom

var paddingBottom: CssSize?

Bottom padding of the current component.

paddingLeft

var paddingLeft: CssSize?

Left padding of the current component.

paddingRight

var paddingRight: CssSize?

Right padding of the current component.

paddingTop

var paddingTop: CssSize?

Top padding of the current component.

position

var position: Position?

CSS position of the current component.

resize

var resize: Resize?

CSS resize of the current component.

right

var right: CssSize?

Right edge of the current component.

top

var top: CssSize?

Top edge of the current component.

width

open var width: CssSize?

Width of the current component.

zIndex

var zIndex: Int?

Z-index of the current component.

Inherited Properties

parent

abstract var parent: Component?

Parent of the current component.

visible

abstract var visible: Boolean

Visibility state of the current component.

Functions

getSnStyle

open fun getSnStyle(): List<StringPair>

Returns the list of String pairs defining CSS style attributes and their values.

Inherited Functions

addCssClass

abstract fun addCssClass(css: String): Component

Adds given value to the set of CSS classes generated in html code of current component.

addSurroundingCssClass

abstract fun addSurroundingCssClass(css: String): Component

Adds given value to the set of CSS classes generated in html code of parent component.

getElement

abstract fun getElement(): Node?

Returns DOM element bound to the current component.

getElementJQuery

abstract fun getElementJQuery(): JQuery?

Returns JQuery element bound to the current component.

getElementJQueryD

abstract fun getElementJQueryD(): dynamic

Returns JQuery element bound to the current component as a dynamic type.

removeCssClass

abstract fun removeCssClass(css: String): Component

Removes given value from the set of CSS classes generated in html code of current component.

removeSurroundingCssClass

abstract fun removeSurroundingCssClass(css: String): Component

Removes given value from the set of CSS classes generated in html code of parent component.

Inheritors

Widget

open class Widget : StyledComponent

Base widget class. The parent of all component classes.