public class LayoutRuleset
extends java.lang.Object
UiElement
for different
ScreenSize
sModifier and Type | Field and Description |
---|---|
protected static java.lang.String |
AUTO |
protected static java.lang.String |
COLUMN_SUFFIX |
static java.lang.String |
DEFAULT_HORIZONTAL_RULESET |
static LayoutRuleset |
DEFAULT_PARSED_HORIZONTAL_RULESET |
static java.lang.String |
DEFAULT_VERTICAL_RULESET |
protected static java.lang.String |
EMPTY_STRING |
protected java.util.Set<ControllerType> |
hiddenByControllerType |
protected java.util.Set<InputSource> |
hiddenByInput |
protected java.util.Map<ScreenSize,OffsetRule> |
offsetRules |
protected static java.lang.String |
PIXEL_SUFFIX |
protected java.util.Map<ScreenSize,SizeRule> |
sizeRules |
Constructor and Description |
---|
LayoutRuleset(boolean horizontal,
java.lang.String rules)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.String rules) |
OffsetRule |
getCurrentOffsetRule() |
SizeRule |
getCurrentSizeRule() |
float |
getOffset(LayoutState layoutState) |
float |
getPreferredSize(LayoutState layoutState) |
boolean |
isHiddenByInputSource() |
boolean |
isHiddenByInputSource(LayoutState layoutState) |
boolean |
isHorizontalRuleset() |
public static final java.lang.String DEFAULT_HORIZONTAL_RULESET
public static final java.lang.String DEFAULT_VERTICAL_RULESET
public static final LayoutRuleset DEFAULT_PARSED_HORIZONTAL_RULESET
protected static final java.lang.String AUTO
protected static final java.lang.String PIXEL_SUFFIX
protected static final java.lang.String COLUMN_SUFFIX
protected static final java.lang.String EMPTY_STRING
protected final java.util.Map<ScreenSize,SizeRule> sizeRules
protected final java.util.Set<InputSource> hiddenByInput
protected final java.util.Set<ControllerType> hiddenByControllerType
protected final java.util.Map<ScreenSize,OffsetRule> offsetRules
public LayoutRuleset(boolean horizontal, java.lang.String rules)
rules
- The ruleset, e.g. xs-12c xs-offset-4c sm-500px sm-offset-20pxpublic boolean isHiddenByInputSource(LayoutState layoutState)
public float getPreferredSize(LayoutState layoutState)
public float getOffset(LayoutState layoutState)
public boolean isHiddenByInputSource()
public SizeRule getCurrentSizeRule()
public OffsetRule getCurrentOffsetRule()
public boolean isHorizontalRuleset()
public boolean equals(java.lang.String rules)