1 18 19 package org.objectweb.jac.aspects.gui.web; 20 21 import java.util.Date ; 22 import org.objectweb.jac.aspects.gui.DateHourFormat; 23 import org.objectweb.jac.core.rtti.FieldItem; 24 25 28 29 public class TimestampViewer extends FormatViewer 30 { 31 34 public TimestampViewer(Object value, Object substance, FieldItem field) { 35 super(value,substance,field); 36 } 37 38 Date date; 39 40 public TimestampViewer() { 41 } 42 43 public void setValue(Object value) { 44 if (value!=null) { 45 if (date==null) { 46 date = new Date (); 50 } 51 date.setTime(((Long )value).longValue()); 52 } 53 this.value = value; 54 } 55 56 protected void initFormat(FieldItem field) { 57 format = new DateHourFormat(field); 58 } 59 } 60 | Popular Tags |