Class LengthValue
java.lang.Object
org.xhtmlrenderer.css.style.DerivedValue
org.xhtmlrenderer.css.style.derived.LengthValue
- All Implemented Interfaces:
FSDerivedValue
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
asFloat()
static float
calcFloatProportionalValue
(CalculatedStyle style, CSSName cssName, 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
boolean
Methods inherited from class org.xhtmlrenderer.css.style.DerivedValue
asColor, asIdentValue, asString, asStringArray, getCssSacUnitType, getStringValue, isAbsoluteUnit, isDeclaredInherit, isIdent
-
Constructor Details
-
LengthValue
-
-
Method Details
-
asFloat
public float asFloat()- Specified by:
asFloat
in interfaceFSDerivedValue
- Overrides:
asFloat
in classDerivedValue
-
getFloatProportionalTo
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, String stringValue, float relVal, short primitiveType, float baseValue, CssContext ctx)
-