Package com.itextpdf.layout.renderer
Class TargetCounterHandler
java.lang.Object
com.itextpdf.layout.renderer.TargetCounterHandler
Handler to handle target-counter logic.
-
Constructor Summary
ConstructorDescriptionCreates a newTargetCounterHandler
instance.TargetCounterHandler
(TargetCounterHandler targetCounterHandler) Creates a copy of the givenTargetCounterHandler
instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addPageByID
(IRenderer renderer) Adds renderer's page to the root renderer map.static Integer
getPageByID
(IRenderer renderer, String id) Gets page from renderer using given id.boolean
Indicates if relayout is required.static boolean
isValueDefinedForThisId
(IRenderer renderer, String id) Indicates if page value was defined for this id.void
Prepares handler to relayout.
-
Constructor Details
-
TargetCounterHandler
Creates a copy of the givenTargetCounterHandler
instance.- Parameters:
-
targetCounterHandler
-TargetCounterHandler
instance to be copied
-
TargetCounterHandler
public TargetCounterHandler()Creates a newTargetCounterHandler
instance.
-
-
Method Details
-
addPageByID
Adds renderer's page to the root renderer map.- Parameters:
-
renderer
- renderer from which page and root renderer will be taken.
-
getPageByID
Gets page from renderer using given id.- Parameters:
-
renderer
- renderer from which root renderer will be taken -
id
- key to the renderersPages Map - Returns:
- page on which renderer was layouted
-
isValueDefinedForThisId
Indicates if page value was defined for this id.- Parameters:
-
renderer
- renderer from which root renderer will be taken -
id
- target id - Returns:
- true if value is defined for this id, false otherwise
-
isRelayoutRequired
public boolean isRelayoutRequired()Indicates if relayout is required.- Returns:
- true if relayout is required, false otherwise
-
prepareHandlerToRelayout
public void prepareHandlerToRelayout()Prepares handler to relayout.
-