BoundsRule.ValueRule
class BoundsRule.ValueRule
This class represents individual rules for updating the bounds.
Summary
Public functions |
|
|---|---|
java-static BoundsRule.ValueRule |
absoluteValue(absoluteValue: Int)Creates ValueRule using an absolute value. |
Int |
|
Float |
|
java-static BoundsRule.ValueRule |
inheritFromParent(fraction: Float)Creates ValueRule using a fraction of parent size. |
java-static BoundsRule.ValueRule |
inheritFromParentWithOffset(fraction: Float, value: Int)Creates ValueRule of fraction and offset. |
Unit |
setAbsoluteValue(absoluteValue: Int)Sets the absolute/offset value for rule. |
Unit |
setFraction(fraction: Float)Sets the fractional value (percentage of parent) for this rule. |
Public functions
absoluteValue
java-static fun absoluteValue(absoluteValue: Int): BoundsRule.ValueRule
Creates ValueRule using an absolute value.
| Parameters | |
|---|---|
absoluteValue: Int |
Absolute value. |
| Returns | |
|---|---|
BoundsRule.ValueRule |
Newly created ValueRule. |
getAbsoluteValue
fun getAbsoluteValue(): Int
| Returns | |
|---|---|
Int |
The current absolute/offset value forrule. |
inheritFromParent
java-static fun inheritFromParent(fraction: Float): BoundsRule.ValueRule
Creates ValueRule using a fraction of parent size.
| Parameters | |
|---|---|
fraction: Float |
Percentage of parent. |
| Returns | |
|---|---|
BoundsRule.ValueRule |
Newly created ValueRule. |
inheritFromParentWithOffset
java-static fun inheritFromParentWithOffset(fraction: Float, value: Int): BoundsRule.ValueRule
Creates ValueRule of fraction and offset.
| Returns | |
|---|---|
BoundsRule.ValueRule |
Newly created ValueRule. |
setAbsoluteValue
fun setAbsoluteValue(absoluteValue: Int): Unit
Sets the absolute/offset value for rule.
| Parameters | |
|---|---|
absoluteValue: Int |
Absolute value. |
setFraction
fun setFraction(fraction: Float): Unit
Sets the fractional value (percentage of parent) for this rule.
| Parameters | |
|---|---|
fraction: Float |
Percentage of parent. |