|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.infinityloop.util.style.CSSValue
public class CSSValue
Class representing a CSS property's value.
Field Summary | |
---|---|
static int |
kAutoValue
|
static double |
kDefaultFontSizeInHp
|
static int |
kLengthUnit_auto
|
static int |
kLengthUnit_cm
|
static int |
kLengthUnit_em
|
static int |
kLengthUnit_emu
|
static int |
kLengthUnit_ex
|
static int |
kLengthUnit_hp
|
static int |
kLengthUnit_ident
|
static int |
kLengthUnit_in
|
static int |
kLengthUnit_inherit
|
static int |
kLengthUnit_int
|
static int |
kLengthUnit_mm
|
static int |
kLengthUnit_NotALengthError
|
static int |
kLengthUnit_pc
|
static int |
kLengthUnit_percent
|
static int |
kLengthUnit_pt
|
static int |
kLengthUnit_px
|
static int |
kLengthUnit_RelativeUnitError
|
static int |
kLengthUnit_string
|
static int |
kLengthUnit_tw
|
static int |
kLengthUnit_UnsupportedError
|
static java.lang.String |
kPropref
prefix string for having a property take the computed value of the property name following the prefix. |
static java.util.Hashtable |
unitConstantsMapping
Map from CSSValue's unit constants to UnitConverter's unit constants |
Constructor Summary | |
---|---|
CSSValue()
creator for a CSSValue standing for "inherit". |
|
CSSValue(double v,
int unit)
|
|
CSSValue(int v)
creator for integer type |
|
CSSValue(org.w3c.css.sac.LexicalUnit origUnit)
creator. |
|
CSSValue(java.lang.String propValue)
Constructor that processes one single property value |
|
CSSValue(java.lang.String v,
int unit)
creator for text or string type values |
Method Summary | |
---|---|
int |
getInt()
gets the integer value |
double |
getLengthAbs(int destUnit)
returns a length, converted from the original unit to the desired unit |
double |
getLengthAbsFromRelative(int destUnit,
CSSValue baseComputed,
CSSValue fontSize,
double dpi)
returns a length, converted from the original unit to the desired unit, with providing base values for relative calculations. |
org.w3c.css.sac.LexicalUnit |
getOriginalLexicalUnit()
retrieves the original LexicalUnit. |
int |
getParsedUnit()
retrieves the original parsed unit |
double |
getReal()
gets the real value |
int |
getReferencedProperty()
retrieves the 'referenced' property id of this property value. |
java.lang.String |
getText()
retrieves the value as text. |
int |
getUnit()
gets the unit/dimension |
static int |
getUnitId(java.lang.String u,
int def)
converts an ASCII unit string to its respective unit id |
boolean |
isLength()
returns whether this unit is a length |
boolean |
isRelative()
returns whether this unit is a relatively specified unit (=true) or an absolutely specified unit (=false). |
boolean |
isText()
returns whether this unit is a textual string (=true) or a length. |
static java.lang.String |
makeCSSUnit(java.lang.String s,
java.lang.String defaultUnit)
makes a CSS-parseable length unit string from the value passed here. |
java.lang.String |
toPrettyString(int precision)
returns this property value as it would be written in a stylesheet |
java.lang.String |
toString()
String representation for debugging |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int kAutoValue
public static final java.lang.String kPropref
public static final int kLengthUnit_em
public static final int kLengthUnit_ex
public static final int kLengthUnit_px
public static final int kLengthUnit_percent
public static final int kLengthUnit_in
public static final int kLengthUnit_cm
public static final int kLengthUnit_mm
public static final int kLengthUnit_pt
public static final int kLengthUnit_pc
public static final int kLengthUnit_int
public static final int kLengthUnit_string
public static final int kLengthUnit_ident
public static final int kLengthUnit_inherit
public static final int kLengthUnit_hp
public static final int kLengthUnit_tw
public static final int kLengthUnit_emu
public static final int kLengthUnit_auto
public static final int kLengthUnit_UnsupportedError
public static final int kLengthUnit_NotALengthError
public static final int kLengthUnit_RelativeUnitError
public static final double kDefaultFontSizeInHp
public static java.util.Hashtable unitConstantsMapping
Constructor Detail |
---|
public CSSValue(org.w3c.css.sac.LexicalUnit origUnit)
public CSSValue(int v)
public CSSValue(double v, int unit)
public CSSValue(java.lang.String v, int unit)
public CSSValue()
public CSSValue(java.lang.String propValue)
Method Detail |
---|
public int getInt()
public double getReal()
public int getUnit()
public boolean isLength()
public boolean isRelative()
public boolean isText()
public double getLengthAbsFromRelative(int destUnit, CSSValue baseComputed, CSSValue fontSize, double dpi) throws java.lang.Exception
java.lang.Exception
public double getLengthAbs(int destUnit) throws java.lang.Exception
java.lang.Exception
public org.w3c.css.sac.LexicalUnit getOriginalLexicalUnit()
public static java.lang.String makeCSSUnit(java.lang.String s, java.lang.String defaultUnit)
public int getReferencedProperty()
public static int getUnitId(java.lang.String u, int def)
public int getParsedUnit()
public java.lang.String getText()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toPrettyString(int precision)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |