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


Java ParamChecks.nullNotPermitted方法代码示例

本文整理汇总了Java中org.jfree.chart.util.ParamChecks.nullNotPermitted方法的典型用法代码示例。如果您正苦于以下问题:Java ParamChecks.nullNotPermitted方法的具体用法?Java ParamChecks.nullNotPermitted怎么用?Java ParamChecks.nullNotPermitted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.chart.util.ParamChecks的用法示例。


在下文中一共展示了ParamChecks.nullNotPermitted方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: insertValue

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Inserts a new value at the specified position in the dataset or, if
 * there is an existing item with the specified key, updates the value
 * for that item and moves it to the specified position.
 *
 * @param position  the position (in the range <code>0</code> to
 *                  <code>getItemCount()</code>).
 * @param key  the key (<code>null</code> not permitted).
 * @param value  the value (<code>null</code> permitted).
 *
 * @since 1.0.7
 */
public void insertValue(int position, Comparable key, Object value) {
    if (position < 0 || position > this.data.size()) {
        throw new IllegalArgumentException("'position' out of bounds.");
    }
    ParamChecks.nullNotPermitted(key, "key");
    int pos = getIndex(key);
    if (pos >= 0) {
        this.data.remove(pos);
    }
    KeyedObject item = new KeyedObject(key, value);
    if (position <= this.data.size()) {
        this.data.add(position, item);
    }
    else {
        this.data.add(item);
    }
}
 
开发者ID:nick-paul,项目名称:aya-lang,代码行数:30,代码来源:KeyedObjects.java

示例2: findValueRange

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Finds the range of y-values that fall within the specified range of
 * x-values (where the x-values are interpreted as milliseconds since the
 * epoch and converted to time periods using the specified timezone).
 * 
 * @param xRange  the subset of x-values to use (<code>null</code> not
 *     permitted).
 * @param xAnchor  the anchor point for the x-values (<code>null</code>
 *     not permitted).
 * @param zone  the time zone (<code>null</code> not permitted).
 * 
 * @return The range of y-values.
 * 
 * @since 1.0.18
 */
