1 /* 2 * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved 3 * 4 * This library is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License as published by 6 * the Free Software Foundation; either version 2.1 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU Lesser General Public License for more details 13 * (http://www.gnu.org/copyleft/lesser.html). 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with this library; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 */ 19 package jcckit.plot; 20 21 import jcckit.graphic.ClippingShape; 22 23 /** 24 * Interface of a curve factory. A curve factory creates a new instance 25 * of a {@link Curve}. 26 * 27 * @author Franz-Josef Elmer 28 */ 29 public interface CurveFactory { 30 /** 31 * Creates a new curve instance. 32 * @param curveIndex The index of the curve in the {@link Plot} to which 33 * it should belong. 34 * @param numberOfCurves Number of curves. Will be needed to calculate the 35 * y-coordinate of the legend symbol. 36 * @param clippingShape Clipping shape applied to the curve. 37 * @param legend The legend which will show the curve symbol. 38 * @return an empty instance. 39 */ 40 public Curve create(int curveIndex, int numberOfCurves, 41 ClippingShape clippingShape, Legend legend); 42 } 43