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

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

Added in 1.1.0
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

Added in 1.1.0
fun getAbsoluteValue(): Int
Returns
Int

The current absolute/offset value forrule.

getFraction

Added in 1.1.0
fun getFraction(): Float
Returns
Float

The current fractional value.

inheritFromParent

Added in 1.1.0
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

Added in 1.1.0
java-static fun inheritFromParentWithOffset(fraction: Float, value: Int): BoundsRule.ValueRule

Creates ValueRule of fraction and offset.

Parameters
fraction: Float

Percentage of parent.

value: Int

Offset

Returns
BoundsRule.ValueRule

Newly created ValueRule.

setAbsoluteValue

Added in 1.1.0
fun setAbsoluteValue(absoluteValue: Int): Unit

Sets the absolute/offset value for rule.

Parameters
absoluteValue: Int

Absolute value.

setFraction

Added in 1.1.0
fun setFraction(fraction: Float): Unit

Sets the fractional value (percentage of parent) for this rule.

Parameters
fraction: Float

Percentage of parent.