/* * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details * (http://www.gnu.org/copyleft/lesser.html). * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcckit.plot; import jcckit.graphic.GraphPoint; import jcckit.graphic.GraphicAttributes; import jcckit.graphic.GraphicalComposite; import jcckit.graphic.GraphicalElement; import jcckit.graphic.Rectangle; import jcckit.util.ConfigParameters; import jcckit.util.Factory; /** * Symbol factory for creating symbols with error bars. It wraps * a {@link SymbolFactory} for creating the symbol. The error bars * are {@link Rectangle Rectangles}. *
* Curves with error bars are based on two * {@link jcckit.data.DataCurve DataCurves}: *
* The ErrorBarFactory needs an instance of {@link PositionHint} * as initial {@link Hint} for the next curve. Its origin must be * the origin of the data coordinate system in device-independent coordinates. * The position of PositionHint must be undefined. * * @author Franz-Josef Elmer */ public class ErrorBarFactory implements SymbolFactory { /** Configuration parameter key. */ public static final String SYMBOL_FACTORY_KEY = "symbolFactory"; private final SymbolFactory _symbolFactory; private final GraphicAttributes _attributes; private final double _size; /** * Creates an instance from the specified configuration parameters. *
Key & Default Value | Type | Mandatory | *Description |
---|---|---|---|
symbolFactory = null | *ConfigParameters | no | *Definition of the wrapped {@link SymbolFactory} which generates * the curve symbol without bars. By default an empty * {@link GraphicalComposite} will be created. |
size = 0 | *double | no | *Width of the error bars. |
attributes = null | *ConfigParameters | no | *Definition of the {@link GraphicAttributes} of the error * bars. |