Examples of DeviationRenderer


Examples of org.jfree.chart.renderer.xy.DeviationRenderer

   @Override
   protected JFreeChart createChart() {
      JFreeChart chart = ChartFactory.createXYLineChart(null, domainLabel, rangeLabel,
            dataset, PlotOrientation.VERTICAL, true, false, false);
      DeviationRenderer renderer = new DeviationRenderer();
      renderer.setAlpha(0.2f);
      chart.getXYPlot().setRenderer(renderer);
      CategorizedAxis domainAxis = new CategorizedAxis();
      domainAxis.setLabel(domainLabel);
      chart.getXYPlot().setDomainAxis(domainAxis);
      for (int i = 0; i < chart.getXYPlot().getSeriesCount(); ++i) {
         renderer.setSeriesFillPaint(i, DEFAULT_PAINTS[i % DEFAULT_PAINTS.length]);
      }
      return chart;
   }
View Full Code Here

Examples of org.jfree.chart.renderer.xy.DeviationRenderer

     * Test that the equals() method distinguishes all fields.
     */
    public void testEquals() {
       
        // default instances
        DeviationRenderer r1 = new DeviationRenderer();
        DeviationRenderer r2 = new DeviationRenderer();
        assertTrue(r1.equals(r2));
        assertTrue(r2.equals(r1));
       
        r1.setAlpha(0.1f);
        assertFalse(r1.equals(r2));
        r2.setAlpha(0.1f);
        assertTrue(r1.equals(r2));

    }
View Full Code Here

Examples of org.jfree.chart.renderer.xy.DeviationRenderer

    /**
     * Two objects that are equal are required to return the same hashCode.
     */
    public void testHashcode() {
        DeviationRenderer r1 = new DeviationRenderer();
        DeviationRenderer r2 = new DeviationRenderer();
        assertTrue(r1.equals(r2));
        int h1 = r1.hashCode();
        int h2 = r2.hashCode();
        assertEquals(h1, h2);
    }
View Full Code Here

Examples of org.jfree.chart.renderer.xy.DeviationRenderer

   
    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        DeviationRenderer r1 = new DeviationRenderer();
        DeviationRenderer r2 = null;
        try {
            r2 = (DeviationRenderer) r1.clone();
        }
        catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        assertTrue(r1 != r2);
        assertTrue(r1.getClass() == r2.getClass());
        assertTrue(r1.equals(r2));
       
        // check independence
       
    }
View Full Code Here

Examples of org.jfree.chart.renderer.xy.DeviationRenderer

    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {

        DeviationRenderer r1 = new DeviationRenderer();
        DeviationRenderer r2 = null;

        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(r1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.