本文整理汇总了Java中org.jfree.chart.plot.ThermometerPlot类的典型用法代码示例。如果您正苦于以下问题:Java ThermometerPlot类的具体用法?Java ThermometerPlot怎么用?Java ThermometerPlot使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ThermometerPlot类属于org.jfree.chart.plot包,在下文中一共展示了ThermometerPlot类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildPlot1
import org.jfree.chart.plot.ThermometerPlot; //导入依赖的package包/类
public void buildPlot1() {
setColorLimits();
dataset = new DefaultValueDataset(30);
ThermometerPlot thermometerplot = new ThermometerPlot(dataset);
thermometerplot.setRange(plotBottonLimit, plotTopLimit);
thermometerplot.setUnits(ThermometerPlot.UNITS_CELCIUS);
thermometerplot.setSubrange(0, greenBottomLimit, greenTopLimit);
thermometerplot.setSubrangePaint(0, Color.green);
thermometerplot.setSubrange(1, yellowBottomLimit, yellowTopLimit);
thermometerplot.setSubrangePaint(1, Color.yellow);
thermometerplot.setSubrange(2, redBottomLimit, redTopLimit);
thermometerplot.setSubrangePaint(2, Color.red);
JFreeChart jfreechart = new JFreeChart(plotTitle, thermometerplot);
ChartUtilities.applyCurrentTheme(jfreechart);
add(new ChartPanel(jfreechart));
}
示例2: createThermometerChart
import org.jfree.chart.plot.ThermometerPlot; //导入依赖的package包/类
private JFreeChart createThermometerChart(ReportChart reportChart,
ChartValue[] values, boolean displayInline)
{
DefaultValueDataset dataset = createDefaultValueDataset(values);
ThermometerPlot plot = new ThermometerPlot(dataset);
plot.setInsets(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
plot.setPadding(new RectangleInsets(10.0, 10.0, 10.0, 10.0));
plot.setThermometerStroke(new BasicStroke(2.0f));
plot.setThermometerPaint(Color.lightGray);
plot.setUnits(ThermometerPlot.UNITS_FAHRENHEIT);
JFreeChart chart = new JFreeChart(reportChart.getTitle(),
JFreeChart.DEFAULT_TITLE_FONT, plot, reportChart.isShowLegend());
return chart;
}
示例3: createThermometerChart
import org.jfree.chart.plot.ThermometerPlot; //导入依赖的package包/类
private JFreeChart createThermometerChart(ReportChart reportChart,
ChartValue[] values, boolean displayInline)
{
DefaultValueDataset dataset = createDefaultValueDataset(values);
ThermometerPlot plot = new ThermometerPlot(dataset);
plot.setInsets(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
plot.setPadding(new RectangleInsets(10.0, 10.0, 10.0, 10.0));
plot.setThermometerStroke(new BasicStroke(2.0f));
plot.setThermometerPaint(Color.lightGray);
plot.setUnits(ThermometerPlot.UNITS_FAHRENHEIT);
JFreeChart chart = new JFreeChart(reportChart.getTitle(),
JFreeChart.DEFAULT_TITLE_FONT, plot, reportChart.isShowLegend());
return chart;
}
示例4: applyToThermometerPlot
import org.jfree.chart.plot.ThermometerPlot; //导入依赖的package包/类
/**
* Applies the attributes for this theme to a {@link ThermometerPlot}.
* This method is called from the {@link #applyToPlot(Plot)} method.
*
* @param plot the plot.
*/
protected void applyToThermometerPlot(ThermometerPlot plot) {
plot.setValueFont(this.largeFont);
plot.setThermometerPaint(this.thermometerPaint);
ValueAxis axis = plot.getRangeAxis();
if (axis != null) {
applyToValueAxis(axis);
}
}
示例5: applyToPlot
import org.jfree.chart.plot.ThermometerPlot; //导入依赖的package包/类
/**
* Applies the attributes of this theme to a plot.
*
* @param plot the plot (<code>null</code>).
*/
protected void applyToPlot(Plot plot) {
ParamChecks.nullNotPermitted(plot, "plot");
if (plot.getDrawingSupplier() != null) {
plot.setDrawingSupplier(getDrawingSupplier());
}
if (plot.getBackgroundPaint() != null) {
plot.setBackgroundPaint(this.plotBackgroundPaint);
}
plot.setOutlinePaint(this.plotOutlinePaint);
// now handle specific plot types (and yes, I know this is some
// really ugly code that has to be manually updated any time a new
// plot type is added - I should have written something much cooler,
// but I didn't and neither did anyone else).
if (plot instanceof PiePlot) {
applyToPiePlot((PiePlot) plot);
}
else if (plot instanceof MultiplePiePlot) {
applyToMultiplePiePlot((MultiplePiePlot) plot);
}
else if (plot instanceof CategoryPlot) {
applyToCategoryPlot((CategoryPlot) plot);
}
else if (plot instanceof XYPlot) {
applyToXYPlot((XYPlot) plot);
}
else if (plot instanceof FastScatterPlot) {
applyToFastScatterPlot((FastScatterPlot) plot);
}
else if (plot instanceof MeterPlot) {
applyToMeterPlot((MeterPlot) plot);
}
else if (plot instanceof ThermometerPlot) {
applyToThermometerPlot((ThermometerPlot) plot);
}
else if (plot instanceof SpiderWebPlot) {
applyToSpiderWebPlot((SpiderWebPlot) plot);
}
else if (plot instanceof PolarPlot) {
applyToPolarPlot((PolarPlot) plot);
}
}
示例6: applyToPlot
import org.jfree.chart.plot.ThermometerPlot; //导入依赖的package包/类
/**
* Applies the attributes of this theme to a plot.
*
* @param plot the plot ({@code null}).
*/
protected void applyToPlot(Plot plot) {
Args.nullNotPermitted(plot, "plot");
if (plot.getDrawingSupplier() != null) {
plot.setDrawingSupplier(getDrawingSupplier());
}
if (plot.getBackgroundPaint() != null) {
plot.setBackgroundPaint(this.plotBackgroundPaint);
}
plot.setOutlinePaint(this.plotOutlinePaint);
// now handle specific plot types (and yes, I know this is some
// really ugly code that has to be manually updated any time a new
// plot type is added - I should have written something much cooler,
// but I didn't and neither did anyone else).
if (plot instanceof PiePlot) {
applyToPiePlot((PiePlot) plot);
}
else if (plot instanceof MultiplePiePlot) {
applyToMultiplePiePlot((MultiplePiePlot) plot);
}
else if (plot instanceof CategoryPlot) {
applyToCategoryPlot((CategoryPlot) plot);
}
else if (plot instanceof XYPlot) {
applyToXYPlot((XYPlot) plot);
}
else if (plot instanceof FastScatterPlot) {
applyToFastScatterPlot((FastScatterPlot) plot);
}
else if (plot instanceof MeterPlot) {
applyToMeterPlot((MeterPlot) plot);
}
else if (plot instanceof ThermometerPlot) {
applyToThermometerPlot((ThermometerPlot) plot);
}
else if (plot instanceof SpiderWebPlot) {
applyToSpiderWebPlot((SpiderWebPlot) plot);
}
else if (plot instanceof PolarPlot) {
applyToPolarPlot((PolarPlot) plot);
}
}
示例7: applyToPlot
import org.jfree.chart.plot.ThermometerPlot; //导入依赖的package包/类
/**
* Applies the attributes of this theme to a plot.
*
* @param plot the plot (<code>null</code>).
*/
protected void applyToPlot(Plot plot) {
if (plot == null) {
throw new IllegalArgumentException("Null 'plot' argument.");
}
if (plot.getDrawingSupplier() != null) {
plot.setDrawingSupplier(getDrawingSupplier());
}
if (plot.getBackgroundPaint() != null) {
plot.setBackgroundPaint(this.plotBackgroundPaint);
}
plot.setOutlinePaint(this.plotOutlinePaint);
// now handle specific plot types (and yes, I know this is some
// really ugly code that has to be manually updated any time a new
// plot type is added - I should have written something much cooler,
// but I didn't and neither did anyone else).
if (plot instanceof PiePlot) {
applyToPiePlot((PiePlot) plot);
}
else if (plot instanceof MultiplePiePlot) {
applyToMultiplePiePlot((MultiplePiePlot) plot);
}
else if (plot instanceof CategoryPlot) {
applyToCategoryPlot((CategoryPlot) plot);
}
else if (plot instanceof XYPlot) {
applyToXYPlot((XYPlot) plot);
}
else if (plot instanceof FastScatterPlot) {
applyToFastScatterPlot((FastScatterPlot) plot);
}
else if (plot instanceof MeterPlot) {
applyToMeterPlot((MeterPlot) plot);
}
else if (plot instanceof ThermometerPlot) {
applyToThermometerPlot((ThermometerPlot) plot);
}
else if (plot instanceof SpiderWebPlot) {
applyToSpiderWebPlot((SpiderWebPlot) plot);
}
else if (plot instanceof PolarPlot) {
applyToPolarPlot((PolarPlot) plot);
}
}