Class LengthValue
- java.lang.Object
-
- org.xhtmlrenderer.css.style.DerivedValue
-
- org.xhtmlrenderer.css.style.derived.LengthValue
-
- All Implemented Interfaces:
FSDerivedValue
public class LengthValue extends DerivedValue
-
-
Constructor Summary
Constructors Constructor Description LengthValue(CalculatedStyle style, CSSName name, PropertyValue value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description float
asFloat()
static float
calcFloatProportionalValue(CalculatedStyle style, CSSName cssName, java.lang.String stringValue, float relVal, short primitiveType, float baseValue, CssContext ctx)
float
getFloatProportionalTo(CSSName cssName, float baseValue, CssContext ctx)
Computes a relative unit (e.g.boolean
hasAbsoluteUnit()
boolean
isDependentOnFontSize()
-
Methods inherited from class org.xhtmlrenderer.css.style.DerivedValue
asColor, asIdentValue, asString, asStringArray, getCssSacUnitType, getStringValue, isAbsoluteUnit, isDeclaredInherit, isIdent
-
-
-
-
Constructor Detail
-
LengthValue
public LengthValue(CalculatedStyle style, CSSName name, PropertyValue value)
-
-
Method Detail
-
asFloat
public float asFloat()
- Specified by:
asFloat
in interfaceFSDerivedValue
- Overrides:
asFloat
in classDerivedValue
-
getFloatProportionalTo
public float getFloatProportionalTo(CSSName cssName, float baseValue, CssContext ctx)
Computes a relative unit (e.g. percentage) as an absolute value, using the input value. Used for such properties whose parent value cannot be known before layout/render- Specified by:
getFloatProportionalTo
in interfaceFSDerivedValue
- Overrides:
getFloatProportionalTo
in classDerivedValue
- Parameters:
cssName
- Name of the propertybaseValue
-ctx
-- Returns:
- the absolute value or computed absolute value
-
hasAbsoluteUnit
public boolean hasAbsoluteUnit()
- Specified by:
hasAbsoluteUnit
in interfaceFSDerivedValue
- Overrides:
hasAbsoluteUnit
in classDerivedValue
-
isDependentOnFontSize
public boolean isDependentOnFontSize()
- Specified by:
isDependentOnFontSize
in interfaceFSDerivedValue
- Overrides:
isDependentOnFontSize
in classDerivedValue
-
calcFloatProportionalValue
public static float calcFloatProportionalValue(CalculatedStyle style, CSSName cssName, java.lang.String stringValue, float relVal, short primitiveType, float baseValue, CssContext ctx)
-
-