Package org.eclipse.nebula.widgets.nattable.data.convert

Examples of org.eclipse.nebula.widgets.nattable.data.convert.DefaultDateDisplayConverter.displayToCanonicalValue()


        final DefaultDateDisplayConverter converter = new DefaultDateDisplayConverter(
                "yyyy.MM.dd HH:mm:ss", utc);
        assertEquals("1970.01.01 00:00:00",
                converter.canonicalToDisplayValue(FROZEN_DATE));
        assertEquals(FROZEN_DATE,
                converter.displayToCanonicalValue("1970.01.01 00:00:00"));
    }

    @Test
    public void defaultDisplayFormat() throws Exception {
        final SimpleDateFormat sdf = new SimpleDateFormat();
View Full Code Here


        final DefaultDateDisplayConverter converter = new DefaultDateDisplayConverter(
                utc);
        assertEquals(sdf.format(FROZEN_DATE),
                converter.canonicalToDisplayValue(FROZEN_DATE));
        assertEquals(FROZEN_DATE,
                converter.displayToCanonicalValue(sdf.format(FROZEN_DATE)));
    }

    @Test
    public void invalidDataType() throws Exception {
        final DefaultDateDisplayConverter converter = new DefaultDateDisplayConverter();
View Full Code Here

        System.err.println("** THE FOLLOWING STACK TRACE IS EXPECTED **");
        assertEquals("XXX", converter.canonicalToDisplayValue("XXX"));

        try {
            converter.displayToCanonicalValue("AAA");
            fail("ConversionFailedException should have been throwed");
        } catch (ConversionFailedException e) {}

    }
}
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.