org.xhtmlrenderer.css.style.derived
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LengthValue
public LengthValue(CalculatedStyle style,
CSSName name,
PropertyValue value)
asFloat
public float asFloat()
- Specified by:
asFloat in interface FSDerivedValue- Overrides:
asFloat in class DerivedValue
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 interface FSDerivedValue- Overrides:
getFloatProportionalTo in class DerivedValue
- Parameters:
cssName - Name of the propertybaseValue - ctx -
- Returns:
- the absolute value or computed absolute value
hasAbsoluteUnit
public boolean hasAbsoluteUnit()
- Specified by:
hasAbsoluteUnit in interface FSDerivedValue- Overrides:
hasAbsoluteUnit in class DerivedValue
isDependentOnFontSize
public boolean isDependentOnFontSize()
- Specified by:
isDependentOnFontSize in interface FSDerivedValue- Overrides:
isDependentOnFontSize in class DerivedValue
calcFloatProportionalValue
public static float calcFloatProportionalValue(CalculatedStyle style,
CSSName cssName,
String stringValue,
float relVal,
short primitiveType,
float baseValue,
CssContext ctx)
Copyright © 2013. All Rights Reserved.