Examples of DateTick


Examples of org.jfree.chart.axis.DateTick

    public void testHashCode() {
        Date d1 = new Date(0L);
        String l1 = "Label 1";
        TextAnchor ta1 = TextAnchor.CENTER;
       
        DateTick t1 = new DateTick(d1, l1, ta1, ta1, Math.PI / 2.0);
        DateTick t2 = new DateTick(d1, l1, ta1, ta1, Math.PI / 2.0);
        assertTrue(t1.equals(t2));
        int h1 = t1.hashCode();
        int h2 = t2.hashCode();
        assertEquals(h1, h2);
    }
View Full Code Here

Examples of org.jfree.chart.axis.DateTick

    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        DateTick t1 = new DateTick(
            new Date(0L), "Label", TextAnchor.CENTER, TextAnchor.CENTER, 10.0
        );
        DateTick t2 = null;
        try {
            t2 = (DateTick) t1.clone();
        }
        catch (CloneNotSupportedException e) {
            System.err.println("Failed to clone.");
        }
        assertTrue(t1 != t2);
        assertTrue(t1.getClass() == t2.getClass());
        assertTrue(t1.equals(t2));
    }
View Full Code Here

Examples of org.jfree.chart.axis.DateTick

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

        DateTick t1 = new DateTick(
            new Date(0L), "Label", TextAnchor.CENTER, TextAnchor.CENTER, 10.0
        );
        DateTick t2 = null;

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