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


Java XYBoxAndWhiskerRenderer类代码示例

本文整理汇总了Java中org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer的典型用法代码示例。如果您正苦于以下问题:Java XYBoxAndWhiskerRenderer类的具体用法?Java XYBoxAndWhiskerRenderer怎么用?Java XYBoxAndWhiskerRenderer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


XYBoxAndWhiskerRenderer类属于org.jfree.chart.renderer.xy包,在下文中一共展示了XYBoxAndWhiskerRenderer类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createBoxAndWhiskerChart

import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param timeAxisLabel  a label for the time axis (<code>null</code> permitted).
 * @param valueAxisLabel  a label for the value axis (<code>null</code> permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return a box and whisker chart.
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
                                                  String timeAxisLabel,
                                                  String valueAxisLabel,
                                                  BoxAndWhiskerXYDataset dataset,
                                                  boolean legend) {

    ValueAxis timeAxis = new DateAxis(timeAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);
    XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, legend);

    return chart;

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:28,代码来源:ChartFactory.java

示例2: testEquals

import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
 * Check that the equals() method distinguishes all fields.
 */
public void testEquals() {
    
    XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer();
    XYBoxAndWhiskerRenderer r2 = new XYBoxAndWhiskerRenderer();
    assertEquals(r1, r2);
    
    r1.setPaint(new GradientPaint(1.0f, 2.0f, Color.yellow, 
            3.0f, 4.0f, Color.red));
    assertFalse(r1.equals(r2));
    r2.setPaint(new GradientPaint(1.0f, 2.0f, Color.yellow, 
            3.0f, 4.0f, Color.red));
    assertEquals(r1, r2);
    
    r1.setArtifactPaint(new GradientPaint(1.0f, 2.0f, Color.green, 
            3.0f, 4.0f, Color.red));
    assertFalse(r1.equals(r2));
    r2.setArtifactPaint(new GradientPaint(1.0f, 2.0f, Color.green, 
            3.0f, 4.0f, Color.red));
    assertEquals(r1, r2);
    
    r1.setBoxWidth(0.55);
    assertFalse(r1.equals(r2));
    r2.setBoxWidth(0.55);
    assertEquals(r1, r2);
    
    r1.setFillBox(!r1.getFillBox());
    assertFalse(r1.equals(r2));
    r2.setFillBox(!r2.getFillBox());
    assertEquals(r1, r2);
    
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:35,代码来源:XYBoxAndWhiskerRendererTests.java

示例3: createBoxAndWhiskerChart

import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param timeAxisLabel  a label for the time axis (<code>null</code> 
 *                       permitted).
 * @param valueAxisLabel  a label for the value axis (<code>null</code> 
 *                        permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return A box and whisker chart.
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
                                             String timeAxisLabel,
                                             String valueAxisLabel,
                                             BoxAndWhiskerXYDataset dataset,
                                             boolean legend) {

    ValueAxis timeAxis = new DateAxis(timeAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);
    XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
    return new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, 
            legend);

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:29,代码来源:ChartFactory.java

示例4: createBoxAndWhiskerChart

import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param timeAxisLabel  a label for the time axis (<code>null</code>
 *                       permitted).
 * @param valueAxisLabel  a label for the value axis (<code>null</code>
 *                        permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return A box and whisker chart.
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
        String timeAxisLabel, String valueAxisLabel,
        BoxAndWhiskerXYDataset dataset, boolean legend) {

    ValueAxis timeAxis = new DateAxis(timeAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);
    XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;

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

示例5: createBoxAndWhiskerChart

import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart.
 *
 * @param title  the chart title ({@code null} permitted).
 * @param timeAxisLabel  a label for the time axis ({@code null}
 *                       permitted).
 * @param valueAxisLabel  a label for the value axis ({@code null}
 *                        permitted).
 * @param dataset  the dataset for the chart ({@code null} permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return A box and whisker chart.
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
        String timeAxisLabel, String valueAxisLabel,
        BoxAndWhiskerXYDataset dataset, boolean legend) {

    ValueAxis timeAxis = new DateAxis(timeAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);
    XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:29,代码来源:ChartFactory.java

示例6: createBoxAndWhiskerChart

import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
 * Creates and returns a default instance of a box and whisker chart.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param timeAxisLabel  a label for the time axis (<code>null</code>
 *                       permitted).
 * @param valueAxisLabel  a label for the value axis (<code>null</code>
 *                        permitted).
 * @param dataset  the dataset for the chart (<code>null</code> permitted).
 * @param legend  a flag specifying whether or not a legend is required.
 *
 * @return A box and whisker chart.
 */
public static JFreeChart createBoxAndWhiskerChart(String title,
                                             String timeAxisLabel,
                                             String valueAxisLabel,
                                             BoxAndWhiskerXYDataset dataset,
                                             boolean legend) {

    ValueAxis timeAxis = new DateAxis(timeAxisLabel);
    NumberAxis valueAxis = new NumberAxis(valueAxisLabel);
    valueAxis.setAutoRangeIncludesZero(false);
    XYBoxAndWhiskerRenderer renderer = new XYBoxAndWhiskerRenderer(10.0);
    XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, renderer);
    JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT,
            plot, legend);
    currentTheme.apply(chart);
    return chart;

}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:31,代码来源:ChartFactory.java

示例7: testEquals

import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
 * Problem that the equals(...) method distinguishes all fields.
 */
public void testEquals() {
    
    XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer();
    XYBoxAndWhiskerRenderer r2 = new XYBoxAndWhiskerRenderer();
    assertEquals(r1, r2);
    
    r1.setPaint(Color.yellow);
    assertFalse(r1.equals(r2));
    r2.setPaint(Color.yellow);
    assertEquals(r1, r2);
    
    r1.setArtifactPaint(Color.yellow);
    assertFalse(r1.equals(r2));
    r2.setArtifactPaint(Color.yellow);
    assertEquals(r1, r2);
    
    r1.setBoxWidth(0.55);
    assertFalse(r1.equals(r2));
    r2.setBoxWidth(0.55);
    assertEquals(r1, r2);
    
    r1.setFillBox(!r1.getFillBox());
    assertFalse(r1.equals(r2));
    r2.setFillBox(!r2.getFillBox());
    assertEquals(r1, r2);
    
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:31,代码来源:XYBoxAndWhiskerRendererTests.java

示例8: testHashcode

import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashcode() {
    XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer();
    XYBoxAndWhiskerRenderer r2 = new XYBoxAndWhiskerRenderer();
    assertTrue(r1.equals(r2));
    int h1 = r1.hashCode();
    int h2 = r2.hashCode();
    assertEquals(h1, h2);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:XYBoxAndWhiskerRendererTests.java

示例9: testEquals

import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
 * Check that the equals() method distinguishes all fields.
 */
public void testEquals() {

    XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer();
    XYBoxAndWhiskerRenderer r2 = new XYBoxAndWhiskerRenderer();
    assertEquals(r1, r2);

    r1.setArtifactPaint(new GradientPaint(1.0f, 2.0f, Color.green,
            3.0f, 4.0f, Color.red));
    assertFalse(r1.equals(r2));
    r2.setArtifactPaint(new GradientPaint(1.0f, 2.0f, Color.green,
            3.0f, 4.0f, Color.red));
    assertEquals(r1, r2);

    r1.setBoxWidth(0.55);
    assertFalse(r1.equals(r2));
    r2.setBoxWidth(0.55);
    assertEquals(r1, r2);

    r1.setFillBox(!r1.getFillBox());
    assertFalse(r1.equals(r2));
    r2.setFillBox(!r2.getFillBox());
    assertEquals(r1, r2);

    r1.setBoxPaint(Color.yellow);
    assertFalse(r1.equals(r2));
    r2.setBoxPaint(Color.yellow);
    assertEquals(r1, r2);

    // check boxPaint null also
    r1.setBoxPaint(null);
    assertFalse(r1.equals(r2));
    r2.setBoxPaint(null);
    assertEquals(r1, r2);

}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:39,代码来源:XYBoxAndWhiskerRendererTests.java

示例10: testHashcode

import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
 * Two objects that are equal are required to return the same hashCode.
 */
public void testHashcode() {
    XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer();
    XYBoxAndWhiskerRenderer r2 = new XYBoxAndWhiskerRenderer();
    assertTrue(r1.equals(r2));
    int h1 = r1.hashCode();
    int h2 = r2.hashCode();
    assertEquals(h1, h2);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:12,代码来源:XYBoxAndWhiskerRendererTests.java

示例11: testPublicCloneable

import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; //导入依赖的package包/类
/**
 * Verify that this class implements {@link PublicCloneable}.
 */
public void testPublicCloneable() {
    XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer();
    assertTrue(r1 instanceof PublicCloneable);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:8,代码来源:XYBoxAndWhiskerRendererTests.java


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