Package com.openhtmltopdf.context
Class ContentFunctionFactory.TargetTextFunction
- java.lang.Object
-
- com.openhtmltopdf.context.ContentFunctionFactory.TargetTextFunction
-
- All Implemented Interfaces:
ContentFunction
- Enclosing class:
- ContentFunctionFactory
private static class ContentFunctionFactory.TargetTextFunction extends java.lang.Object implements ContentFunction
-
-
Constructor Summary
Constructors Modifier Constructor Description private
TargetTextFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
calculate(LayoutContext c, FSFunction function)
java.lang.String
calculate(RenderingContext c, FSFunction function, InlineText text)
boolean
canHandle(LayoutContext c, FSFunction function)
java.lang.String
getLayoutReplacementText()
If a function value can change at render time (i.e.boolean
isStatic()
Whether or not the function value can change at render time.
-
-
-
Method Detail
-
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
public java.lang.String calculate(RenderingContext c, FSFunction function, InlineText text)
- Specified by:
calculate
in interfaceContentFunction
-
calculate
public java.lang.String calculate(LayoutContext c, FSFunction function)
- Specified by:
calculate
in interfaceContentFunction
-
getLayoutReplacementText
public java.lang.String 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
public boolean canHandle(LayoutContext c, FSFunction function)
- Specified by:
canHandle
in interfaceContentFunction
-
-