public class ResponsiveSizeRule extends java.lang.Object implements SizeRule
SizeRule
that changes the size of the current
UiElement
based on the size of the parent UiElement
. The
parent element is split into 12 columns and the ResponsiveSizeRule
sets how many columns to occupy.Constructor and Description |
---|
ResponsiveSizeRule(int columns)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getColumns() |
float |
getSize(LayoutState layoutState)
Determines the preferred size of a
UiElement |
boolean |
isAutoSize()
Returns if the size rule is an 'auto' rule
|
public ResponsiveSizeRule(int columns)
columns
- The amount of columns to occupypublic float getSize(LayoutState layoutState)
SizeRule
UiElement
getSize
in interface SizeRule
layoutState
- The current LayoutState
UiElement
preferred sizepublic int getColumns()
public boolean isAutoSize()
SizeRule
isAutoSize
in interface SizeRule