code: void trimLabels() {
          for (Iterator<Label> itr = labels.values().iterator(); itr.hasNext();) {
              Label l = itr.next();
              resetLabel(l);
              if(l.isEmpty())
                  itr.remove();
          }
      }
docs: /*package