Flying Saucer Project Release ${app.version}

org.xhtmlrenderer.css.style.derived
Class LengthValue

java.lang.Object
  extended by org.xhtmlrenderer.css.style.DerivedValue
      extended by org.xhtmlrenderer.css.style.derived.LengthValue
All Implemented Interfaces:
FSDerivedValue

public class LengthValue
extends DerivedValue


Constructor Summary
LengthValue(CalculatedStyle style, CSSName name, PropertyValue value)
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LengthValue

public LengthValue(CalculatedStyle style,
                   CSSName name,
                   PropertyValue value)
Method Detail

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 property
baseValue -
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,
                                               java.lang.String stringValue,
                                               float relVal,
                                               short primitiveType,
                                               float baseValue,
                                               CssContext ctx)

Flying Saucer Project Release ${app.version}

Flying Saucer Project Home