Package org.docx4j.toc.switches
Class SwitchProcessor
java.lang.Object
org.docx4j.toc.switches.SwitchProcessor
- All Implemented Interfaces:
SwitchProcessorInterface
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSurround the specified r in the specified p with a bookmark (with specified name and id)protected AtomicIntegergetBookmarkId(WordprocessingMLPackage wordMLPackage) getEntry()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
-
propertyResolver
-
styleBasedOnHelper
-
-
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:
-
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
-