001: /*
002: * Copyright (C) 2005 - 2008 JasperSoft Corporation. All rights reserved.
003: * http://www.jaspersoft.com.
004: *
005: * Unless you have purchased a commercial license agreement from JasperSoft,
006: * the following license terms apply:
007: *
008: * This program is free software; you can redistribute it and/or modify
009: * it under the terms of the GNU General Public License version 2 as published by
010: * the Free Software Foundation.
011: *
012: * This program is distributed WITHOUT ANY WARRANTY; and without the
013: * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
014: * See the GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
018: * or write to:
019: *
020: * Free Software Foundation, Inc.,
021: * 59 Temple Place - Suite 330,
022: * Boston, MA USA 02111-1307
023: *
024: *
025: *
026: *
027: * ThermometerPlot.java
028: *
029: * Created on 16 agosto 2005, 10.19
030: *
031: */
032:
033: package it.businesslogic.ireport.chart;
034:
035: import java.awt.Color;
036:
037: /**
038: *
039: * @author Administrator
040: */
041: public class ThermometerPlot extends Plot {
042:
043: private String valueLocation = "bulb";
044: private boolean showValueLines = false;
045: private java.awt.Color mercuryColor = null;
046:
047: private ValueDisplay valueDisplay = new ValueDisplay();
048:
049: private DataRange dataRange = new DataRange();
050: private DataRange lowRange = new DataRange();
051: private DataRange mediumRange = new DataRange();
052: private DataRange highRange = new DataRange();
053:
054: /** Creates a new instance of PiePlot */
055: public ThermometerPlot() {
056: }
057:
058: public Plot cloneMe() {
059: ThermometerPlot obj = new ThermometerPlot();
060: copyBasePlot(obj);
061: obj.setValueLocation(new String(getValueLocation()));
062: obj.setShowValueLines(isShowValueLines());
063: if (getMercuryColor() != null)
064: obj.setMercuryColor(new Color(getMercuryColor().getRGB()));
065:
066: obj.setValueDisplay(getValueDisplay().cloneMe());
067:
068: obj.setDataRange(getDataRange().cloneMe());
069: obj.setLowRange(getLowRange().cloneMe());
070: obj.setMediumRange(getMediumRange().cloneMe());
071: obj.setHighRange(getHighRange().cloneMe());
072:
073: return obj;
074: }
075:
076: public String getValueLocation() {
077: return valueLocation;
078: }
079:
080: public void setValueLocation(String valueLocation) {
081: this .valueLocation = valueLocation;
082: }
083:
084: public boolean isShowValueLines() {
085: return showValueLines;
086: }
087:
088: public void setShowValueLines(boolean showValueLines) {
089: this .showValueLines = showValueLines;
090: }
091:
092: public java.awt.Color getMercuryColor() {
093: return mercuryColor;
094: }
095:
096: public void setMercuryColor(java.awt.Color mercuryColor) {
097: this .mercuryColor = mercuryColor;
098: }
099:
100: public ValueDisplay getValueDisplay() {
101: return valueDisplay;
102: }
103:
104: public void setValueDisplay(ValueDisplay valueDisplay) {
105: this .valueDisplay = valueDisplay;
106: }
107:
108: public DataRange getDataRange() {
109: return dataRange;
110: }
111:
112: public void setDataRange(DataRange dataRange) {
113: this .dataRange = dataRange;
114: }
115:
116: public DataRange getLowRange() {
117: return lowRange;
118: }
119:
120: public void setLowRange(DataRange lowRange) {
121: this .lowRange = lowRange;
122: }
123:
124: public DataRange getMediumRange() {
125: return mediumRange;
126: }
127:
128: public void setMediumRange(DataRange mediumRange) {
129: this .mediumRange = mediumRange;
130: }
131:
132: public DataRange getHighRange() {
133: return highRange;
134: }
135:
136: public void setHighRange(DataRange highRange) {
137: this.highRange = highRange;
138: }
139:
140: }
|