Package com.itextpdf.layout.tagging
Class LayoutTaggingHelper
java.lang.Object
com.itextpdf.layout.tagging.LayoutTaggingHelper
The class is a helper which is used to correctly create structure
tree for layout element (with keeping right order for tags).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<IRenderer, TagTreePointer> private final TagStructureContext
private final PdfDocument
private final Map
<PdfObject, TaggingDummyElement> private final boolean
private final Map
<TaggingHintKey, List<TaggingHintKey>> private final Map
<TaggingHintKey, TaggingHintKey> private final int
private final int
private final Map
<String, List<ITaggingRule>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addKidsHint
(TagTreePointer parentPointer, Iterable<? extends IPropertyContainer> newKids) void
addKidsHint
(IPropertyContainer parent, Iterable<? extends IPropertyContainer> newKids) void
addKidsHint
(IPropertyContainer parent, Iterable<? extends IPropertyContainer> newKids, int insertIndex) void
addKidsHint
(TaggingHintKey parentKey, Collection<TaggingHintKey> newKidsKeys) void
addKidsHint
(TaggingHintKey parentKey, Collection<TaggingHintKey> newKidsKeys, int insertIndex) private void
addKidsHint
(TaggingHintKey parentKey, Collection<TaggingHintKey> newKidsKeys, int insertIndex, boolean skipFinishedChecks) static void
addTreeHints
(LayoutTaggingHelper taggingHelper, IRenderer rootRenderer) private boolean
createSingleTag
(TaggingHintKey hintKey, TagTreePointer tagPointer) boolean
createTag
(IRenderer renderer, TagTreePointer tagPointer) boolean
createTag
(TaggingHintKey hintKey, TagTreePointer tagPointer) private void
finishDummyKids
(List<TaggingHintKey> taggingHintKeys) void
finishTaggingHint
(IPropertyContainer hintOwner) getAccessibleKidsHint
(TaggingHintKey parent) getAccessibleParentHint
(TaggingHintKey hintKey) static TaggingHintKey
getHintKey
(IPropertyContainer container) getKidsHint
(TaggingHintKey parent) private int
getNearestNextSiblingTagIndex
(WaitingTagsManager waitingTagsManager, TagTreePointer parentPointer, List<TaggingHintKey> siblingsHint, int start) static TaggingHintKey
getOrCreateHintKey
(IPropertyContainer container) private static TaggingHintKey
getOrCreateHintKey
(IPropertyContainer hintOwner, boolean setProperty) getParentHint
(IPropertyContainer hintOwner) getParentHint
(TaggingHintKey hintKey) boolean
isArtifact
(IPropertyContainer hintOwner) private static boolean
isNonAccessibleHint
(TaggingHintKey hintKey) private boolean
private boolean
isSomeParentNotFinished
(TaggingHintKey parentHint) private boolean
isTagAlreadyExistsForHint
(TaggingHintKey tagHint) void
markArtifactHint
(IPropertyContainer hintOwner) void
markArtifactHint
(TaggingHintKey hintKey) int
moveKidHint
(TaggingHintKey hintKeyOfKidToMove, TaggingHintKey newParent) int
moveKidHint
(TaggingHintKey hintKeyOfKidToMove, TaggingHintKey newParent, int insertIndex) private void
moveKidTagIfCreated
(TaggingHintKey parentKey, TaggingHintKey kidKey) private void
registerRules
(PdfVersion pdfVersion) private void
registerSingleRule
(String role, ITaggingRule rule) void
void
private void
releaseHint
(TaggingHintKey hint, Set<TaggingHintKey> hintsToBeHeld, boolean checkContextIsFinished) private int
removeParentHint
(TaggingHintKey hintKey) private int
removeParentHint
(TaggingHintKey hintKey, TaggingHintKey parentHint) int
replaceKidHint
(TaggingHintKey kidHintKey, Collection<TaggingHintKey> newKidsHintKeys) void
restoreAutoTaggingPointerPosition
(IRenderer renderer) void
setRoleHint
(IPropertyContainer hintOwner, String role)
-
Field Details
-
context
-
document
-
immediateFlush
private final boolean immediateFlush -
kidsHints
-
parentHints
-
autoTaggingPointerSavedPosition
-
taggingRules
-
dummiesForPreExistingTags
-
RETVAL_NO_PARENT
private final int RETVAL_NO_PARENT- See Also:
-
RETVAL_PARENT_AND_KID_FINISHED
private final int RETVAL_PARENT_AND_KID_FINISHED- See Also:
-
-
Constructor Details
-
LayoutTaggingHelper
-
-
Method Details
-
addTreeHints
-
getHintKey
-
getOrCreateHintKey
-
addKidsHint
public void addKidsHint(TagTreePointer parentPointer, Iterable<? extends IPropertyContainer> newKids) -
addKidsHint
-
addKidsHint
public void addKidsHint(IPropertyContainer parent, Iterable<? extends IPropertyContainer> newKids, int insertIndex) -
addKidsHint
-
addKidsHint
public void addKidsHint(TaggingHintKey parentKey, Collection<TaggingHintKey> newKidsKeys, int insertIndex) -
setRoleHint
-
isArtifact
-
markArtifactHint
-
markArtifactHint
-
useAutoTaggingPointerAndRememberItsPosition
-
restoreAutoTaggingPointerPosition
-
getKidsHint
-
getAccessibleKidsHint
-
getParentHint
-
getParentHint
-
getAccessibleParentHint
-
releaseFinishedHints
public void releaseFinishedHints() -
releaseAllHints
public void releaseAllHints() -
createTag
-
createTag
-
finishTaggingHint
-
replaceKidHint
-
moveKidHint
-
moveKidHint
public int moveKidHint(TaggingHintKey hintKeyOfKidToMove, TaggingHintKey newParent, int insertIndex) -
getPdfDocument
-
getOrCreateHintKey
-
addKidsHint
private void addKidsHint(TaggingHintKey parentKey, Collection<TaggingHintKey> newKidsKeys, int insertIndex, boolean skipFinishedChecks) -
createSingleTag
-
removeParentHint
-
removeParentHint
-
finishDummyKids
-
moveKidTagIfCreated
-
getNearestNextSiblingTagIndex
private int getNearestNextSiblingTagIndex(WaitingTagsManager waitingTagsManager, TagTreePointer parentPointer, List<TaggingHintKey> siblingsHint, int start) -
isNonAccessibleHint
-
isTagAlreadyExistsForHint
-
releaseHint
private void releaseHint(TaggingHintKey hint, Set<TaggingHintKey> hintsToBeHeld, boolean checkContextIsFinished) -
isSomeParentNotFinished
-
isSomeKidNotFinished
-
registerRules
-
registerSingleRule
-