001: /***********************************************************************************************
002: * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved.
003: *
004: * Redistribution and use of this software and associated documentation ("Software"), with or
005: * without modification, are permitted provided that the following conditions are met:
006: *
007: * 1. Redistributions of source code must retain copyright statements and notices.
008: * Redistributions must also contain a copy of this document.
009: *
010: * 2. Redistributions in binary form must reproduce the above copyright notice, this list of
011: * conditions and the following disclaimer in the documentation and/or other materials
012: * provided with the distribution.
013: *
014: * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to endorse or promote
015: * products derived from this Software without prior written permission of Nathaniel G.
016: * Auvil. For written permission, please contact nathaniel_auvil@users.sourceforge.net
017: *
018: * 4. Products derived from this Software may not be called "jCharts" nor may "jCharts" appear
019: * in their names without prior written permission of Nathaniel G. Auvil. jCharts is a
020: * registered trademark of Nathaniel G. Auvil.
021: *
022: * 5. Due credit should be given to the jCharts Project (http://jcharts.sourceforge.net/).
023: *
024: * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS ``AS IS'' AND ANY
025: * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
026: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
027: * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
028: * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
029: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
030: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILITY, OR TORT
031: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
032: * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
033: ************************************************************************************************/package org.krysalis.jcharts.designer.charts;
034:
035: import org.krysalis.jcharts.properties.ChartProperties;
036: import org.krysalis.jcharts.properties.LegendProperties;
037:
038: import java.awt.*;
039:
040: /*************************************************************************************
041: *
042: * @author Nathaniel Auvil
043: * @version $Id: DesignerChart.java,v 1.1 2003/08/09 17:04:07 nathaniel_auvil Exp $
044: ************************************************************************************/
045: public abstract class DesignerChart {
046: private int width;
047: private int height;
048:
049: private String title;
050: private String[] legendLabels;
051: private Paint[] paints;
052: private double[][] data;
053:
054: private ChartProperties chartProperties;
055: private LegendProperties legendProperties;
056:
057: /**************************************************************************
058: *
059: * @param width
060: * @param height
061: *************************************************************************/
062: public DesignerChart(int width, int height) {
063: this .width = width;
064: this .height = height;
065:
066: this .chartProperties = new ChartProperties();
067: this .legendProperties = new LegendProperties();
068: }
069:
070: public ChartProperties getChartProperties() {
071: return chartProperties;
072: }
073:
074: public LegendProperties getLegendProperties() {
075: return legendProperties;
076: }
077:
078: public int getWidth() {
079: return width;
080: }
081:
082: public void setWidth(int width) {
083: this .width = width;
084: }
085:
086: public int getHeight() {
087: return height;
088: }
089:
090: public void setHeight(int height) {
091: this .height = height;
092: }
093:
094: public String getTitle() {
095: return title;
096: }
097:
098: public void setTitle(String title) {
099: this .title = title;
100: }
101:
102: public String[] getLegendLabels() {
103: return legendLabels;
104: }
105:
106: public void setLegendLabels(String[] legendLabels) {
107: this .legendLabels = legendLabels;
108: }
109:
110: public Paint[] getPaints() {
111: return paints;
112: }
113:
114: public void setPaints(Paint[] paints) {
115: this .paints = paints;
116: }
117:
118: public double[][] getData() {
119: return data;
120: }
121:
122: public void setData(double[][] data) {
123: this.data = data;
124: }
125: }
|