1 package fr.improve.struts.taglib.layout.datagrid; 2 3 import java.util.ArrayList ; 4 import java.util.List ; 5 6 11 public class ColumnType { 12 15 public static final ColumnType TEXT = new ColumnType("text"); 16 17 20 public static final ColumnType CHECKBOX = new ColumnType("checkbox"); 21 22 25 public static final ColumnType RADIO = new ColumnType("radio"); 26 27 30 static final String SELECT = "select"; 31 32 35 static final String EMPTY = "empty"; 36 37 40 static ColumnType select() { 41 ColumnType type = new ColumnType(SELECT); 42 type.values = new ArrayList (); 43 return type; 44 } 45 46 49 static ColumnType empty() { 50 ColumnType type = new ColumnType(EMPTY); 51 return type; 52 } 53 54 private String type; 55 private List values; 56 private String javascript; 57 58 private ColumnType(String in_type) { 59 type = in_type; 60 } 61 62 public String getType() { 63 return type; 64 } 65 66 public List getValues() { 67 return values; 68 } 69 70 public void setValues(List in_values) { 71 values =in_values; 72 } 73 74 public String getJavascript() { 75 return javascript; 76 } 77 78 public void setJavascript(String javascript) { 79 this.javascript = javascript; 80 } 81 } 82 | Popular Tags |