public class PercentLength extends LengthProperty
LengthProperty.Maker| Constructor | Description |
|---|---|
PercentLength(double factor,
PercentBase lbase) |
Main constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object obj) |
|
PercentBase |
getBaseLength() |
|
double |
getNumericValue() |
Return the value of this Numeric
|
double |
getNumericValue(PercentBaseContext context) |
Return the value of this Numeric
|
protected double |
getPercentage() |
Used during property resolution to check for
negative percentages
|
java.lang.String |
getString() |
This method expects to be overridden by subclasses.
|
int |
getValue() |
Return the length of this PercentLength.
|
int |
getValue(PercentBaseContext context) |
Returns the length in 1/1000ths of a point (millipoints)
|
int |
hashCode() |
|
boolean |
isAbsolute() |
Return false because percent-length are always relative.
|
java.lang.String |
toString() |
getDimension, getLength, getNumeric, getObjectclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCharacter, getColor, getCondLength, getEnum, getKeep, getLengthPair, getLengthRange, getList, getNCname, getNumber, getSpace, getSpecifiedValue, isAuto, setSpecifiedValuepublic PercentLength(double factor,
PercentBase lbase)
factor - the percentage factor, expressed as a decimal (e.g. use
.95 to represent 95%)lbase - base property to which the factor should be appliedpublic PercentBase getBaseLength()
protected double getPercentage()
public boolean isAbsolute()
public double getNumericValue()
public double getNumericValue(PercentBaseContext context)
context - The context for the length calculation (for percentage based lengths)public java.lang.String getString()
public int getValue()
public int getValue(PercentBaseContext context)
context - The context for the length calculation (for percentage based lengths)public java.lang.String toString()
Propertypublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright 1999-2016 The Apache Software Foundation. All Rights Reserved.