Class LayoutContext.CounterContext

java.lang.Object
org.xhtmlrenderer.layout.LayoutContext.CounterContext
Enclosing class:
LayoutContext

public class LayoutContext.CounterContext extends Object
  • Field Details

    • _counters

      private final Map<String,Integer> _counters
    • _parent

      private @Nullable LayoutContext.CounterContext _parent
      This is different because it needs to work even when the counter-properties cascade, and it should also logically be redefined on each level (think list-items within list-items)
  • Constructor Details

    • CounterContext

      CounterContext(CalculatedStyle style, @Nullable Integer startIndex)
      A CounterContext should really be reflected in the element hierarchy, but CalculatedStyles reflect the ancestor hierarchy just as well and also handles pseudo-elements seamlessly.
    • CounterContext

      private CounterContext()
  • Method Details

    • incrementCounter

      private boolean incrementCounter(CounterData cd)
      Returns:
      true if a counter was found and incremented
    • incrementListItemCounter

      private void incrementListItemCounter(int increment)
    • resetCounter

      private void resetCounter(CounterData cd)
    • getCurrentCounterValue

      public int getCurrentCounterValue(String name)
    • getCounter

      private @Nullable Integer getCounter(String name)
    • getCurrentCounterValues

      public List<Integer> getCurrentCounterValues(String name)
    • getCounterValues

      private void getCounterValues(String name, List<Integer> values)