public SimpleCurve(ConfigParameters config, int curveIndex, 
                     int numberOfCurves, ClippingShape clippingShape, 
                     Legend legend) {
    _symbolFactory = (SymbolFactory) Factory.createOrGet(
        config.getNode(SYMBOL_FACTORY_KEY), null);
    boolean withLine = config.getBoolean(WITH_LINE_KEY, true);
    LineAttributes lineAttributes = (LineAttributes) Factory.createOrGet(
        config.getNode(LINE_ATTRIBUTES_KEY),
        new ShapeAttributes(null, Color.getHSBColor((curveIndex % 6) / 6f, 
                                                    1f, 0.8f), 
                            0, null));
    if (_symbolFactory != null || withLine) {
      _clippingShape = clippingShape;
      _completeCurve = new GraphicalComposite(null);
      if (withLine) {
        GraphicalComposite container = new GraphicalComposite(clippingShape);
        _curve = new Polygon(lineAttributes, false);
        container.addElement(_curve);
       _completeCurve.addElement(container);
      } else {
        _curve = null;
      }
      _softClipping = config.getBoolean(SOFT_CLIPPING_KEY, true);
      if (_symbolFactory != null) {
        _symbols = new GraphicalComposite(_softClipping ? null 
                                                        : clippingShape);
        _completeCurve.addElement(_symbols);
      } else {
        _symbols = null;
      }
    } else {
      throw new IllegalArgumentException(
          "Either a SymbolFactory must exist or withLines == true.");
    }
    _hintForNextPoint = _initialHintForNextPoint 
        = (Hint) Factory.createOrGet(
            config.getNode(INITIAL_HINT_FOR_NEXT_POINT_KEY), null);
    _legendSymbol = legend.createSymbol(curveIndex, numberOfCurves, 
                                        _symbolFactory, withLine, 
                                        lineAttributes);
  }