ingo@1115: /* ingo@1115: * Copyright (c) 2010 by Intevation GmbH ingo@1115: * ingo@1115: * This program is free software under the LGPL (>=v2.1) ingo@1115: * Read the file LGPL.txt coming with the software for details ingo@1115: * or visit http://www.gnu.org/licenses/ if it does not exist. ingo@1115: */ ingo@1115: ingo@297: package de.intevation.gnv.chart; ingo@297: ingo@297: import java.util.Collection; ingo@297: import java.util.Locale; ingo@297: sascha@779: import org.jfree.chart.ChartTheme; ingo@297: import org.jfree.chart.JFreeChart; ingo@297: ingo@297: /** ingo@767: * Abstract chart class to define the basic fields used for chart creation. ingo@767: * ingo@767: * @author Ingo Weinzierl ingo@297: */ ingo@297: public abstract class AbstractChart ingo@297: implements Chart ingo@297: { ingo@767: /** ingo@767: * JFreeChart object. Created after {@link #generateChart()} is called. ingo@767: */ ingo@297: protected JFreeChart chart; ingo@767: ingo@767: /** ingo@767: * Field storing the visibility of lines in the chart plot. ingo@767: */ ingo@327: protected boolean linesVisible; ingo@767: ingo@767: /** ingo@767: * Field storing the visibility of points in the chart plot. ingo@767: */ ingo@327: protected boolean shapesVisible; ingo@297: ingo@767: /** ingo@767: * Locale object used for i18n support. ingo@767: */ ingo@297: protected Locale locale; ingo@297: ingo@767: /** ingo@767: * ChartLabels ingo@767: */ ingo@297: protected ChartLabels labels; ingo@767: ingo@767: /** ingo@767: * ChartTheme ingo@767: */ ingo@297: protected ChartTheme theme; ingo@767: ingo@767: /** ingo@767: * Collection which contains a bunch of parameters. ingo@767: */ ingo@297: protected Collection parameters; ingo@767: ingo@767: /** ingo@767: * Collection which contains a bunch of measurements. ingo@767: */ ingo@297: protected Collection measurements; ingo@767: ingo@767: /** ingo@767: * Collection which contains all data objects used to be displayed in the ingo@767: * chart. It contains different series and different datasets which is not ingo@767: * very elegant. ingo@767: */ ingo@297: protected Collection resultSet; ingo@767: ingo@767: /** ingo@767: * Collection which contains a bunch of date objects. ingo@767: */ ingo@297: protected Collection dates; ingo@767: ingo@767: /** ingo@767: * Collection which contains a bunch of time gap definitions used to ingo@767: * detect gaps in timeseries charts. ingo@767: */ ingo@310: protected Collection timeGaps; ingo@297: ingo@767: /** ingo@767: * Abstract method which needs to be implemented by concrete subclasses. ingo@767: * This method triggers the JFreeChart creation process. After calling this ingo@767: * method {@link #chart} should be a valid JFreeChart object. ingo@767: */ ingo@297: public abstract JFreeChart generateChart(); ingo@297: } ingo@617: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :