本文整理了Java中org.jfree.data.xy.XYSeries.setKey()
方法的一些代码示例,展示了XYSeries.setKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYSeries.setKey()
方法的具体详情如下:
包路径:org.jfree.data.xy.XYSeries
类名称:XYSeries
方法名:setKey
暂无
代码示例来源:origin: ca.umontreal.iro/ssj
/**
* Sets the name of the selected series.
*
* @param series series index.
*
* @param name point set new name.
*
*/
public void setName (int series, String name) {
if(name == null)
name = " ";
((XYSeriesCollection)seriesCollection).getSeries(series).setKey(name);
}
代码示例来源:origin: mikaelhg/openblocks
/**
* Updates the series name at the specified index
* @param seriesName the new seriesName to set at the specified index
* @param index the desired index to set the new seriesName to
*/
public void updateSeriesNameAt(String seriesName, int index) {
if (!lock) {
XYSeries s = ((XYSeriesCollection) chart.getXYPlot().getDataset()).getSeries(index);
s.setKey(seriesName);
}
}
代码示例来源:origin: mikaelhg/openblocks
/**
* Updates the values for the specified seriesName with the given values
* @param seriesName the name a series in the graph
* @param index the index of the desired series to update
* @param time the time at which to update
* @param value the value to update
*/
public void updateValues(String seriesName, int index, double time, double value) {
if (!lock) {
XYSeries s = ((XYSeriesCollection) chart.getXYPlot().getDataset()).getSeries(index);
s.setKey(seriesName);
s.addOrUpdate(time, value);
}
}
代码示例来源:origin: Audiveris/audiveris
/**
* Augment the provided plotter with projection data pertaining to time signature
*
* @param plotter the plotter to augment
*/
protected void addPlot (ChartPlotter plotter)
{
{
// Values
XYSeries series = projection.getValueSeries();
series.setKey("Time");
plotter.add(series, Color.BLUE);
}
if (range.hasStart() || (staff.getTimeStop() != null)) {
// Area limits
XYSeries series = new XYSeries("TimeArea", false); // No autosort
int start = range.hasStart() ? range.getStart() : staff.getTimeStart();
int stop = range.hasStart() ? range.getStop() : staff.getTimeStop();
series.add(start, 0);
series.add(start, staff.getHeight());
series.add(stop, staff.getHeight());
series.add(stop, 0);
plotter.add(series, Color.BLUE);
}
}
代码示例来源:origin: Audiveris/audiveris
projection.getXMin(),
projection.getXMax());
valueSeries.setKey("Key");
plotter.add(valueSeries, Colors.CHART_VALUE);
内容来源于网络,如有侵权,请联系作者删除!