ModifiersBuilders.Background
@RequiresSchemaVersion(major = 1, minor = 0)
public final class ModifiersBuilders.Background
A modifier to apply a background to an element.
Summary
Nested types |
|---|
public final class ModifiersBuilders.Background.BuilderBuilder for |
Public methods |
|
|---|---|
@Nullable ColorBuilders.Brush |
getBrush()Gets a brush used to draw the background. |
@Nullable ColorBuilders.ColorProp |
getColor()Gets the background color for this element. |
@Nullable ModifiersBuilders.Corner |
Gets the corner properties of this element. |
@NonNull String |
toString() |
Public methods
getBrush
public @Nullable ColorBuilders.Brush getBrush()
Gets a brush used to draw the background. If set, the brush will be used instead of the color provided in setColor().
getColor
public @Nullable ColorBuilders.ColorProp getColor()
Gets 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).
getCorner
public @Nullable ModifiersBuilders.Corner getCorner()
Gets 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.