org.jfree.data.xy.XYSeries.setKey()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中org.jfree.data.xy.XYSeries.setKey()方法的一些代码示例,展示了XYSeries.setKey()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYSeries.setKey()方法的具体详情如下:
包路径:org.jfree.data.xy.XYSeries
类名称:XYSeries
方法名:setKey

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);

相关文章