code: public void setLabels(List<Label> labels) {
          assertNotNull(labels);
          if (this.labels != null)
              this.labels.clear();
          for (Label l : labels) {
              addLabel(l);
          }
      }
docs: Sets label list, setting the parent of each label
  in the list.  Replaces any existing labels.
  @throws IllegalArgumentException} if labels is {@code null}