public Range findValueRange(Range xRange, TimePeriodAnchor xAnchor, 
        TimeZone zone) {
    ParamChecks.nullNotPermitted(xRange, "xRange");
    ParamChecks.nullNotPermitted(xAnchor, "xAnchor");
    ParamChecks.nullNotPermitted(zone, "zone");
    if (this.data.isEmpty()) {
        return null;
    }
    Calendar calendar = Calendar.getInstance(zone);
    // since the items are ordered, we could be more clever here and avoid
    // iterating over all the data
    double lowY = Double.POSITIVE_INFINITY;
    double highY = Double.NEGATIVE_INFINITY;
    for (int i = 0; i < this.data.size(); i++) {
        TimeSeriesDataItem item = (TimeSeriesDataItem) this.data.get(i);
        long millis = item.getPeriod().getMillisecond(xAnchor, calendar);
        if (xRange.contains(millis)) {
            Number n = item.getValue();
            if (n != null) {
                double v = n.doubleValue();
                lowY = Math.min(lowY, v);
                highY = Math.max(highY, v);
            }
        }
    }
    if (Double.isInfinite(lowY) && Double.isInfinite(highY)) {
        if (lowY < highY) {
            return new Range(lowY, highY);
        } else {
            return new Range(Double.NaN, Double.NaN);
        }
    }
    return new Range(lowY, highY);
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:50,代码来源:TimeSeries.java

示例3: createNumberArray

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Constructs an array of <code>Number</code> objects from an array of
 * <code>double</code> primitives.
 *
 * @param data  the data (<code>null</code> not permitted).
 *
 * @return An array of <code>Double</code>.
 */
public static Number[] createNumberArray(double[] data) {
    ParamChecks.nullNotPermitted(data, "data");
    Number[] result = new Number[data.length];
    for (int i = 0; i < data.length; i++) {
        result[i] = new Double(data[i]);
    }
    return result;
}
 
开发者ID:nick-paul,项目名称:aya-lang,代码行数:17,代码来源:DataUtilities.java

示例4: XYDifferenceRenderer

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Creates a new renderer.
 *
 * @param positivePaint  the highlight color for positive differences
 *                       (<code>null</code> not permitted).
 * @param negativePaint  the highlight color for negative differences
 *                       (<code>null</code> not permitted).
 * @param shapes  draw shapes?
 */
public XYDifferenceRenderer(Paint positivePaint, Paint negativePaint,
                            boolean shapes) {
    ParamChecks.nullNotPermitted(positivePaint, "positivePaint");
    ParamChecks.nullNotPermitted(negativePaint, "negativePaint");
    this.positivePaint = positivePaint;
    this.negativePaint = negativePaint;
    this.shapesVisible = shapes;
    this.legendLine = new Line2D.Double(-7.0, 0.0, 7.0, 0.0);
    this.roundXCoordinates = false;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:20,代码来源:XYDifferenceRenderer.java

示例5: XYSplineRenderer

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Creates a new renderer with the specified precision
 * and specified fill of the area 'under' (between '0' and) the spline.
 *
 * @param precision  the number of points between data items.
 * @param fillType  the type of fill beneath the curve (<code>null</code> 
 *     not permitted).
 * 
 * @since 1.0.17
 */
public XYSplineRenderer(int precision, FillType fillType) {
    super();
    if (precision <= 0) {
        throw new IllegalArgumentException("Requires precision > 0.");
    }
    ParamChecks.nullNotPermitted(fillType, "fillType");
    this.precision = precision;
    this.fillType = fillType;
    this.gradientPaintTransformer = new StandardGradientPaintTransformer();
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:21,代码来源:XYSplineRenderer.java

示例6: getGroup

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Returns the group that a key is mapped to.
 *
 * @param key  the key (<code>null</code> not permitted).
 *
 * @return The group (never <code>null</code>, returns the default group if
 *         there is no mapping for the specified key).
 */
public Comparable getGroup(Comparable key) {
    ParamChecks.nullNotPermitted(key, "key");
    Comparable result = this.defaultGroup;
    Comparable group = (Comparable) this.keyToGroupMap.get(key);
    if (group != null) {
        result = group;
    }
    return result;
}
 
开发者ID:nick-paul,项目名称:aya-lang,代码行数:18,代码来源:KeyToGroupMap.java

示例7: saveChartAsPNG

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Saves the chart as a PNG format file in the temporary directory and
 * populates the {@link ChartRenderingInfo} object which can be used to
 * generate an HTML image map.
 *
 * @param chart  the chart to be saved (<code>null</code> not permitted).
 * @param width  the width of the chart.
 * @param height  the height of the chart.
 * @param info  the ChartRenderingInfo object to be populated
 *              (<code>null</code> permitted).
 * @param session  the HttpSession of the client (if <code>null</code>, the
 *                 temporary file is marked as "one-time" and deleted by
 *                 the {@link DisplayChart} servlet right after it is
 *                 streamed to the client).
 *
 * @return The filename of the chart saved in the temporary directory.
 *
 * @throws IOException if there is a problem saving the file.
 */
public static String saveChartAsPNG(JFreeChart chart, int width, int height,
        ChartRenderingInfo info, HttpSession session) throws IOException {

    ParamChecks.nullNotPermitted(chart, "chart");
    ServletUtilities.createTempDir();
    String prefix = ServletUtilities.tempFilePrefix;
    if (session == null) {
        prefix = ServletUtilities.tempOneTimeFilePrefix;
    }
    File tempFile = File.createTempFile(prefix, ".png",
            new File(System.getProperty("java.io.tmpdir")));
    ChartUtilities.saveChartAsPNG(tempFile, chart, width, height, info);
    if (session != null) {
        ServletUtilities.registerChartForDeletion(tempFile, session);
    }
    return tempFile.getName();

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:38,代码来源:ServletUtilities.java

示例8: add

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Adds an entity to the collection.
 *
 * @param entity  the entity (<code>null</code> not permitted).
 */
@Override
public void add(ChartEntity entity) {
    ParamChecks.nullNotPermitted(entity, "entity");
    this.entities.add(entity);
}
 
开发者ID:nick-paul,项目名称:aya-lang,代码行数:11,代码来源:StandardEntityCollection.java

示例9: StandardXYZToolTipGenerator

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Constructs a new tool tip generator using the specified number
 * formatters.
 *
 * @param formatString  the format string.
 * @param xFormat  the format object for the x values (<code>null</code>
 *                 not permitted).
 * @param yFormat  the format object for the y values (<code>null</code>
 *                 not permitted).
 * @param zFormat  the format object for the z values (<code>null</code>
 *                 not permitted).
 */
public StandardXYZToolTipGenerator(String formatString, 
        NumberFormat xFormat, NumberFormat yFormat, NumberFormat zFormat) {
    super(formatString, xFormat, yFormat);
    ParamChecks.nullNotPermitted(zFormat, "zFormat");
    this.zFormat = zFormat;
}
 
开发者ID:nick-paul,项目名称:aya-lang,代码行数:19,代码来源:StandardXYZToolTipGenerator.java

示例10: setLabelPaint

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Sets the series label paint and sends a {@link PlotChangeEvent} to all
 * registered listeners.
 *
 * @param paint  the paint (<code>null</code> not permitted).
 *
 * @see #getLabelPaint()
 */
public void setLabelPaint(Paint paint) {
    ParamChecks.nullNotPermitted(paint, "paint");
    this.labelPaint = paint;
    fireChangeEvent();
}
 
开发者ID:nick-paul,项目名称:aya-lang,代码行数:14,代码来源:SpiderWebPlot.java

示例11: getColumnIndex

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Returns the column index for a column key.
 *
 * @param columnKey  the column key (<code>null</code> not permitted).
 *
 * @return The column index.
 */
@Override
public int getColumnIndex(Comparable columnKey) {
    ParamChecks.nullNotPermitted(columnKey, "columnKey");
    return this.keys.indexOf(columnKey);
}
 
开发者ID:nick-paul,项目名称:aya-lang,代码行数:13,代码来源:TaskSeriesCollection.java

示例12: setLegendItemGraphicAnchor

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Sets the anchor point used for the graphic in each legend item.
 *
 * @param anchor  the anchor point (<code>null</code> not permitted).
 */
public void setLegendItemGraphicAnchor(RectangleAnchor anchor) {
    ParamChecks.nullNotPermitted(anchor, "anchor");
    this.legendItemGraphicAnchor = anchor;
}
 
开发者ID:nick-paul,项目名称:aya-lang,代码行数:10,代码来源:LegendTitle.java

示例13: NumberTickUnit

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Creates a new number tick unit.
 *
 * @param size  the size of the tick unit.
 * @param formatter  a number formatter for the tick unit (<code>null</code>
 *                   not permitted).
 */
public NumberTickUnit(double size, NumberFormat formatter) {
    super(size);
    ParamChecks.nullNotPermitted(formatter, "formatter");
    this.formatter = formatter;
}
 
开发者ID:nick-paul,项目名称:aya-lang,代码行数:13,代码来源:NumberTickUnit.java

示例14: DialBackground

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Creates a new instance of <code>DialBackground</code>.  The
 *
 * @param paint  the paint (<code>null</code> not permitted).
 *
 * @throws IllegalArgumentException if <code>paint</code> is
 *     <code>null</code>.
 */
public DialBackground(Paint paint) {
    ParamChecks.nullNotPermitted(paint, "paint");
    this.paint = paint;
    this.gradientPaintTransformer = new StandardGradientPaintTransformer();
}
 
开发者ID:nick-paul,项目名称:aya-lang,代码行数:14,代码来源:DialBackground.java

示例15: setRangeGridlineStroke

import org.jfree.chart.util.ParamChecks; //导入方法依赖的package包/类
/**
 * Sets the stroke for the grid lines plotted against the range axis and
 * sends a {@link PlotChangeEvent} to all registered listeners.
 *
 * @param stroke  the stroke (<code>null</code> permitted).
 *
 * @see #getRangeGridlineStroke()
 */
public void setRangeGridlineStroke(Stroke stroke) {
    ParamChecks.nullNotPermitted(stroke, "stroke");
    this.rangeGridlineStroke = stroke;
    fireChangeEvent();
}
 
开发者ID:nick-paul,项目名称:aya-lang,代码行数:14,代码来源:FastScatterPlot.java


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