Top Fields Constructors Methods
com.openhtmltopdf.css.style.derived

public Class LengthValue

extends DerivedValue
Class Inheritance
Imports
java.util.logging.Level, com.openhtmltopdf.css.constants.CSSName, .ValueConstants, com.openhtmltopdf.css.parser.CSSPrimitiveValue, .PropertyValue, com.openhtmltopdf.css.style.CalculatedStyle, .CssContext, .DerivedValue, com.openhtmltopdf.css.value.FontSpecification, com.openhtmltopdf.util.LogMessageId, .XRLog

Field Summary

Modifier and TypeField and Description
private float
_lengthAsFloat

The specified length value, as a float; pulled from the CSS text

private short
_lengthPrimitiveType

The specified primitive SAC data type given for this length, from the CSS text

private CalculatedStyle
private static final float
private static final int
private static final float
private static final float

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public float
public static float
calcFloatProportionalValue(CalculatedStyle style, CSSName cssName, String stringValue, float relVal, short primitiveType, float baseValue, CssContext ctx)

public float

Returns:

the absolute value or computed absolute value
getFloatProportionalTo
(CSSName
Name of the property
cssName
,
float baseValue, CssContext ctx)

Overrides com.openhtmltopdf.css.style.DerivedValue.getFloatProportionalTo.

Implements com.openhtmltopdf.css.style.FSDerivedValue.getFloatProportionalTo.

Computes a relative unit (e.g. percentage) as an absolute value, using the input value.

public short
private CalculatedStyle
public boolean
public boolean
Inherited from com.openhtmltopdf.css.style.DerivedValue:
asColorasIdentValueasStringasStringArraygetCssSacUnitTypegetStringValueisAbsoluteUnitisDeclaredInheritisIdent

Field Detail

_lengthAsFloatback to summary
private float _lengthAsFloat

The specified length value, as a float; pulled from the CSS text

_lengthPrimitiveTypeback to summary
private short _lengthPrimitiveType

The specified primitive SAC data type given for this length, from the CSS text

_styleback to summary
private CalculatedStyle _style
CM__PER__INback to summary
private static final float CM__PER__IN
MM__PER__CMback to summary
private static final int MM__PER__CM
PC__PER__PTback to summary
private static final float PC__PER__PT
PT__PER__INback to summary
private static final float PT__PER__IN

Constructor Detail

LengthValueback to summary
public LengthValue(CalculatedStyle style, CSSName name, PropertyValue value)

Method Detail

asFloatback to summary
public float asFloat()

Overrides com.openhtmltopdf.css.style.DerivedValue.asFloat.

Implements com.openhtmltopdf.css.style.FSDerivedValue.asFloat.

Annotations
@Override
calcFloatProportionalValueback to summary
public static float calcFloatProportionalValue(CalculatedStyle style, CSSName cssName, String stringValue, float relVal, short primitiveType, float baseValue, CssContext ctx)
getFloatProportionalToback to summary
public float getFloatProportionalTo(CSSName cssName, float baseValue, CssContext ctx)

Overrides com.openhtmltopdf.css.style.DerivedValue.getFloatProportionalTo.

Implements com.openhtmltopdf.css.style.FSDerivedValue.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

Parameters
cssName:CSSName

Name of the property

Returns:float

the absolute value or computed absolute value

Annotations
@Override
getLengthPrimitiveTypeback to summary
public short getLengthPrimitiveType()
getStyleback to summary
private CalculatedStyle getStyle()
hasAbsoluteUnitback to summary
public boolean hasAbsoluteUnit()

Overrides com.openhtmltopdf.css.style.DerivedValue.hasAbsoluteUnit.

Implements com.openhtmltopdf.css.style.FSDerivedValue.hasAbsoluteUnit.

Annotations
@Override
isDependentOnFontSizeback to summary
public boolean isDependentOnFontSize()

Overrides com.openhtmltopdf.css.style.DerivedValue.isDependentOnFontSize.

Implements com.openhtmltopdf.css.style.FSDerivedValue.isDependentOnFontSize.

Annotations
@Override