1 22 package org.jboss.util.propertyeditor; 23 24 import java.beans.PropertyEditorSupport ; 25 30 public class BooleanEditor extends PropertyEditorSupport  31 { 32 private static final String [] BOOLEAN_TAGS = {"true", "false"}; 33 34 37 public void setAsText(final String text) 38 { 39 if (PropertyEditors.isNull(text)) 40 { 41 setValue(null); 42 return; 43 } 44 Object newValue = Boolean.valueOf(text); 45 setValue(newValue); 46 } 47 48 51 public String [] getTags() 52 { 53 return BOOLEAN_TAGS; 54 } 55 } | Popular Tags |