PlotState parentState, PlotRenderingInfo info) {
RoundRectangle2D outerStem = new RoundRectangle2D.Double();
RoundRectangle2D innerStem = new RoundRectangle2D.Double();
RoundRectangle2D mercuryStem = new RoundRectangle2D.Double();
Ellipse2D outerBulb = new Ellipse2D.Double();
Ellipse2D innerBulb = new Ellipse2D.Double();
String temp = null;
FontMetrics metrics = null;
if (info != null) {
info.setPlotArea(area);
}
// adjust for insets...
RectangleInsets insets = getInsets();
insets.trim(area);
drawBackground(g2, area);
// adjust for padding...
Rectangle2D interior = (Rectangle2D) area.clone();
this.padding.trim(interior);
int midX = (int) (interior.getX() + (interior.getWidth() / 2));
int midY = (int) (interior.getY() + (interior.getHeight() / 2));
int stemTop = (int) (interior.getMinY() + getBulbRadius());
int stemBottom = (int) (interior.getMaxY() - getBulbDiameter());
Rectangle2D dataArea = new Rectangle2D.Double(midX - getColumnRadius(),
stemTop, getColumnRadius(), stemBottom - stemTop);
outerBulb.setFrame(midX - getBulbRadius(), stemBottom, getBulbDiameter(), getBulbDiameter());
outerStem.setRoundRect(midX - getColumnRadius(), interior.getMinY(),
getColumnDiameter(), stemBottom + getBulbDiameter() - stemTop,
getColumnDiameter(), getColumnDiameter());
Area outerThermometer = new Area(outerBulb);
Area tempArea = new Area(outerStem);
outerThermometer.add(tempArea);
innerBulb.setFrame(midX - getBulbRadius() + getGap(), stemBottom
+ getGap(), getBulbDiameter() - getGap() * 2, getBulbDiameter() - getGap() * 2);
innerStem.setRoundRect(midX - getColumnRadius() + getGap(),
interior.getMinY() + getGap(), getColumnDiameter()
- getGap() * 2, stemBottom + getBulbDiameter() - getGap() * 2