|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.css.value.AbstractImmutableValue | +--org.apache.batik.css.value.AbstractImmutablePrimitiveValue | +--org.apache.batik.css.value.ImmutableFloat
This class represents immutable CSS float values
Field Summary | |
protected float |
floatValue
The float value |
protected static java.lang.String[] |
UNITS
The unit types representations |
protected short |
unitType
The unit type |
Constructor Summary | |
ImmutableFloat(short unitType,
float floatValue)
Creates a new value. |
Method Summary | |
ImmutableValue |
createReadOnlyCopy()
Returns a deep read-only copy of this object. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
java.lang.String |
getCssText()
A string representation of the current value. |
float |
getFloatValue(short unitType)
This method is used to get a float value in a specified unit. |
short |
getPrimitiveType()
The type of the value as defined by the constants specified in CSSPrimitiveValue. |
protected static java.lang.String |
getUnitRepresentation(short unitType)
Returns the representation for the given unit type. |
protected float |
toCentimeters()
Converts the current value into centimeters. |
protected float |
toDegrees()
Converts the current value into degrees. |
protected float |
toGradians()
Converts the current value into gradians. |
protected float |
toHertz()
Converts the current value into Hertz. |
protected float |
toInches()
Converts the current value into inches. |
protected float |
tokHertz()
Converts the current value into kHertz. |
protected float |
toMillimeters()
Converts the current value into millimeters. |
protected float |
toMilliseconds()
Converts the current value into milliseconds. |
protected float |
toPicas()
Converts the current value into picas. |
protected float |
toPoints()
Converts the current value into points. |
protected float |
toRadians()
Converts the current value into radians. |
protected float |
toSeconds()
Converts the current value into seconds. |
Methods inherited from class org.apache.batik.css.value.AbstractImmutablePrimitiveValue |
getCssValueType |
Methods inherited from class org.apache.batik.css.value.AbstractImmutableValue |
getCounterValue, getLength, getRectValue, getRGBColorValue, getStringValue, item |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String[] UNITS
protected float floatValue
protected short unitType
Constructor Detail |
public ImmutableFloat(short unitType, float floatValue)
Method Detail |
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the reference object with which to compare.public ImmutableValue createReadOnlyCopy()
public short getPrimitiveType()
getPrimitiveType
in class AbstractImmutablePrimitiveValue
public java.lang.String getCssText()
public float getFloatValue(short unitType) throws DOMException
getFloatValue
in class AbstractImmutableValue
org.apache.batik.css.value.AbstractImmutableValue
DOMException
- INVALID_ACCESS_ERR: Raised if the attached property doesn't support
the float value or the unit type.protected static java.lang.String getUnitRepresentation(short unitType) throws DOMException
unitType
- The unit type like specified in the CSSPrimitiveValue
interface.protected float toCentimeters()
protected float toInches()
protected float toMillimeters()
protected float toPoints()
protected float toPicas()
protected float toDegrees()
protected float toRadians()
protected float toGradians()
protected float toMilliseconds()
protected float toSeconds()
protected float toHertz()
protected float tokHertz()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |