当前位置: 首页>>代码示例>>Java>>正文


Java PaintScale类代码示例

本文整理汇总了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;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:22,代码来源:PaintScaleLegend.java

示例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;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:30,代码来源:HeatMapUtilities.java

示例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;
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:22,代码来源:PaintScaleLegend.java

示例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;
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:30,代码来源:HeatMapUtils.java

示例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;
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:23,代码来源:PaintScaleLegend.java

示例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;
}
 
开发者ID:lulab,项目名称:PI,代码行数:24,代码来源:PaintScaleLegend.java

示例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;
}
 
开发者ID:lulab,项目名称:PI,代码行数:34,代码来源:HeatMapUtilities.java

示例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);
        }
    };
}
 
开发者ID:Reading-eScience-Centre,项目名称:edal-java,代码行数:23,代码来源:Charting.java

示例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;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:21,代码来源:PaintScaleLegend.java

示例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);
   }
 
开发者ID:mzmine,项目名称:mzmine2,代码行数:9,代码来源:RTMZRenderer.java

示例11: setPaintScale

import org.jfree.chart.renderer.PaintScale; //导入依赖的package包/类
void setPaintScale(PaintScale paintScale) {
this.paintScale = paintScale;
   }
 
开发者ID:mzmine,项目名称:mzmine2,代码行数:4,代码来源:RTMZRenderer.java

示例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));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:16,代码来源:PaintScaleLegend.java

示例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));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:16,代码来源:XYBlockRenderer.java

示例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));
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:16,代码来源:PaintScaleLegend.java

示例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));
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:16,代码来源:XYShapeRenderer.java


注:本文中的org.jfree.chart.renderer.PaintScale类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。