Class CounterContext

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Map<java.lang.String,​java.lang.Integer> _counters  
      private 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 Summary

      Constructors 
      Modifier Constructor Description
      private CounterContext()  
        CounterContext​(LayoutContext ctx, CalculatedStyle style, java.lang.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.
    • Field Detail

      • _counters

        private final java.util.Map<java.lang.String,​java.lang.Integer> _counters
      • _parent

        private 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 Detail

      • CounterContext

        public CounterContext​(LayoutContext ctx,
                              CalculatedStyle style,
                              java.lang.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 Detail

      • incrementCounter

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

        private void incrementListItemCounter​(int increment)
      • resetCounter

        private void resetCounter​(CounterData cd)
      • getCounter

        private java.lang.Integer getCounter​(java.lang.String name)
      • getCounterValues

        private void getCounterValues​(java.lang.String name,
                                      java.util.List<java.lang.Integer> values)