Examples of TickUnits


Examples of org.jfree.chart.axis.TickUnits

    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        TickUnits t1 = (TickUnits) NumberAxis.createIntegerTickUnits();
        TickUnits t2 = null;
        try {
            t2 = (TickUnits) t1.clone();
        }
        catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        assertTrue(t1 != t2);
        assertTrue(t1.getClass() == t2.getClass());
        assertTrue(t1.equals(t2));
    }
View Full Code Here

Examples of org.jfree.chart.axis.TickUnits

    /**
     * Confirm that the equals method can distinguish all the required fields.
     */
    public void testEquals() {
        TickUnits t1 = (TickUnits) NumberAxis.createIntegerTickUnits();
        TickUnits t2 = (TickUnits) NumberAxis.createIntegerTickUnits();
        assertTrue(t1.equals(t2));
        assertTrue(t2.equals(t1));
    }
View Full Code Here

Examples of org.jfree.chart.axis.TickUnits

    rangeAxis.setTickLabelPaint(styleXaxesLabels.getColor());
   
    //rangeAxis.setAutoRange(true);
    rangeAxis.setRange(xMin,xMax);

    TickUnits units=null;
    if(decimalXValues==false)
      units=(TickUnits)NumberAxis.createIntegerTickUnits();
    else
      units=(TickUnits)NumberAxis.createStandardTickUnits();
    rangeAxis.setStandardTickUnits(units);

    TickUnits domainUnits=null;
    if(decimalYValues==false)
      domainUnits=(TickUnits)NumberAxis.createIntegerTickUnits();
    else
      domainUnits=(TickUnits)NumberAxis.createStandardTickUnits();
    domainAxis.setStandardTickUnits(domainUnits);
View Full Code Here

Examples of org.jfree.chart.axis.TickUnits

   // ---

   static protected TickUnitSource _s_createTickUnits(double dblSizeTickUnit)
   {
     
      TickUnits units = new TickUnits();
      DecimalFormat df7 = new DecimalFormat("0.0");
      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

Examples of org.jfree.chart.axis.TickUnits

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

        TickUnits t1 = (TickUnits) NumberAxis.createIntegerTickUnits();
        TickUnits t2 = null;

        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(t1);
View Full Code Here

Examples of org.jfree.chart.axis.TickUnits

   
    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        TickUnits t1 = (TickUnits) NumberAxis.createIntegerTickUnits();
        TickUnits t2 = null;
        try {
            t2 = (TickUnits) t1.clone();
        }
        catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        assertTrue(t1 != t2);
        assertTrue(t1.getClass() == t2.getClass());
        assertTrue(t1.equals(t2));
    }
View Full Code Here

Examples of org.jfree.chart.axis.TickUnits

    /**
     * Confirm that the equals method can distinguish all the required fields.
     */
    public void testEquals() {
        TickUnits t1 = (TickUnits) NumberAxis.createIntegerTickUnits();
        TickUnits t2 = (TickUnits) NumberAxis.createIntegerTickUnits();
        assertTrue(t1.equals(t2));
        assertTrue(t2.equals(t1));
    }
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.