ModifiersBuilders.Background.Builder


class ModifiersBuilders.Background.Builder


Builder for Background

Summary

Public constructors

Creates an instance of Builder.

Public functions

ModifiersBuilders.Background

Builds an instance from accumulated values.

ModifiersBuilders.Background.Builder
@RequiresSchemaVersion(major = 1, minor = 500)
setBrush(brush: ColorBuilders.Brush)

Sets a brush used to draw the background.

ModifiersBuilders.Background.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setColor(color: ColorBuilders.ColorProp)

Sets the background color for this element.

ModifiersBuilders.Background.Builder
@RequiresSchemaVersion(major = 1, minor = 0)
setCorner(corner: ModifiersBuilders.Corner)

Sets the corner properties of this element.

Public constructors

Builder

Added in 1.0.0
Builder()

Creates an instance of Builder.

Public functions

build

Added in 1.0.0
fun build(): ModifiersBuilders.Background

Builds an instance from accumulated values.

setBrush

Added in 1.3.0-alpha06
@RequiresSchemaVersion(major = 1, minor = 500)
fun setBrush(brush: ColorBuilders.Brush): ModifiersBuilders.Background.Builder

Sets a brush used to draw the background. If set and supported, the brush will be used instead of the color provided in setColor().

Throws
java.lang.IllegalArgumentException

if the brush is not a LinearGradient.

setColor

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setColor(color: ColorBuilders.ColorProp): ModifiersBuilders.Background.Builder

Sets the background color for this element. If not defined, defaults to being transparent.

While this field is statically accessible from 1.0, it's only bindable since version 1.2 and renderers supporting version 1.2 will use the dynamic value (if set).

If a brush is set, this color will only be used if brush is not supported by the renderer (versions below 1.5).

setCorner

Added in 1.0.0
@RequiresSchemaVersion(major = 1, minor = 0)
fun setCorner(corner: ModifiersBuilders.Corner): ModifiersBuilders.Background.Builder

Sets the corner properties of this element. This only affects the drawing of this element if it has a background color or border. If not defined, defaults to having a square corner.