Examples of BoxAndWhiskerXYToolTipGenerator


Examples of org.jfree.chart.labels.BoxAndWhiskerXYToolTipGenerator

    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        BoxAndWhiskerXYToolTipGenerator g1
            = new BoxAndWhiskerXYToolTipGenerator();
        BoxAndWhiskerXYToolTipGenerator g2 = null;
        try {
            g2 = (BoxAndWhiskerXYToolTipGenerator) g1.clone();
        }
        catch (CloneNotSupportedException e) {
            System.err.println("Failed to clone.");
        }
        assertTrue(g1 != g2);
        assertTrue(g1.getClass() == g2.getClass());
        assertTrue(g1.equals(g2));
    }
View Full Code Here

Examples of org.jfree.chart.labels.BoxAndWhiskerXYToolTipGenerator

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

        BoxAndWhiskerXYToolTipGenerator g1
            = new BoxAndWhiskerXYToolTipGenerator();
        BoxAndWhiskerXYToolTipGenerator g2 = null;

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

Examples of org.jfree.chart.labels.BoxAndWhiskerXYToolTipGenerator

    public XYBoxAndWhiskerRenderer(double boxWidth) {
        super();
        this.boxWidth = boxWidth;
        this.boxPaint = Color.GREEN;
        this.fillBox = true;
        setDefaultToolTipGenerator(new BoxAndWhiskerXYToolTipGenerator());
    }
View Full Code Here

Examples of org.jfree.chart.labels.BoxAndWhiskerXYToolTipGenerator

    public XYBoxAndWhiskerRenderer(double boxWidth) {
        super();
        this.boxWidth = boxWidth;
        this.boxPaint = Color.green;
        this.fillBox = true;
        setToolTipGenerator(new BoxAndWhiskerXYToolTipGenerator());
    }
View Full Code Here

Examples of org.jfree.chart.labels.BoxAndWhiskerXYToolTipGenerator

     * A series of tests for the equals() method.
     */
    public void testEquals() {
       
        // standard test
        BoxAndWhiskerXYToolTipGenerator g1
            = new BoxAndWhiskerXYToolTipGenerator();
        BoxAndWhiskerXYToolTipGenerator g2
            = new BoxAndWhiskerXYToolTipGenerator();
        assertTrue(g1.equals(g2));
        assertTrue(g2.equals(g1));
       
        // tooltip format
        g1 = new BoxAndWhiskerXYToolTipGenerator(
            "{0} --> {1} {2}",
            new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")
        );
        g2 = new BoxAndWhiskerXYToolTipGenerator(
            "{1} {2}", new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")
        );
        assertFalse(g1.equals(g2));
        g2 = new BoxAndWhiskerXYToolTipGenerator(
            "{0} --> {1} {2}",
            new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")
        );
        assertTrue(g1.equals(g2));

        // date format
        g1 = new BoxAndWhiskerXYToolTipGenerator(
            "{0} --> {1} {2}",
            new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")
        );
        g2 = new BoxAndWhiskerXYToolTipGenerator(
            "{0} --> {1} {2}",
            new SimpleDateFormat("MMM-yyyy"), new DecimalFormat("0.0")
        );
        assertFalse(g1.equals(g2));
        g2 = new BoxAndWhiskerXYToolTipGenerator(
            "{0} --> {1} {2}",
            new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")
        );
        assertTrue(g1.equals(g2));

        // Y format
        g1 = new BoxAndWhiskerXYToolTipGenerator(
            "{0} --> {1} {2}",
            new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")
        );
        g2 = new BoxAndWhiskerXYToolTipGenerator(
            "{0} --> {1} {2}",
            new SimpleDateFormat("yyyy"), new DecimalFormat("0.00")
        );
        assertFalse(g1.equals(g2));
        g2 = new BoxAndWhiskerXYToolTipGenerator(
            "{0} --> {1} {2}",
            new SimpleDateFormat("yyyy"), new DecimalFormat("0.0")
        );
        assertTrue(g1.equals(g2));
    }
View Full Code Here

Examples of org.jfree.chart.labels.BoxAndWhiskerXYToolTipGenerator

    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        BoxAndWhiskerXYToolTipGenerator g1
            = new BoxAndWhiskerXYToolTipGenerator();
        BoxAndWhiskerXYToolTipGenerator g2 = null;
        try {
            g2 = (BoxAndWhiskerXYToolTipGenerator) g1.clone();
        }
        catch (CloneNotSupportedException e) {
            System.err.println("Failed to clone.");
        }
        assertTrue(g1 != g2);
        assertTrue(g1.getClass() == g2.getClass());
        assertTrue(g1.equals(g2));
    }
View Full Code Here

Examples of org.jfree.chart.labels.BoxAndWhiskerXYToolTipGenerator

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

        BoxAndWhiskerXYToolTipGenerator g1
            = new BoxAndWhiskerXYToolTipGenerator();
        BoxAndWhiskerXYToolTipGenerator g2 = null;

        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(g1);
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.