code: public void paintAndClear (Graphics2D gfx)
      {
          int icount = _items.size();
          for (int ii = 0; ii < icount; ii++) {
              DirtyItem item = _items.get(ii);
              item.paint(gfx);
              item.clear();
              _freelist.add(item);
          }
          _items.clear();
      }
docs: Paints all the dirty items in this list using the supplied graphics context. The items are
  removed from the dirty list after being painted and the dirty list ends up empty.