public interface Style
The dimension is used to control the size of the widget.
The horizontal and vertical alignments are used to position the content of the widget within its bounds.
The margin, border and padding are the used to wrap the content of the widget. The widget is wrapped in the following
sequence: first the padding, then the border, and finally the margin.
The background is used to render the background of the widget.
The color can be used to render the content of the widget, such as text or drawings.
The font can be used to render the text.
Modifier and Type | Method and Description |
---|---|
Background |
getBackground()
Gets the background.
|
Outline |
getBorder()
Gets the border.
|
int |
getColor()
Gets the color.
|
Dimension |
getDimension()
Gets the dimension.
|
float |
getExtraFloat(int fieldId,
float defaultValue)
Gets an extra field as a float.
|
int |
getExtraInt(int fieldId,
int defaultValue)
Gets an extra field as an int.
|
<T> T |
getExtraObject(int fieldId,
Class<T> clazz,
T defaultValue)
Gets an extra field as an object of the given type.
|
Font |
getFont()
Gets the font.
|
int |
getHorizontalAlignment()
Gets the horizontal alignment.
|
Outline |
getMargin()
Gets the margin.
|
Outline |
getPadding()
Gets the padding.
|
int |
getVerticalAlignment()
Gets the vertical alignment.
|
Background getBackground()
Outline getBorder()
int getColor()
Dimension getDimension()
float getExtraFloat(int fieldId, float defaultValue)
fieldId
- the ID of the extra field.defaultValue
- the value to return if the extra field is not set or if it is not a float.int getExtraInt(int fieldId, int defaultValue)
fieldId
- the ID of the extra field.defaultValue
- the value to return if the extra field is not set or if it is not an integer.<T> T getExtraObject(int fieldId, Class<T> clazz, T defaultValue)
T
- the type of the extra field.fieldId
- the ID of the extra field.clazz
- the type of the extra field.defaultValue
- the value to return if the extra field is not set or if it does not match the given type.Font getFont()
int getHorizontalAlignment()
Outline getMargin()
Outline getPadding()
int getVerticalAlignment()