Package org.jfree.chart.axis

Examples of org.jfree.chart.axis.SegmentedTimeline.toMillisecond()


        assertEquals(30, stl.toTimelineValue(946684800100L));

        assertEquals(946684800000L, stl.toMillisecond(0));
        assertEquals(946684800019L, stl.toMillisecond(19));
        assertEquals(946684800060L, stl.toMillisecond(20));
        assertEquals(946684800069L, stl.toMillisecond(29));
        assertEquals(946684800100L, stl.toMillisecond(30));

    }   

    //////////////////////////////////////////////////////////////////////////
View Full Code Here


        assertEquals(946684800000L, stl.toMillisecond(0));
        assertEquals(946684800019L, stl.toMillisecond(19));
        assertEquals(946684800060L, stl.toMillisecond(20));
        assertEquals(946684800069L, stl.toMillisecond(29));
        assertEquals(946684800100L, stl.toMillisecond(30));

    }   

    //////////////////////////////////////////////////////////////////////////
    // main method only for debug
View Full Code Here

        cal.set(Calendar.MILLISECOND, 0);
        Date date = cal.getTime();
                 
        SegmentedTimeline timeline = getTimeline();     
        long value = timeline.toTimelineValue(date);  
        long ms = timeline.toMillisecond(value);
     
        Calendar cal2 = Calendar.getInstance(Locale.UK);
        cal2.setTime(new Date(ms));
        Date reverted = cal2.getTime();
     
View Full Code Here

        Date date = cal.getTime();
                 
        SegmentedTimeline timeline = getTimeline();     

        long value = timeline.toTimelineValue(date);  
        long ms = timeline.toMillisecond(value);
        Calendar cal2 = Calendar.getInstance(Locale.UK);
        cal2.setTime(new Date(ms));
        Date reverted = cal2.getTime();
        assertTrue(
            "test2", value == (900000 * 34 + 900000)
View Full Code Here

        cal.set(Calendar.MILLISECOND, 0);
        Date date = cal.getTime();                
        SegmentedTimeline timeline = getTimeline();     

        long value = timeline.toTimelineValue(date);  
        long ms = timeline.toMillisecond(value);
     
        Calendar cal2 = Calendar.getInstance(Locale.UK);
        cal2.setTime(new Date(ms));
        Date reverted = cal2.getTime();
        assertTrue(
View Full Code Here

        cal.set(Calendar.MILLISECOND, 1);
        Date date = cal.getTime();
        SegmentedTimeline timeline = getTimeline();     

        long value = timeline.toTimelineValue(date);  
        long ms = timeline.toMillisecond(value);
        Calendar cal2 = Calendar.getInstance(Locale.UK);
        cal2.setTime(new Date(ms));
        Date reverted = cal2.getTime();
        assertTrue(
            "test4", value == (900000 * 34 + 900000 * 2 + 1)
View Full Code Here

        cal.set(Calendar.MILLISECOND, 0);
        Date date = cal.getTime();
        SegmentedTimeline timeline = getTimeline();     

        long value = timeline.toTimelineValue(date);  
        long ms = timeline.toMillisecond(value);
        Calendar cal2 = Calendar.getInstance(Locale.UK);
        cal2.setTime(new Date(ms));
        Date reverted = cal2.getTime();
        Calendar expectedReverted = Calendar.getInstance(Locale.UK);
        expectedReverted.set(Calendar.YEAR, 2004);
View Full Code Here

        cal.set(Calendar.MILLISECOND, 0);
        Date date = cal.getTime();
        SegmentedTimeline timeline = getTimeline();     

        long value = timeline.toTimelineValue(date);  
        long ms = timeline.toMillisecond(value);
        Calendar cal2 = Calendar.getInstance(Locale.UK);
        cal2.setTime(new Date(ms));
        Date reverted = cal2.getTime();
     
        Calendar expectedReverted = Calendar.getInstance(Locale.UK);
View Full Code Here

        cal.set(Calendar.MILLISECOND, 0);
        Date date = cal.getTime();
                 
        SegmentedTimeline timeline = getTimeline();
        long value = timeline.toTimelineValue(date);  
        long ms = timeline.toMillisecond(value);
     
        Calendar cal2 = Calendar.getInstance(Locale.UK);
        cal2.setTime(new Date(ms));
        Date reverted = cal2.getTime();
     
View Full Code Here

        assertEquals(39, stl.toTimelineValue(946684800069L));
        assertEquals(40, stl.toTimelineValue(946684800070L));
        assertEquals(40, stl.toTimelineValue(946684800099L));
        assertEquals(40, stl.toTimelineValue(946684800100L));
       
        assertEquals(946684800000L, stl.toMillisecond(0));
        assertEquals(946684800019L, stl.toMillisecond(19));
        assertEquals(946684800050L, stl.toMillisecond(20));
        assertEquals(946684800069L, stl.toMillisecond(39));
        assertEquals(946684800100L, stl.toMillisecond(40));
       
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.