Package com.openhtmltopdf.context
Class ContentFunctionFactory.TargetCounterFunction
java.lang.Object
com.openhtmltopdf.context.ContentFunctionFactory.TargetCounterFunction
- All Implemented Interfaces:
ContentFunction
- Enclosing class:
ContentFunctionFactory
private static class ContentFunctionFactory.TargetCounterFunction
extends Object
implements ContentFunction
Partially implements target counter as specified here:
http://www.w3.org/TR/2007/WD-css3-gcpm-20070504/#cross-references
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculate
(LayoutContext c, FSFunction function) calculate
(RenderingContext c, FSFunction function, InlineText text) boolean
canHandle
(LayoutContext c, FSFunction function) If a function value can change at render time (i.e.boolean
isStatic()
Whether or not the function value can change at render time.
-
Constructor Details
-
TargetCounterFunction
private TargetCounterFunction()
-
-
Method Details
-
isStatic
public boolean isStatic()Description copied from interface:ContentFunction
Whether or not the function value can change at render time. If true,ContentFunction.calculate(LayoutContext, FSFunction)
will be called. If false,ContentFunction.calculate(RenderingContext, FSFunction, InlineText)
will be called.- Specified by:
isStatic
in interfaceContentFunction
-
calculate
- Specified by:
calculate
in interfaceContentFunction
-
calculate
- Specified by:
calculate
in interfaceContentFunction
-
getLayoutReplacementText
Description copied from interface:ContentFunction
If a function value can change at render time (i.e.ContentFunction.isStatic()
returns false) use this text as an approximation at layout.- Specified by:
getLayoutReplacementText
in interfaceContentFunction
-
canHandle
- Specified by:
canHandle
in interfaceContentFunction
-