gpt4 book ai didi

org.jfree.data.xy.YIntervalSeriesCollection类的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 00:53:31 26 4
gpt4 key购买 nike

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

YIntervalSeriesCollection介绍

[英]A collection of YIntervalSeries objects.
[中]YIntervalSeries对象的集合。

代码示例

代码示例来源:origin: kiegroup/optaplanner

private JFreeChart createChart(Schedule schedule) {
  YIntervalSeriesCollection seriesCollection = new YIntervalSeriesCollection();
  Map<Project, YIntervalSeries> projectSeriesMap = new LinkedHashMap<>(
      schedule.getProjectList().size());
  for (Project project : schedule.getProjectList()) {
    YIntervalSeries projectSeries = new YIntervalSeries(project.getLabel());
    seriesCollection.addSeries(projectSeries);
    projectSeriesMap.put(project, projectSeries);
    renderer.setSeriesShape(seriesIndex, new Rectangle());

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns the end x-value for an item within a series.  This method
 * maps directly to {@link #getX(int, int)}.
 *
 * @param series  the series index.
 * @param item  the item index.
 *
 * @return The x-value.
 */
public Number getEndX(int series, int item) {
  return getX(series, item);
}

代码示例来源:origin: jfree/jfreechart

/**
 * Removes a series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 *
 * @param series  the series index (zero-based).
 *
 * @since 1.0.10
 */
public void removeSeries(int series) {
  if ((series < 0) || (series >= getSeriesCount())) {
    throw new IllegalArgumentException("Series index out of bounds.");
  }
  YIntervalSeries ts = (YIntervalSeries) this.data.get(series);
  ts.removeChangeListener(this);
  this.data.remove(series);
  fireDatasetChanged();
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Adds a series to the collection and sends a {@link DatasetChangeEvent}
 * to all registered listeners.
 *
 * @param series  the series (<code>null</code> not permitted).
 */
public void addSeries(YIntervalSeries series) {
  if (series == null) {
    throw new IllegalArgumentException("Null 'series' argument.");
  }
  this.data.add(series);
  series.addChangeListener(this);
  fireDatasetChanged();
}

代码示例来源:origin: jmacglashan/burlap

colCSRAvg.addSeries(this.csrAvgSeries);
colCERAvg.addSeries(this.cerAvgSeries);
colAERAvg.addSeries(this.aerAvgSeries);
colMERAvg.addSeries(this.merAvgSeries);
colCSEAvg.addSeries(this.cseAvgSeries);
colSEAvg.addSeries(this.seAvgSeries);

代码示例来源:origin: jmacglashan/burlap

colSE = new XYSeriesCollection();
colCSRAvg = new YIntervalSeriesCollection();
colCERAvg = new YIntervalSeriesCollection();
colAERAvg = new YIntervalSeriesCollection();
colMERAvg = new YIntervalSeriesCollection();
colCSEAvg = new YIntervalSeriesCollection();
colSEAvg = new YIntervalSeriesCollection();

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns the number of items in the specified series.
 *
 * @param series  the series (zero-based index).
 *
 * @return The item count.
 *
 * @throws IllegalArgumentException if <code>series</code> is not in the
 *     range <code>0</code> to <code>getSeriesCount() - 1</code>.
 */
public int getItemCount(int series) {
  // defer argument checking
  return getSeries(series).getItemCount();
}

代码示例来源:origin: jfree/jfreechart

/**
 * Returns a series from the collection.
 *
 * @param series  the series index (zero-based).
 *
 * @return The series.
 *
 * @throws IllegalArgumentException if {@code series} is not in the
 *     range {@code 0} to {@code getSeriesCount() - 1}.
 */
public YIntervalSeries getSeries(int series) {
  if ((series < 0) || (series >= getSeriesCount())) {
    throw new IllegalArgumentException("Series index out of bounds");
  }
  return (YIntervalSeries) this.data.get(series);
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Removes a series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 *
 * @param series  the series index (zero-based).
 *
 * @since 1.0.10
 */
public void removeSeries(int series) {
  if ((series < 0) || (series >= getSeriesCount())) {
    throw new IllegalArgumentException("Series index out of bounds.");
  }
  YIntervalSeries ts = (YIntervalSeries) this.data.get(series);
  ts.removeChangeListener(this);
  this.data.remove(series);
  fireDatasetChanged();
}

代码示例来源:origin: jfree/jfreechart

/**
 * Removes all the series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 *
 * @since 1.0.10
 */
public void removeAllSeries() {
  // Unregister the collection as a change listener to each series in
  // the collection.
  for (int i = 0; i < this.data.size(); i++) {
   YIntervalSeries series = (YIntervalSeries) this.data.get(i);
   series.removeChangeListener(this);
  }
  this.data.clear();
  fireDatasetChanged();
}

代码示例来源:origin: jmacglashan/burlap

colCSRAvg.addSeries(this.csrAvgSeries);
colCERAvg.addSeries(this.cerAvgSeries);
colAERAvg.addSeries(this.aerAvgSeries);
colMERAvg.addSeries(this.merAvgSeries);
colCSEAvg.addSeries(this.cseAvgSeries);
colSEAvg.addSeries(this.seAvgSeries);

代码示例来源:origin: jmacglashan/burlap

colSE = new XYSeriesCollection();
colCSRAvg = new YIntervalSeriesCollection();
colCERAvg = new YIntervalSeriesCollection();
colAERAvg = new YIntervalSeriesCollection();
colMERAvg = new YIntervalSeriesCollection();
colCSEAvg = new YIntervalSeriesCollection();
colSEAvg = new YIntervalSeriesCollection();

代码示例来源:origin: jfree/jfreechart

/**
 * Returns the number of items in the specified series.
 *
 * @param series  the series (zero-based index).
 *
 * @return The item count.
 *
 * @throws IllegalArgumentException if {@code series} is not in the
 *     range {@code 0} to {@code getSeriesCount() - 1}.
 */
@Override
public int getItemCount(int series) {
  // defer argument checking
  return getSeries(series).getItemCount();
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Returns a series from the collection.
 *
 * @param series  the series index (zero-based).
 *
 * @return The series.
 *
 * @throws IllegalArgumentException if <code>series</code> is not in the
 *     range <code>0</code> to <code>getSeriesCount() - 1</code>.
 */
public YIntervalSeries getSeries(int series) {
  if ((series < 0) || (series >= getSeriesCount())) {
    throw new IllegalArgumentException("Series index out of bounds");
  }
  return (YIntervalSeries) this.data.get(series);
}

代码示例来源:origin: inspectIT/inspectIT

/**
 * Initializes the upper plot.
 *
 * @return An instance of {@link XYPlot}.
 */
private XYPlot initializePlot() {
  jmxChart = new YIntervalSeriesImproved("jmx value");
  YIntervalSeriesCollection yintervalseriescollection = new YIntervalSeriesCollection();
  yintervalseriescollection.addSeries(jmxChart);
  DeviationRenderer renderer = new DeviationRenderer(true, false);
  renderer.setBaseShapesVisible(true);
  renderer.setSeriesStroke(0, new BasicStroke(3.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
  renderer.setSeriesFillPaint(0, new Color(255, 200, 200));
  renderer.setSeriesOutlineStroke(0, new BasicStroke(2.0f));
  renderer.setSeriesShape(0, new Ellipse2D.Double(-2.5, -2.5, 5.0, 5.0));
  renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator(StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT, DateFormat.getDateTimeInstance(), NumberFormat.getNumberInstance()));
  NumberAxis rangeAxis = plotDataSolver.getAxis();
  subplot = new XYPlot(yintervalseriescollection, null, rangeAxis, renderer);
  subplot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
  subplot.setRangeAxisLocation(AxisLocation.TOP_OR_LEFT);
  subplot.setRangeCrosshairVisible(true);
  return subplot;
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Removes all the series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 *
 * @since 1.0.10
 */
public void removeAllSeries() {
  // Unregister the collection as a change listener to each series in
  // the collection.
  for (int i = 0; i < this.data.size(); i++) {
   YIntervalSeries series = (YIntervalSeries) this.data.get(i);
   series.removeChangeListener(this);
  }
  this.data.clear();
  fireDatasetChanged();
}

代码示例来源:origin: jfree/jfreechart

/**
 * Returns the start x-value for an item within a series.  This method
 * maps directly to {@link #getX(int, int)}.
 *
 * @param series  the series index.
 * @param item  the item index.
 *
 * @return The x-value.
 */
@Override
public Number getStartX(int series, int item) {
  return getX(series, item);
}

代码示例来源:origin: jfree/jfreechart

/**
 * Returns the key for a series.
 *
 * @param series  the series index (in the range {@code 0} to
 *     {@code getSeriesCount() - 1}).
 *
 * @return The key for a series.
 *
 * @throws IllegalArgumentException if {@code series} is not in the
 *     specified range.
 */
@Override
public Comparable getSeriesKey(int series) {
  // defer argument checking
  return getSeries(series).getKey();
}

代码示例来源:origin: inspectIT/inspectIT

/**
 * Initializes the upper plot with the given input data.
 *
 * @return An instance of {@link XYPlot}
 */
private XYPlot initializeUpperPlot() {
  liveThreads = new YIntervalSeriesImproved("live");
  peakThreads = new YIntervalSeriesImproved("peak");
  YIntervalSeriesCollection yIntervalSeriesCollection = new YIntervalSeriesCollection();
  yIntervalSeriesCollection.addSeries(liveThreads);
  yIntervalSeriesCollection.addSeries(peakThreads);
  DeviationRenderer renderer = new DeviationRenderer(true, false);
  renderer.setBaseShapesVisible(true);
  renderer.setSeriesStroke(0, new BasicStroke(3.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
  renderer.setSeriesFillPaint(0, new Color(255, 200, 200));
  renderer.setSeriesOutlineStroke(0, new BasicStroke(2.0f));
  renderer.setSeriesShape(0, new Ellipse2D.Double(-2.5, -2.5, 5.0, 5.0));
  renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator(StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT, DateFormat.getDateTimeInstance(), NumberFormat.getNumberInstance()));
  final NumberAxis rangeAxis = new NumberAxis("Threads");
  rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
  rangeAxis.setAutoRangeMinimumSize(10.0d, false);
  rangeAxis.setRangeType(RangeType.POSITIVE);
  final XYPlot subplot = new XYPlot(yIntervalSeriesCollection, null, rangeAxis, renderer);
  subplot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
  subplot.setRangeAxisLocation(AxisLocation.TOP_OR_LEFT);
  subplot.setRangeCrosshairVisible(true);
  return subplot;
}

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Removes a series from the collection and sends a
 * {@link DatasetChangeEvent} to all registered listeners.
 *
 * @param series  the series (<code>null</code> not permitted).
 *
 * @since 1.0.10
 */
public void removeSeries(YIntervalSeries series) {
  if (series == null) {
    throw new IllegalArgumentException("Null 'series' argument.");
  }
  if (this.data.contains(series)) {
    series.removeChangeListener(this);
    this.data.remove(series);
    fireDatasetChanged();
  }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com