@API(type=NOT_EXTENDABLE,
src=PRIVATE)
public class RelativeLength
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static RelativeLength |
createAbsolute(int value)
Create an absolute value length.
|
static RelativeLength |
createAuto()
Create an automatic relative length.
|
static RelativeLength |
createRelative(float percentage)
Create a relative length representing a relative value.
|
boolean |
equals(java.lang.Object obj) |
int |
get(int referenceLength)
Return the evaluated value of the RelativeLength given a reference value.
|
float |
getValue() |
int |
hashCode() |
boolean |
isAbsolute() |
boolean |
isAuto() |
boolean |
isRelative() |
java.lang.String |
toString() |
public static RelativeLength createAbsolute(int value)
value
- The value of the absolute length.public static RelativeLength createRelative(float percentage)
percentage
- The percentage from the value this length will refer to. (e.g: 50%)public static RelativeLength createAuto()
public int get(int referenceLength)
referenceLength
- Reference length for percentage lengths.public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean isAuto()
public boolean isRelative()
public boolean isAbsolute()
public float getValue()
© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.