public class CssCounterManager extends Object
| Constructor and Description |
|---|
CssCounterManager()
Creates a new
CssCounterManager instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
addTargetCounterIfRequired(com.itextpdf.styledxmlparser.node.IElementNode node)
Adds counter value to every counter in the Map corresponding to a node ID.
|
void |
addTargetCountersIfRequired(com.itextpdf.styledxmlparser.node.IElementNode node)
Adds counters value to every counter in the Map corresponding to a node ID.
|
void |
clearManager()
Clears information about counters.
|
void |
incrementCounter(String counterName)
Increments the counter.
|
void |
incrementCounter(String counterName,
int incrementValue)
Increments the counter.
|
void |
popEveryCounterFromCounters(com.itextpdf.styledxmlparser.node.IElementNode element)
Pops every given counter from stack of counters.
|
void |
pushEveryCounterToCounters(com.itextpdf.styledxmlparser.node.IElementNode element)
Pushes every current non-null counter to stack of counters.
|
void |
resetCounter(String counterName)
Resets the counter.
|
void |
resetCounter(String counterName,
int value)
Resets the counter.
|
String |
resolveCounter(String counterName,
CounterDigitsGlyphStyle listSymbolType)
Resolves a counter.
|
String |
resolveCounters(String counterName,
String counterSeparatorStr,
CounterDigitsGlyphStyle listSymbolType)
Resolves counters.
|
String |
resolveTargetCounter(String id,
String counterName,
CounterDigitsGlyphStyle listSymbolType)
Gets target-counter value for specified ID and counterName.
|
String |
resolveTargetCounters(String id,
String counterName,
String counterSeparatorStr,
CounterDigitsGlyphStyle listSymbolType)
Gets target-counter value for specified ID and counterName.
|
public CssCounterManager()
CssCounterManager instance.public void clearManager()
public void pushEveryCounterToCounters(com.itextpdf.styledxmlparser.node.IElementNode element)
element - the element which counters shall be pushedpublic void popEveryCounterFromCounters(com.itextpdf.styledxmlparser.node.IElementNode element)
element - the element which counters shall be poppedpublic String resolveTargetCounter(String id, String counterName, CounterDigitsGlyphStyle listSymbolType)
id - ID of the element. The first call adds ID to the Map, which means we require its value.
The second call returns corresponding value if we already encountered corresponding elementcounterName - name of the counter. The first call adds counterName to the Map,
which means we require its value.
The second call returns corresponding value if we already encountered corresponding elementlistSymbolType - the list symbol type to convert counter's value. null if conversion is not required.public String resolveTargetCounters(String id, String counterName, String counterSeparatorStr, CounterDigitsGlyphStyle listSymbolType)
id - ID of the element. The first call adds ID at the Map,
which means we require its value. The second call returns corresponding value
if we already encountered this elementcounterName - name of the counter. The first call adds name at the Map,
which means we require its value. The second call returns corresponding value
if we already encountered this elementcounterSeparatorStr - separator to separate counters values.listSymbolType - the list symbol type to convert counter's value. null if conversion is not required.public void addTargetCounterIfRequired(com.itextpdf.styledxmlparser.node.IElementNode node)
node - node to take ID and scope frompublic void addTargetCountersIfRequired(com.itextpdf.styledxmlparser.node.IElementNode node)
node - node to take ID and scope frompublic String resolveCounter(String counterName, CounterDigitsGlyphStyle listSymbolType)
counterName - the counter namelistSymbolType - the list symbol typeStringpublic String resolveCounters(String counterName, String counterSeparatorStr, CounterDigitsGlyphStyle listSymbolType)
counterName - the counter namecounterSeparatorStr - the counter separatorlistSymbolType - the list symbol typeStringpublic void resetCounter(String counterName)
counterName - the counter namepublic void resetCounter(String counterName, int value)
counterName - the counter namevalue - the new valuepublic void incrementCounter(String counterName)
counterName - the counter namepublic void incrementCounter(String counterName, int incrementValue)
counterName - the counter nameincrementValue - the increment valueCopyright © 1998–2021 iText Group NV. All rights reserved.