public class ConfigLength extends java.lang.Object implements Configuration
| Modifier and Type | Field and Description |
|---|---|
double |
fraction
If ≥ 0 the length is relative to the total size and the 'fixed' number is treated
as a minium size.
|
double |
length
If in fixed mode this is the length or it's the minimum length of a relative length is being specified
|
| Constructor and Description |
|---|
ConfigLength() |
ConfigLength(double length,
double fraction) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkValidity()
Checks to see if the configuration is valid.
|
double |
compute(double totalLength) |
int |
computeI(double totalLength) |
ConfigLength |
copy() |
static ConfigLength |
fixed(double pixels) |
int |
getLengthI() |
boolean |
isFixed() |
boolean |
isRelative() |
static ConfigLength |
relative(double fraction,
int minimum) |
java.lang.String |
toString() |
public double length
public double fraction
public ConfigLength(double length,
double fraction)
public ConfigLength()
public static ConfigLength fixed(double pixels)
public static ConfigLength relative(double fraction, int minimum)
public double compute(double totalLength)
public boolean isRelative()
public boolean isFixed()
public int computeI(double totalLength)
public int getLengthI()
public void checkValidity()
ConfigurationcheckValidity in interface Configurationpublic ConfigLength copy()
public java.lang.String toString()
toString in class java.lang.Object