gpt4 book ai didi

org.jfree.chart.renderer.xy.XYBlockRenderer类的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 04:24:40 27 4
gpt4 key购买 nike

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

XYBlockRenderer介绍

[英]A renderer that represents data from an XYZDataset by drawing a color block at each (x, y) point, where the color is a function of the z-value from the dataset. The example shown here is generated by the XYBlockChartDemo1.java program included in the JFreeChart demo collection:
[中]一种渲染器,通过在每个(x,y)点绘制颜色块来表示XYZDataset中的数据,其中颜色是数据集中z值的函数。这里显示的示例由XYBlockChartDemo1生成。JFreeChart演示集合中包含的java程序:

代码示例

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

/**
 * Sets the height of the blocks used to represent each data item and
 * sends a {@link RendererChangeEvent} to all registered listeners.
 *
 * @param height  the new height, in data/axis units (must be > 0.0).
 *
 * @see #getBlockHeight()
 */
public void setBlockHeight(double height) {
  if (height <= 0.0) {
    throw new IllegalArgumentException(
        "The 'height' argument must be > 0.0");
  }
  this.blockHeight = height;
  updateOffsets();
  fireChangeEvent();
}

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

chart.getXYPlot().getRangeAxis().setUpperMargin(0);
XYBlockRenderer renderer = new XYBlockRenderer();
if (xyBlockPlot.getBlockWidth() != null) {
  renderer.setBlockWidth(xyBlockPlot.getBlockWidth());
  renderer.setBlockHeight(xyBlockPlot.getBlockHeight());
  renderer.setBlockAnchor(ConstantTransform.rectangleAnchor(xyBlockPlot.getBlockAnchor()));
  paintScale.add(scale.getValue(), scale.getPaint());
renderer.setPaintScale(paintScale);

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

if (getDrawOutlines()) {
  if (getUseOutlinePaint()) {
    g2.setPaint(getItemOutlinePaint(series, item));
  g2.setStroke(lookupSeriesOutlineStroke(series));
  g2.draw(block);
if (isItemLabelVisible(series, item)) {
  drawItemLabel(g2, orientation, dataset, series, item, 
      block.getCenterX(), block.getCenterY(), y < 0.0);
double transY = rangeAxis.valueToJava2D(y, dataArea,
    plot.getRangeAxisEdge());        
updateCrosshairValues(crosshairState, x, y, datasetIndex,
    transX, transY, orientation);
  addEntity(entities, block, dataset, series, item, 
      block.getCenterX(), block.getCenterY());

代码示例来源:origin: no.uib/jsparklines

XYBlockRenderer renderer = new XYBlockRenderer();
renderer.setPaintScale(paintScale);

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

/**
 * Sets the flag that controls whether the outline paint is used to draw
 * block outlines, and sends a {@link RendererChangeEvent} to all
 * registered listeners.
 *
 * @param flag  the flag.
 *
 * @see #getUseOutlinePaint()
 */
public void setUseOutlinePaint(boolean flag) {
  this.useOutlinePaint = flag;
  fireChangeEvent();
}

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

/**
 * Creates a new {@code XYBlockRenderer} instance with default
 * attributes.
 */
public XYBlockRenderer() {
  updateOffsets();
  this.paintScale = new LookupPaintScale();
  this.drawOutlines = true;
  this.useOutlinePaint = false; // use item paint by default
}

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

addEntity(entities, block, dataset, series, item, 0.0, 0.0);

代码示例来源:origin: zolyfarkas/spf4j

yAxis.setLowerMargin(0);
yAxis.setUpperMargin(0);
XYBlockRenderer renderer = new XYBlockRenderer();
PaintScale scale;
if (dataSet.getMinValue() >= dataSet.getMaxValue()) {
 scale = new InverseGrayScale(dataSet.getMinValue(), dataSet.getMaxValue());
renderer.setPaintScale(scale);
renderer.setBlockWidth(1);
renderer.setBlockHeight(1);
XYPlot plot = new XYPlot(dataSet, xAxis, yAxis, renderer);
plot.setBackgroundPaint(Color.white);

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

/**
 * Sets the flag that controls whether outlines are drawn for
 * blocks, and sends a {@link RendererChangeEvent} to all registered
 * listeners.
 *
 * @param flag  the flag.
 *
 * @see #getDrawOutlines()
 */
public void setDrawOutlines(boolean flag) {
  this.drawOutlines = flag;
  fireChangeEvent();
}

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

/**
 * Creates a new <code>XYBlockRenderer</code> instance with default
 * attributes.
 */
public XYBlockRenderer() {
  updateOffsets();
  this.paintScale = new LookupPaintScale();
}

代码示例来源:origin: sjsdfg/dl4j-tutorials

yAxis.setRange(mins[1], maxs[1]);
XYBlockRenderer renderer = new XYBlockRenderer();
renderer.setBlockWidth((maxs[0]-mins[0])/(nPoints-1));
renderer.setBlockHeight((maxs[1] - mins[1]) / (nPoints - 1));
PaintScale scale = new GrayPaintScale(0, 1.0);
renderer.setPaintScale(scale);
XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
plot.setBackgroundPaint(Color.lightGray);

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

/**
 * Sets the height of the blocks used to represent each data item and
 * sends a {@link RendererChangeEvent} to all registered listeners.
 *
 * @param height  the new height, in data/axis units (must be &gt; 0.0).
 *
 * @see #getBlockHeight()
 */
public void setBlockHeight(double height) {
  if (height <= 0.0) {
    throw new IllegalArgumentException(
        "The 'height' argument must be > 0.0");
  }
  this.blockHeight = height;
  updateOffsets();
  fireChangeEvent();
}

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

/**
 * Sets the paint scale used by the renderer and sends a
 * {@link RendererChangeEvent} to all registered listeners.
 *
 * @param scale  the scale (<code>null</code> not permitted).
 *
 * @see #getPaintScale()
 * @since 1.0.4
 */
public void setPaintScale(PaintScale scale) {
  if (scale == null) {
    throw new IllegalArgumentException("Null 'scale' argument.");
  }
  this.paintScale = scale;
  fireChangeEvent();
}

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

/**
 * Sets the width of the blocks used to represent each data item and
 * sends a {@link RendererChangeEvent} to all registered listeners.
 *
 * @param width  the new width, in data/axis units (must be &gt; 0.0).
 *
 * @see #getBlockWidth()
 */
public void setBlockWidth(double width) {
  if (width <= 0.0) {
    throw new IllegalArgumentException(
        "The 'width' argument must be > 0.0");
  }
  this.blockWidth = width;
  updateOffsets();
  fireChangeEvent();
}

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

/**
 * Sets the paint scale used by the renderer and sends a
 * {@link RendererChangeEvent} to all registered listeners.
 *
 * @param scale  the scale ({@code null} not permitted).
 *
 * @see #getPaintScale()
 * @since 1.0.4
 */
public void setPaintScale(PaintScale scale) {
  Args.nullNotPermitted(scale, "scale");
  this.paintScale = scale;
  fireChangeEvent();
}

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

/**
 * Sets the width of the blocks used to represent each data item and
 * sends a {@link RendererChangeEvent} to all registered listeners.
 *
 * @param width  the new width, in data/axis units (must be > 0.0).
 *
 * @see #getBlockWidth()
 */
public void setBlockWidth(double width) {
  if (width <= 0.0) {
    throw new IllegalArgumentException(
        "The 'width' argument must be > 0.0");
  }
  this.blockWidth = width;
  updateOffsets();
  fireChangeEvent();
}

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

/**
 * Sets the anchor point used to align a block at its (x, y) location and
 * sends a {@link RendererChangeEvent} to all registered listeners.
 *
 * @param anchor  the anchor.
 *
 * @see #getBlockAnchor()
 */
public void setBlockAnchor(RectangleAnchor anchor) {
  if (anchor == null) {
    throw new IllegalArgumentException("Null 'anchor' argument.");
  }
  if (this.blockAnchor.equals(anchor)) {
    return;  // no change
  }
  this.blockAnchor = anchor;
  updateOffsets();
  fireChangeEvent();
}

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

/**
 * Sets the anchor point used to align a block at its (x, y) location and
 * sends a {@link RendererChangeEvent} to all registered listeners.
 *
 * @param anchor  the anchor.
 *
 * @see #getBlockAnchor()
 */
public void setBlockAnchor(RectangleAnchor anchor) {
  Args.nullNotPermitted(anchor, "anchor");
  if (this.blockAnchor.equals(anchor)) {
    return;  // no change
  }
  this.blockAnchor = anchor;
  updateOffsets();
  fireChangeEvent();
}

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