org.jfree.chart.plot

Class JThermometer

public class JThermometer extends JPanel implements Serializable

An initial quick and dirty. The concept behind this class would be to generate a gui bean that could be used within JBuilder, Netbeans etc...
Constructor Summary
JThermometer()
Default constructor.
Method Summary
voidaddSubtitle(Title subtitle)
Adds a subtitle to the chart.
voidaddSubtitle(String subtitle)
Adds a subtitle to the chart.
voidaddSubtitle(String subtitle, Font font)
Adds a subtitle to the chart.
voidchangeTickFontSize(int delta)
Increases or decreases the tick font size.
intgetShowAxisLocation()
Returns the location for the axis.
FontgetTickLabelFont()
Returns the tick label font.
NumbergetValue()
Returns the value of the thermometer.
voidsetBackground(Color bg)
Sets the background color.
voidsetFollowDataInSubranges(boolean flag)
Sets the flag that controls whether or not the display range follows the data value.
voidsetForeground(Color fg)
Sets the foreground color.
voidsetOutlinePaint(Paint p)
Sets the outline paint.
voidsetRange(double lower, double upper)
Sets the lower and upper bounds for the thermometer.
voidsetShowAxisLocation(int location)
Sets the location for the axis.
voidsetShowValueLines(boolean b)
Sets the flag that controls whether or not value lines are displayed.
voidsetSubrangeInfo(int range, double displayLow, double displayHigh)
Sets the range.
voidsetSubrangeInfo(int range, double rangeLow, double rangeHigh, double displayLow, double displayHigh)
Sets the range.
voidsetTickFontStyle(int style)
Sets the tick font style.
voidsetTickLabelFont(Font font)
Sets the tick label font.
voidsetUnits(int i)
Sets the unit type.
voidsetValue(double value)
Sets the value of the thermometer.
voidsetValue(Number value)
Sets the value of the thermometer.
voidsetValueFont(Font f)
Sets the value font.
voidsetValueFormat(DecimalFormat df)
Sets the value format for the thermometer.
voidsetValueLocation(int loc)
Sets the location at which the temperature value is displayed.
voidsetValuePaint(Paint paint)
Sets the value paint.

Constructor Detail

JThermometer

public JThermometer()
Default constructor.

Method Detail

addSubtitle

public void addSubtitle(Title subtitle)
Adds a subtitle to the chart.

Parameters: subtitle the subtitle.

addSubtitle

public void addSubtitle(String subtitle)
Adds a subtitle to the chart.

Parameters: subtitle the subtitle.

addSubtitle

public void addSubtitle(String subtitle, Font font)
Adds a subtitle to the chart.

Parameters: subtitle the subtitle. font the subtitle font.

changeTickFontSize

public void changeTickFontSize(int delta)
Increases or decreases the tick font size.

Parameters: delta the change in size.

getShowAxisLocation

public int getShowAxisLocation()
Returns the location for the axis.

Returns: The location.

getTickLabelFont

public Font getTickLabelFont()
Returns the tick label font.

Returns: The tick label font.

getValue

public Number getValue()
Returns the value of the thermometer.

Returns: The value.

setBackground

public void setBackground(Color bg)
Sets the background color.

Parameters: bg the background color.

setFollowDataInSubranges

public void setFollowDataInSubranges(boolean flag)
Sets the flag that controls whether or not the display range follows the data value.

Parameters: flag the new value of the flag.

setForeground

public void setForeground(Color fg)
Sets the foreground color.

Parameters: fg the foreground color.

setOutlinePaint

public void setOutlinePaint(Paint p)
Sets the outline paint.

Parameters: p the paint.

setRange

public void setRange(double lower, double upper)
Sets the lower and upper bounds for the thermometer.

Parameters: lower the lower bound. upper the upper bound.

setShowAxisLocation

public void setShowAxisLocation(int location)
Sets the location for the axis.

Parameters: location the location.

setShowValueLines

public void setShowValueLines(boolean b)
Sets the flag that controls whether or not value lines are displayed.

Parameters: b the new flag value.

setSubrangeInfo

public void setSubrangeInfo(int range, double displayLow, double displayHigh)
Sets the range.

Parameters: range the range type. displayLow the low value. displayHigh the high value.

setSubrangeInfo

public void setSubrangeInfo(int range, double rangeLow, double rangeHigh, double displayLow, double displayHigh)
Sets the range.

Parameters: range the range type. rangeLow the low value for the range. rangeHigh the high value for the range. displayLow the low value for display. displayHigh the high value for display.

setTickFontStyle

public void setTickFontStyle(int style)
Sets the tick font style.

Parameters: style the style.

setTickLabelFont

public void setTickLabelFont(Font font)
Sets the tick label font.

Parameters: font the font.

setUnits

public void setUnits(int i)
Sets the unit type.

Parameters: i the unit type.

setValue

public void setValue(double value)
Sets the value of the thermometer.

Parameters: value the value.

setValue

public void setValue(Number value)
Sets the value of the thermometer.

Parameters: value the value.

setValueFont

public void setValueFont(Font f)
Sets the value font.

Parameters: f the font.

setValueFormat

public void setValueFormat(DecimalFormat df)
Sets the value format for the thermometer.

Parameters: df the formatter.

setValueLocation

public void setValueLocation(int loc)
Sets the location at which the temperature value is displayed.

Parameters: loc the location.

setValuePaint

public void setValuePaint(Paint paint)
Sets the value paint.

Parameters: paint the paint.