Java 类org.jfree.chart.renderer.PaintScale 实例源码

项目:ccu-historian    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:ccu-historian    文件:HeatMapUtilities.java   
/**
 * 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;
}
项目:jfreechart    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:jfreechart    文件:HeatMapUtils.java   
/**
 * 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;
}
项目:aya-lang    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:aya-lang    文件:HeatMapUtilities.java   
/**
 * 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;
}
项目:HTML5_WebSite    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:populus    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:populus    文件:HeatMapUtilities.java   
/**
 * 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;
}
项目:PI    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:PI    文件:HeatMapUtilities.java   
/**
 * 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;
}
项目:ECG-Viewer    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:ECG-Viewer    文件:HeatMapUtilities.java   
/**
 * 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;
}
项目:astor    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:astor    文件:HeatMapUtilities.java   
/**
 * 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;
}
项目:group-five    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:group-five    文件:HeatMapUtilities.java   
/**
 * 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;
}
项目:manydesigns.cn    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:manydesigns.cn    文件:HeatMapUtilities.java   
/**
 * 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;
}
项目:edal-java    文件:Charting.java   
/**
 * 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);
        }
    };
}
项目:buffer_bci    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:buffer_bci    文件:HeatMapUtilities.java   
/**
 * 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;
}
项目:buffer_bci    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:buffer_bci    文件:HeatMapUtilities.java   
/**
 * 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;
}
项目:proyecto-teoria-control-utn-frro    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:proyecto-teoria-control-utn-frro    文件:HeatMapUtilities.java   
/**
 * 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;
}
项目:Memetic-Algorithm-for-TSP    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:Memetic-Algorithm-for-TSP    文件:HeatMapUtilities.java   
/**
 * 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;
}
项目:parabuild-ci    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:mzmine2    文件:RTMZRenderer.java   
public RTMZRenderer(AbstractXYZDataset dataset, PaintScale paintScale) {
super(false, true);
this.dataset = dataset;
this.paintScale = paintScale;
this.setSeriesShape(0, dataPointsShape);

setDrawSeriesLineAsPath(true);
   }
项目:nabs    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:opensim-gui    文件:PaintScaleLegend.java   
/**
 * 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;
}
项目:mzmine2    文件:RTMZRenderer.java   
void setPaintScale(PaintScale paintScale) {
this.paintScale = paintScale;
   }
项目:parabuild-ci    文件:PaintScaleLegend.java   
/**
 * 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));
}
项目:parabuild-ci    文件:XYBlockRenderer.java   
/**
 * 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));
}
项目:HTML5_WebSite    文件:PaintScaleLegend.java   
/**
 * 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));
}
项目:HTML5_WebSite    文件:XYShapeRenderer.java   
/**
 * 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));
}
项目:HTML5_WebSite    文件:XYBlockRenderer.java   
/**
 * 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();
}
项目:PI    文件:PaintScaleLegend.java   
/**
 * 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));
}
项目:PI    文件:XYShapeRenderer.java   
/**
 * 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));
}