Package com.openhtmltopdf.context
Class ContentFunctionFactory.PageNumberFunction
- java.lang.Object
-
- com.openhtmltopdf.context.ContentFunctionFactory.PageNumberFunction
-
- All Implemented Interfaces:
ContentFunction
- Direct Known Subclasses:
ContentFunctionFactory.PageCounterFunction
,ContentFunctionFactory.PagesCounterFunction
- Enclosing class:
- ContentFunctionFactory
private abstract static class ContentFunctionFactory.PageNumberFunction extends java.lang.Object implements ContentFunction
-
-
Constructor Summary
Constructors Modifier Constructor Description private
PageNumberFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
calculate(LayoutContext c, FSFunction function)
java.lang.String
getLayoutReplacementText()
If a function value can change at render time (i.e.protected IdentValue
getListStyleType(FSFunction function)
protected boolean
isCounter(FSFunction function, java.lang.String counterName)
boolean
isStatic()
Whether or not the function value can change at render time.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.openhtmltopdf.css.extend.ContentFunction
calculate, canHandle
-
-
-
-
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(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
-
getListStyleType
protected IdentValue getListStyleType(FSFunction function)
-
isCounter
protected boolean isCounter(FSFunction function, java.lang.String counterName)
-
-