1 16 package org.apache.jetspeed.util; 17 18 import java.io.Serializable ; 19 20 27 public class HtmlItem implements Serializable 28 { 29 30 private int intValue = -1; 31 private String name; 32 private boolean selected = false; 33 34 private String value = null; 35 36 40 public HtmlItem() 41 { 42 } 43 44 51 public HtmlItem(int sValue, String sDescription) 52 { 53 this.setIntValue(sValue); 54 this.setName(sDescription); 55 } 56 57 public HtmlItem(int sValue, String sDescription, boolean selected) 58 { 59 this.setIntValue(sValue); 60 this.setName(sDescription); 61 this.setSelected(selected); 62 } 63 64 public HtmlItem(String sValue, String sDescription) 65 { 66 this.setValue(sValue); 67 this.setName(sDescription); 68 } 69 70 public HtmlItem(String sValue, String sDescription, boolean selected) 71 { 72 this.setValue(sValue); 73 this.setName(sDescription); 74 this.setSelected(selected); 75 } 76 77 public HtmlItem(String sDescription) 78 { 79 this.setValue(sDescription); 80 this.setName(sDescription); 81 } 82 83 public HtmlItem(String sDescription, boolean selected) 84 { 85 this.setValue(sDescription); 86 this.setName(sDescription); 87 this.setSelected(selected); 88 } 89 90 95 private void setIntValue(int sValue) 96 { 97 intValue = sValue; 98 } 99 100 105 private void setValue(String sValue) 106 { 107 this.value = sValue; 108 } 109 110 115 private void setName(String sValue) 116 { 117 name = sValue; 118 } 119 120 public void setSelected(boolean value) 121 { 122 selected = value; 123 } 124 129 public int getIntValue() 130 { 131 return intValue; 132 } 133 138 public String getValue() 139 { 140 return value; 141 } 142 143 148 public String getName() 149 { 150 return name; 151 } 152 153 public boolean getSelected() 154 { 155 return selected; 156 } 157 158 } 159 160 | Popular Tags |