Java Code Examples for org.jfree.chart.plot.ThermometerPlot#setValueFont()
The following examples show how to use
org.jfree.chart.plot.ThermometerPlot#setValueFont() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StandardChartTheme.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * 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); } }
Example 2
Source File: StandardChartTheme.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * 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); } }
Example 3
Source File: StandardChartTheme.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * 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); } }
Example 4
Source File: StandardChartTheme.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * 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); } }
Example 5
Source File: StandardChartTheme.java From astor with GNU General Public License v2.0 | 5 votes |
/** * 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); } }
Example 6
Source File: StandardChartTheme.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * 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); } }
Example 7
Source File: StandardChartTheme.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * 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); } }
Example 8
Source File: Thermometer.java From Knowage-Server with GNU Affero General Public License v3.0 | 4 votes |
/** * Creates a chart of type thermometer. * * @param chartTitle the chart title. * @param dataset the dataset. * * @return A chart thermometer. */ public JFreeChart createChart(DatasetMap datasets) { logger.debug("IN"); Dataset dataset=(Dataset)datasets.getDatasets().get("1"); ThermometerPlot plot = new ThermometerPlot((ValueDataset)dataset); JFreeChart chart = new JFreeChart(name, JFreeChart.DEFAULT_TITLE_FONT, plot, true); chart.setBackgroundPaint(color); TextTitle title = setStyleTitle(name, styleTitle); chart.setTitle(title); if(subName!= null && !subName.equals("")){ TextTitle subTitle =setStyleTitle(subName, styleSubTitle); chart.addSubtitle(subTitle); } 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.setGap(3); plot.setValueLocation(3); plot.setValuePaint(labelsValueStyle.getColor()); plot.setValueFont(new Font(labelsValueStyle.getFontName(), Font.PLAIN, labelsValueStyle.getSize())); plot.setRange(lower, upper); if(units.equalsIgnoreCase(FAHRENHEIT))plot.setUnits(ThermometerPlot.UNITS_FAHRENHEIT); else if(units.equalsIgnoreCase(CELCIUS)) plot.setUnits(ThermometerPlot.UNITS_CELCIUS); else if(units.equalsIgnoreCase(KELVIN)) plot.setUnits(ThermometerPlot.UNITS_KELVIN); else plot.setUnits(ThermometerPlot.UNITS_NONE); // set subranges for (Iterator iterator = intervals.iterator(); iterator.hasNext();){ KpiInterval subrange = (KpiInterval) iterator.next(); int range=0; if(subrange.getLabel().equalsIgnoreCase(NORMAL))range=(ThermometerPlot.NORMAL); else if(subrange.getLabel().equalsIgnoreCase(WARNING))range=(ThermometerPlot.WARNING); else if(subrange.getLabel().equalsIgnoreCase(CRITICAL))range=(ThermometerPlot.CRITICAL); plot.setSubrange(range, subrange.getMin(), subrange.getMax()); if(subrange.getColor()!=null){ plot.setSubrangePaint(range, subrange.getColor()); } //plot.setDisplayRange(subrange.getRange(), subrange.getLower(), subrange.getUpper()); } //plot.setFollowDataInSubranges(true); logger.debug("OUT"); return chart; }