1 4 package org.oddjob.designer.elements.date; 5 6 import java.util.TimeZone ; 7 8 import org.oddjob.designer.model.DesignDefinition; 9 import org.oddjob.designer.model.SelectionList; 10 import org.oddjob.designer.model.SimpleAttribute; 11 12 15 public class TimeZoneAttribute extends SimpleAttribute { 16 17 class TimeZoneSL extends SelectionList { 18 TimeZoneSL(String title) { 19 super(title); 20 } 21 24 public String [] getOptions() { 25 return TimeZone.getAvailableIDs(); 26 } 27 28 31 public String getSelected() { 32 return attribute(); 33 } 34 35 38 public void setSelected(String selected) { 39 attribute(selected); 40 } 41 42 45 public boolean isPopulated() { 46 return attribute() != null; 47 } 48 49 } 50 51 public DesignDefinition detail() { 52 return new TimeZoneSL("Time Zone"); 53 } 54 55 56 } 57 | Popular Tags |