Examples of NumberTickUnit


Examples of org.jfree.chart.axis.NumberTickUnit

        assertFalse(a1.equals(a2));
        a2.setAutoRangeStickyZero(false);
        assertTrue(a1.equals(a2));

        //private NumberTickUnit tickUnit;
        a1.setTickUnit(new NumberTickUnit(25.0));
        assertFalse(a1.equals(a2));
        a2.setTickUnit(new NumberTickUnit(25.0));
        assertTrue(a1.equals(a2));

        //private NumberFormat numberFormatOverride;
        a1.setNumberFormatOverride(new DecimalFormat("0.00"));
        assertFalse(a1.equals(a2));
View Full Code Here

Examples of org.jfree.chart.axis.NumberTickUnit

        plot1.setAngleGridlineStroke(s);
        assertFalse(plot1.equals(plot2));
        plot2.setAngleGridlineStroke(s);
        assertTrue(plot1.equals(plot2));

        plot1.setAngleTickUnit(new NumberTickUnit(11.0));
        assertFalse(plot1.equals(plot2));
        plot2.setAngleTickUnit(new NumberTickUnit(11.0));
        assertTrue(plot1.equals(plot2));

        plot1.setAngleGridlinesVisible(false);
        assertFalse(plot1.equals(plot2));
        plot2.setAngleGridlinesVisible(false);
View Full Code Here

Examples of org.jfree.chart.axis.NumberTickUnit

        plot1.setAngleGridlineStroke(s);
        assertFalse(plot1.equals(plot2));
        plot2.setAngleGridlineStroke(s);
        assertTrue(plot1.equals(plot2));

        plot1.setAngleTickUnit(new NumberTickUnit(11.0));
        assertFalse(plot1.equals(plot2));
        plot2.setAngleTickUnit(new NumberTickUnit(11.0));
        assertTrue(plot1.equals(plot2));

        plot1.setAngleGridlinesVisible(false);
        assertFalse(plot1.equals(plot2));
        plot2.setAngleGridlinesVisible(false);
View Full Code Here

Examples of org.jfree.chart.axis.NumberTickUnit

    /**
     * Confirm that the equals method can distinguish all the required fields.
     */
    public void testEquals() {
        NumberTickUnit t1 = new NumberTickUnit(1.23, new DecimalFormat("0.00"));
        NumberTickUnit t2 = new NumberTickUnit(1.23, new DecimalFormat("0.00"));
        assertTrue(t1.equals(t2));
        assertTrue(t2.equals(t1));

        t1 = new NumberTickUnit(3.21, new DecimalFormat("0.00"));
        assertFalse(t1.equals(t2));
        t2 = new NumberTickUnit(3.21, new DecimalFormat("0.00"));
        assertTrue(t1.equals(t2));

        t1 = new NumberTickUnit(3.21, new DecimalFormat("0.000"));
        assertFalse(t1.equals(t2));
        t2 = new NumberTickUnit(3.21, new DecimalFormat("0.000"));
        assertTrue(t1.equals(t2));
    }
View Full Code Here

Examples of org.jfree.chart.axis.NumberTickUnit

    /**
     * Two objects that are equal are required to return the same hashCode.
     */
    public void testHashCode() {
        NumberTickUnit t1 = new NumberTickUnit(1.23, new DecimalFormat("0.00"));
        NumberTickUnit t2 = new NumberTickUnit(1.23, new DecimalFormat("0.00"));
        int h1 = t1.hashCode();
        int h2 = t2.hashCode();
        assertEquals(h1, h2);
    }
View Full Code Here

Examples of org.jfree.chart.axis.NumberTickUnit

    /**
     * This is an immutable class so it doesn't need to be cloneable.
     */
    public void testCloning() {
        NumberTickUnit t1 = new NumberTickUnit(1.23, new DecimalFormat("0.00"));
        assertFalse(t1 instanceof Cloneable);
    }
View Full Code Here

Examples of org.jfree.chart.axis.NumberTickUnit

    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {
        NumberTickUnit t1 = new NumberTickUnit(1.23, new DecimalFormat("0.00"));
        NumberTickUnit t2 = null;
        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(t1);
            out.close();
View Full Code Here

Examples of org.jfree.chart.axis.NumberTickUnit

        NumberAxis yAxis = (NumberAxis) plot.getVerticalAxis();
        NumberFormat yAxisFormat = new TimeNumberFormat();
        yAxis.setNumberFormatOverride(yAxisFormat);
        yAxis.setMinimumAxisValue(0);
        yAxis.setMaximumAxisValue(24 * 60 * 60 * 1000);
        yAxis.setTickUnit(new NumberTickUnit(2 * 60 * 60 * 1000));
    }
View Full Code Here

Examples of org.jfree.chart.axis.NumberTickUnit

        }
        if ( categoryDatasetChartDefintion.getRangeTickFont() != null ) {
          numberAxis.setTickLabelFont( categoryDatasetChartDefintion.getRangeTickFont() );
        }
        if ( categoryDatasetChartDefintion.getRangeTickUnits() != null ) {
          numberAxis.setTickUnit( new NumberTickUnit( categoryDatasetChartDefintion.getRangeTickUnits() ) );
        }
      }

    }
    if ( plot instanceof PiePlot ) {
View Full Code Here

Examples of org.jfree.chart.axis.NumberTickUnit

      DecimalFormat df8 = new DecimalFormat("#,##0");


      // we can add the units in any order, the TickUnits collection will
      // sort them...
      units.add(new NumberTickUnit(dblSizeTickUnit, df7, 2));
      units.add(new NumberTickUnit(1, df8, 2));
      units.add(new NumberTickUnit(10, df8, 2));
      units.add(new NumberTickUnit(100, df8, 2));
      units.add(new NumberTickUnit(1000, df8, 2));

      return units;
   }
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.