1 14 package org.wings.template; 15 16 import org.wings.SComponent; 17 import org.wings.STextField; 18 19 23 public class STextFieldPropertyManager 24 extends SComponentPropertyManager { 25 static final Class [] classes = {STextField.class}; 26 27 public STextFieldPropertyManager() { 28 } 29 30 public void setProperty(SComponent comp, String name, String value) { 31 STextField c = (STextField) comp; 32 if (name.equals("COLS")) 33 c.setColumns(Integer.parseInt(value)); 34 else if (name.equals("SIZE")) 35 c.setColumns(Integer.parseInt(value)); 36 else if (name.equals("MAXSIZE")) 37 c.setMaxColumns(Integer.parseInt(value)); 38 else if (name.equals("MAXLENGTH")) 39 c.setMaxColumns(Integer.parseInt(value)); 40 else 41 super.setProperty(comp, name, value); 42 } 43 44 public Class [] getSupportedClasses() { 45 return classes; 46 } 47 } 48 49 50 | Popular Tags |