public final class FixedLength extends LengthProperty
LengthProperty.Maker
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
CM |
Describes the unit centimeter.
|
static java.lang.String |
INCH |
Describes the unit inch.
|
static java.lang.String |
MM |
Describes the unit millimeter.
|
static java.lang.String |
MPT |
Describes the unit millipoint.
|
static java.lang.String |
PICA |
Describes the unit pica.
|
static java.lang.String |
POINT |
Describes the unit point.
|
static FixedLength |
ZERO_FIXED_LENGTH |
canonical zero-length instance
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object obj) |
|
static FixedLength |
getInstance(double numUnits) |
Return the cached
FixedLength instance corresponding
to the computed value. |
static FixedLength |
getInstance(double numUnits,
java.lang.String units) |
Return the cached
FixedLength instance corresponding
to the computed value
This method assumes a source-resolution of 1 (1px = 1pt) |
static FixedLength |
getInstance(double numUnits,
java.lang.String units,
float sourceResolution) |
Return the cached
FixedLength instance corresponding
to the computed value in base-units (millipoints). |
double |
getNumericValue() |
Return the value of this Numeric
|
double |
getNumericValue(PercentBaseContext context) |
Return the value of this Numeric
|
int |
getValue() |
Returns the length in 1/1000ths of a point (millipoints)
|
int |
getValue(PercentBaseContext context) |
Returns the length in 1/1000ths of a point (millipoints)
|
int |
hashCode() |
|
boolean |
isAbsolute() |
Return true since a FixedLength is always absolute.
|
java.lang.String |
toString() |
getDimension, getLength, getNumeric, getObject
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCharacter, getColor, getCondLength, getEnum, getKeep, getLengthPair, getLengthRange, getList, getNCname, getNumber, getSpace, getSpecifiedValue, getString, isAuto, setSpecifiedValue
public static final java.lang.String PICA
public static final java.lang.String POINT
public static final java.lang.String MM
public static final java.lang.String CM
public static final java.lang.String INCH
public static final java.lang.String MPT
public static final FixedLength ZERO_FIXED_LENGTH
public static FixedLength getInstance(double numUnits, java.lang.String units, float sourceResolution)
FixedLength
instance corresponding
to the computed value in base-units (millipoints).numUnits
- quantity of input unitsunits
- input unit specifiersourceResolution
- input/source resolution (= ratio of pixels per pt)public static FixedLength getInstance(double numUnits, java.lang.String units)
FixedLength
instance corresponding
to the computed value
This method assumes a source-resolution of 1 (1px = 1pt)numUnits
- input unitsunits
- unit specifierpublic static FixedLength getInstance(double numUnits)
FixedLength
instance corresponding
to the computed value.
This method assumes 'millipoints' (non-standard) as units,
and an implied source-resolution of 1 (1px = 1pt).numUnits
- input unitspublic int getValue()
public int getValue(PercentBaseContext context)
context
- The context for the length calculation (for percentage based lengths)public double getNumericValue()
public double getNumericValue(PercentBaseContext context)
context
- The context for the length calculation (for percentage based lengths)public boolean isAbsolute()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.