本文整理汇总了Java中org.jfree.chart.renderer.PaintScale类的典型用法代码示例。如果您正苦于以下问题:Java PaintScale类的具体用法?Java PaintScale怎么用?Java PaintScale使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PaintScale类属于org.jfree.chart.renderer包,在下文中一共展示了PaintScale类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PaintScaleLegend
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* Creates a new instance.
*
* @param scale the scale (<code>null</code> not permitted).
* @param axis the axis (<code>null</code> not permitted).
*/
public PaintScaleLegend(PaintScale scale, ValueAxis axis) {
ParamChecks.nullNotPermitted(axis, "axis");
this.scale = scale;
this.axis = axis;
this.axis.addChangeListener(this);
this.axisLocation = AxisLocation.BOTTOM_OR_LEFT;
this.axisOffset = 0.0;
this.axis.setRange(scale.getLowerBound(), scale.getUpperBound());
this.stripWidth = 15.0;
this.stripOutlineVisible = true;
this.stripOutlinePaint = Color.gray;
this.stripOutlineStroke = new BasicStroke(0.5f);
this.backgroundPaint = Color.white;
this.subdivisions = 100;
}
示例2: createHeatMapImage
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* Creates an image that displays the values from the specified dataset.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param paintScale the paint scale for the z-values (<code>null</code>
* not permitted).
*
* @return A buffered image.
*/
public static BufferedImage createHeatMapImage(HeatMapDataset dataset,
PaintScale paintScale) {
ParamChecks.nullNotPermitted(dataset, "dataset");
ParamChecks.nullNotPermitted(paintScale, "paintScale");
int xCount = dataset.getXSampleCount();
int yCount = dataset.getYSampleCount();
BufferedImage image = new BufferedImage(xCount, yCount,
BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = image.createGraphics();
for (int xIndex = 0; xIndex < xCount; xIndex++) {
for (int yIndex = 0; yIndex < yCount; yIndex++) {
double z = dataset.getZValue(xIndex, yIndex);
Paint p = paintScale.getPaint(z);
g2.setPaint(p);
g2.fillRect(xIndex, yCount - yIndex - 1, 1, 1);
}
}
return image;
}
示例3: PaintScaleLegend
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* Creates a new instance.
*
* @param scale the scale ({@code null} not permitted).
* @param axis the axis ({@code null} not permitted).
*/
public PaintScaleLegend(PaintScale scale, ValueAxis axis) {
Args.nullNotPermitted(axis, "axis");
this.scale = scale;
this.axis = axis;
this.axis.addChangeListener(this);
this.axisLocation = AxisLocation.BOTTOM_OR_LEFT;
this.axisOffset = 0.0;
this.axis.setRange(scale.getLowerBound(), scale.getUpperBound());
this.stripWidth = 15.0;
this.stripOutlineVisible = true;
this.stripOutlinePaint = Color.GRAY;
this.stripOutlineStroke = new BasicStroke(0.5f);
this.backgroundPaint = Color.WHITE;
this.subdivisions = 100;
}
示例4: createHeatMapImage
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* Creates an image that displays the values from the specified dataset.
*
* @param dataset the dataset ({@code null} not permitted).
* @param paintScale the paint scale for the z-values ({@code null}
* not permitted).
*
* @return A buffered image.
*/
public static BufferedImage createHeatMapImage(HeatMapDataset dataset,
PaintScale paintScale) {
Args.nullNotPermitted(dataset, "dataset");
Args.nullNotPermitted(paintScale, "paintScale");
int xCount = dataset.getXSampleCount();
int yCount = dataset.getYSampleCount();
BufferedImage image = new BufferedImage(xCount, yCount,
BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = image.createGraphics();
for (int xIndex = 0; xIndex < xCount; xIndex++) {
for (int yIndex = 0; yIndex < yCount; yIndex++) {
double z = dataset.getZValue(xIndex, yIndex);
Paint p = paintScale.getPaint(z);
g2.setPaint(p);
g2.fillRect(xIndex, yCount - yIndex - 1, 1, 1);
}
}
return image;
}
示例5: PaintScaleLegend
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* Creates a new instance.
*
* @param scale the scale (<code>null</code> not permitted).
* @param axis the axis (<code>null</code> not permitted).
*/
public PaintScaleLegend(PaintScale scale, ValueAxis axis) {
if (axis == null) {
throw new IllegalArgumentException("Null 'axis' argument.");
}
this.scale = scale;
this.axis = axis;
this.axisLocation = AxisLocation.BOTTOM_OR_LEFT;
this.axisOffset = 0.0;
this.axis.setRange(scale.getLowerBound(), scale.getUpperBound());
this.stripWidth = 15.0;
this.stripOutlineVisible = false;
this.stripOutlinePaint = Color.gray;
this.stripOutlineStroke = new BasicStroke(0.5f);
this.backgroundPaint = Color.white;
this.subdivisions = 100;
}
示例6: PaintScaleLegend
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* Creates a new instance.
*
* @param scale the scale (<code>null</code> not permitted).
* @param axis the axis (<code>null</code> not permitted).
*/
public PaintScaleLegend(PaintScale scale, ValueAxis axis) {
if (axis == null) {
throw new IllegalArgumentException("Null 'axis' argument.");
}
this.scale = scale;
this.axis = axis;
this.axis.addChangeListener(this);
this.axisLocation = AxisLocation.BOTTOM_OR_LEFT;
this.axisOffset = 0.0;
this.axis.setRange(scale.getLowerBound(), scale.getUpperBound());
this.stripWidth = 15.0;
this.stripOutlineVisible = true;
this.stripOutlinePaint = Color.gray;
this.stripOutlineStroke = new BasicStroke(0.5f);
this.backgroundPaint = Color.white;
this.subdivisions = 100;
}
示例7: createHeatMapImage
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* Creates an image that displays the values from the specified dataset.
*
* @param dataset the dataset (<code>null</code> not permitted).
* @param paintScale the paint scale for the z-values (<code>null</code>
* not permitted).
*
* @return A buffered image.
*/
public static BufferedImage createHeatMapImage(HeatMapDataset dataset,
PaintScale paintScale) {
if (dataset == null) {
throw new IllegalArgumentException("Null 'dataset' argument.");
}
if (paintScale == null) {
throw new IllegalArgumentException("Null 'paintScale' argument.");
}
int xCount = dataset.getXSampleCount();
int yCount = dataset.getYSampleCount();
BufferedImage image = new BufferedImage(xCount, yCount,
BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = image.createGraphics();
for (int xIndex = 0; xIndex < xCount; xIndex++) {
for (int yIndex = 0; yIndex < yCount; yIndex++) {
double z = dataset.getZValue(xIndex, yIndex);
Paint p = paintScale.getPaint(z);
g2.setPaint(p);
g2.fillRect(xIndex, yCount - yIndex - 1, 1, 1);
}
}
return image;
}
示例8: createPaintScale
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* Creates and returns a JFreeChart {@link PaintScale} that converts data
* values to {@link Color}s.
*/
public static PaintScale createPaintScale(final ColourScheme colourScheme) {
return new PaintScale() {
@Override
public double getLowerBound() {
return colourScheme.getScaleMin();
}
@Override
public double getUpperBound() {
return colourScheme.getScaleMax();
}
@Override
public Color getPaint(double value) {
return colourScheme.getColor(value);
}
};
}
示例9: PaintScaleLegend
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* Creates a new instance.
*
* @param scale the scale (<code>null</code> not permitted).
* @param axis the axis (<code>null</code> not permitted).
*/
public PaintScaleLegend(PaintScale scale, ValueAxis axis) {
if (axis == null) {
throw new IllegalArgumentException("Null 'axis' argument.");
}
this.scale = scale;
this.axis = axis;
this.axisLocation = AxisLocation.BOTTOM_OR_LEFT;
this.axisOffset = 0.0;
this.stripWidth = 15.0;
this.stripOutlineVisible = false;
this.stripOutlinePaint = Color.gray;
this.stripOutlineStroke = new BasicStroke(0.5f);
this.backgroundPaint = Color.white;
}
示例10: RTMZRenderer
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
public RTMZRenderer(AbstractXYZDataset dataset, PaintScale paintScale) {
super(false, true);
this.dataset = dataset;
this.paintScale = paintScale;
this.setSeriesShape(0, dataPointsShape);
setDrawSeriesLineAsPath(true);
}
示例11: setPaintScale
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
void setPaintScale(PaintScale paintScale) {
this.paintScale = paintScale;
}
示例12: setScale
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* Sets the scale and sends a {@link TitleChangeEvent} to all registered
* listeners.
*
* @param scale the scale (<code>null</code> not permitted).
*
* @see #getScale()
*/
public void setScale(PaintScale scale) {
if (scale == null) {
throw new IllegalArgumentException("Null 'scale' argument.");
}
this.scale = scale;
notifyListeners(new TitleChangeEvent(this));
}
示例13: setPaintScale
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* Sets the paint scale used by the renderer.
*
* @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;
notifyListeners(new RendererChangeEvent(this));
}
示例14: setScale
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* Sets the scale and sends a {@link TitleChangeEvent} to all registered
* listeners.
*
* @param scale the scale (<code>null</code> not permitted).
*
* @see #getScale()
*/
public void setScale(PaintScale scale) {
if (scale == null) {
throw new IllegalArgumentException("Null 'scale' argument.");
}
this.scale = scale;
notifyListeners(new TitleChangeEvent(this));
}
示例15: setPaintScale
import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
/**
* 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()
*/
public void setPaintScale(PaintScale scale) {
if (scale == null) {
throw new IllegalArgumentException("Null 'scale' argument.");
}
this.paintScale = scale;
notifyListeners(new RendererChangeEvent(this));
}