public void dataChanged(DataEvent event) {
    Integer index = new Integer(0);
    PlotEventType type = PlotEventType.DATA_PLOT_CHANGED;
    synchronized (_curves) {
      int numberOfCurves = _curves.size();
      if (event.getContainer() instanceof DataCurve 
          && numberOfCurves == _dataPlot.getNumberOfElements()) {
        DataCurve curve = (DataCurve) event.getContainer();
        index = new Integer(curve.getContainer().getIndexOf(curve));
        type = PlotEventType.DATA_CURVE_CHANGED;
        fillCurve(index.intValue(), curve);
        if (index.intValue() < numberOfCurves - 1) {
          Vector curveHints 
              = (Vector) _nextCurveHints.elementAt(index.intValue());
          for (int i = 0, n = curveHints.size(); i < n; i++) {
            if (curveHints.elementAt(i) != null) {
              type = PlotEventType.DATA_PLOT_CHANGED;
              for (int j = index.intValue()+1; j < numberOfCurves; j++) {
                fillCurve(j, (DataCurve) _dataPlot.getElement(j));
              }
              break;
            }
          }
        }
      } else {
        generateCurves(_dataPlot);
      }
    }
    notifyListeners(new PlotEvent(Plot.this, type, index));
  }