Package org.jfree.chart.labels

Examples of org.jfree.chart.labels.StandardCategoryItemLabelGenerator


    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        StandardCategoryItemLabelGenerator g1
            = new StandardCategoryItemLabelGenerator();
        StandardCategoryItemLabelGenerator g2 = null;
        try {
            g2 = (StandardCategoryItemLabelGenerator) 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


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

        StandardCategoryItemLabelGenerator g1
            = new StandardCategoryItemLabelGenerator(
                "{2}", DateFormat.getInstance()
            );
        StandardCategoryItemLabelGenerator g2 = null;

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

TOP

Related Classes of org.jfree.chart.labels.StandardCategoryItemLabelGenerator

Copyright © 2018 www.massapicom. 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.