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 pushed
public void popEveryCounterFromCounters(com.itextpdf.styledxmlparser.node.IElementNode element)
element
- the element which counters shall be popped
public 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 element
counterName
- 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 element
listSymbolType
- 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 element
counterName
- 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 element
counterSeparatorStr
- 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 from
public void addTargetCountersIfRequired(com.itextpdf.styledxmlparser.node.IElementNode node)
node
- node to take ID and scope from
public String resolveCounter(String counterName, CounterDigitsGlyphStyle listSymbolType)
counterName
- the counter name
listSymbolType
- the list symbol type
String
public String resolveCounters(String counterName, String counterSeparatorStr, CounterDigitsGlyphStyle listSymbolType)
counterName
- the counter name
counterSeparatorStr
- the counter separator
listSymbolType
- the list symbol type
String
public void resetCounter(String counterName)
counterName
- the counter name
public void resetCounter(String counterName, int value)
counterName
- the counter name
value
- the new value
public void incrementCounter(String counterName)
counterName
- the counter name
public void incrementCounter(String counterName, int incrementValue)
counterName
- the counter name
incrementValue
- the increment value
Copyright © 1998–2023 iText Group NV. All rights reserved.