Package com.openhtmltopdf.css.extend
Interface ContentFunction
-
- All Known Implementing Classes:
ContentFunctionFactory.FsIfCutOffFunction
,ContentFunctionFactory.LeaderFunction
,ContentFunctionFactory.PageCounterFunction
,ContentFunctionFactory.PageNumberFunction
,ContentFunctionFactory.PagesCounterFunction
,ContentFunctionFactory.TargetCounterFunction
,ContentFunctionFactory.TargetTextFunction
public interface ContentFunction
Interface for objects which implement a function which creates content (e.g.counter(pages)
)
-
-
Method Summary
All Methods Instance Methods Abstract 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
boolean isStatic()
Whether or not the function value can change at render time. If true,calculate(LayoutContext, FSFunction)
will be called. If false,calculate(RenderingContext, FSFunction, InlineText)
will be called.
-
calculate
java.lang.String calculate(LayoutContext c, FSFunction function)
-
calculate
java.lang.String calculate(RenderingContext c, FSFunction function, InlineText text)
-
getLayoutReplacementText
java.lang.String getLayoutReplacementText()
If a function value can change at render time (i.e.isStatic()
returns false) use this text as an approximation at layout.
-
canHandle
boolean canHandle(LayoutContext c, FSFunction function)
-
-