001: /*
002: * ============================================================================
003: * GNU Lesser General Public License
004: * ============================================================================
005: *
006: * JasperReports - Free Java report-generating library.
007: * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2.1 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library; if not, write to the Free Software
021: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
022: *
023: * JasperSoft Corporation
024: * 303 Second Street, Suite 450 North
025: * San Francisco, CA 94107
026: * http://www.jaspersoft.com
027: */
028: package net.sf.jasperreports.charts;
029:
030: import net.sf.jasperreports.charts.JRDataRange;
031: import net.sf.jasperreports.charts.JRValueDisplay;
032: import net.sf.jasperreports.engine.JRChartPlot;
033:
034: import java.awt.Color;
035:
036: /**
037: * Represents the display options of a Thermometer chart. A Thermometer chart
038: * consists of the outline of a thermometer, a scale showing the reading of
039: * the thermometer, three optional ranges corresponding to "good", "warning"
040: * and "critical", and the textual display of the value.
041: *
042: * @author Barry Klawans (bklawans@users.sourceforge.net)
043: * @version $Id: JRThermometerPlot.java 1792 2007-07-30 08:57:32Z teodord $
044: */
045: public interface JRThermometerPlot extends JRChartPlot {
046: /**
047: * The value should not be displayed.
048: */
049: public static final byte LOCATION_NONE = 0;
050:
051: /**
052: * The value should be displayed to the left of the thermometer.
053: */
054: public static final byte LOCATION_LEFT = 1;
055:
056: /**
057: * The value should be displayed to the right of the thermometer.
058: */
059: public static final byte LOCATION_RIGHT = 2;
060:
061: /**
062: * The value should be displayed in the bulb of the thermometer. When
063: * using this option make sure the font is small enough or the value short
064: * enough so the value fits in the bulb.
065: */
066: public static final byte LOCATION_BULB = 3;
067:
068: /**
069: * Returns the range of values displayed by this thermometer. This range
070: * corresponds with the scale on the thermometer.
071: *
072: * @return the range of values displayed by this thermometer
073: */
074: public JRDataRange getDataRange();
075:
076: /**
077: * Returns formatting information for the textual representation of the value.
078: *
079: * @return formatting information for the value
080: */
081: public JRValueDisplay getValueDisplay();
082:
083: /**
084: * Returns whether or not lines are drawn showing the bounds of each defined
085: * range.
086: *
087: * @return <code>true</code> if range bounds are shown, <code>false</code> otherwise
088: */
089: public boolean isShowValueLines();
090:
091: /**
092: * Returns the location where the value of the thermometer will be shown. The
093: * return value will be one of <code>LOCATION_NONE</code>,
094: * <code>LOCATION_LEFT</code>, <code>LOCATION_RIGHT</code> or
095: * <code>LOCATION_BULB</code>.
096: *
097: * @return the location where the value of the thermometer will be shown
098: */
099: public byte getValueLocation();
100:
101: /**
102: * Returns the color of the "mercury" in the thermometer when the value is
103: * not in a defined range.
104: *
105: * @return the default color of the mercury in the thermometer
106: */
107: public Color getMercuryColor();
108:
109: /**
110: * Returns the low range, or <code>null</code> if undefined.
111: *
112: * @return the low range, or <code>null</code> if undefined.
113: */
114: public JRDataRange getLowRange();
115:
116: /**
117: * Returns the medium range, or <code>null</code> if undefined.
118: *
119: * @return the medium range, or <code>null</code> if undefined.
120: */
121: public JRDataRange getMediumRange();
122:
123: /**
124: * Returns the high range, or <code>null</code> if undefined.
125: *
126: * @return the high range, or <code>null</code> if undefined.
127: */
128: public JRDataRange getHighRange();
129: }
|