code: public void addMetric(Metric metric)
      {
          if(this.metrics == null)
              this.metrics = new ArrayList<Metric>();
          this.metrics.add(metric);
      }
docs: Adds the given metric to the list of metrics for the widget.
  @param metric The metric to add to the list of metrics