Package org.docx4j.toc.switches
Class SwitchProcessor
java.lang.Object
org.docx4j.toc.switches.SwitchProcessor
- All Implemented Interfaces:
SwitchProcessorInterface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AtomicIntegerprivate TocEntryprivate STTabTlcprivate static org.slf4j.Loggerprivate static final intprivate PageDimensionsprivate booleanprotected PropertyResolverprivate booleanprotected StyleBasedOnHelperprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSurround the specified r in the specified p with a bookmark (with specified name and id)private voidbookmarkStyleText(P p, String anchorValue, AtomicInteger id, TocEntry te) protected AtomicIntegergetBookmarkId(WordprocessingMLPackage wordMLPackage) getEntry()private intinitBookmarkIdStart(WordprocessingMLPackage wordMLPackage) booleanbooleanprocessSwitches(WordprocessingMLPackage wordMLPackage, List<P> pList, List<SwitchInterface> switchesList, Map<P, Emulator.ResultTriple> pNumbersMap) Return a list consisting of those p in pList which are determined to form part of the ToC.voidsetPageNumbers(boolean pageNumbers) voidsetSelected(boolean selected) voidsetStartingIdForNewBookmarks(AtomicInteger bookmarkId) Provide a way to set the starting bookmark ID number.
-
Field Details
-
log
private static org.slf4j.Logger log -
propertyResolver
-
styleBasedOnHelper
-
pageDimensions
-
TOC_PREFIX
- See Also:
-
MILLION
private static final int MILLION- See Also:
-
entry
-
leader
-
selected
private boolean selected -
pageNumbers
private boolean pageNumbers -
bookmarkId
-
-
Constructor Details
-
SwitchProcessor
-
-
Method Details
-
getPropertyResolver
- Specified by:
getPropertyResolverin interfaceSwitchProcessorInterface
-
getStyleBasedOnHelper
- Specified by:
getStyleBasedOnHelperin interfaceSwitchProcessorInterface
-
isSelected
public boolean isSelected()- Specified by:
isSelectedin interfaceSwitchProcessorInterface
-
setSelected
public void setSelected(boolean selected) - Specified by:
setSelectedin interfaceSwitchProcessorInterface
-
processSwitches
public List<TocEntry> processSwitches(WordprocessingMLPackage wordMLPackage, List<P> pList, List<SwitchInterface> switchesList, Map<P, Emulator.ResultTriple> pNumbersMap) Return a list consisting of those p in pList which are determined to form part of the ToC.- Parameters:
wordMLPackage-pList-switchesList-pNumbersMap-- Returns:
-
bookmarkStyleText
-
bookmarkP
Surround the specified r in the specified p with a bookmark (with specified name and id)- Parameters:
p-r-name-id-
-
setPageNumbers
public void setPageNumbers(boolean pageNumbers) - Specified by:
setPageNumbersin interfaceSwitchProcessorInterface
-
pageNumbers
public boolean pageNumbers() -
getEntry
- Specified by:
getEntryin interfaceSwitchProcessorInterface
-
setStartingIdForNewBookmarks
Provide a way to set the starting bookmark ID number. For efficiency, user code needs to pass this value through. If it isn't, the value will be calculated (less efficient).- Parameters:
bookmarkId-- Since:
- 3.3.0
-
getBookmarkId
-
initBookmarkIdStart
-