1 2 3 import org.jdom.Attribute; 4 import org.swixml.Converter; 5 import org.swixml.Localizer; 6 7 import java.util.SimpleTimeZone ; 8 9 10 public class TimeZoneConverter implements Converter { 11 19 public Object convert(Class type, Attribute attr, Localizer lz) throws Exception { 20 SimpleTimeZone tz = null; 21 if (attr != null && attr.getValue() != null) { 22 tz = new SimpleTimeZone ( 0, attr.getValue() ); 23 } 24 return tz; 25 } 26 27 32 public Class convertsTo() { 33 return SimpleTimeZone .class; 34 } 35 } 36 | Popular Tags |