1 14 package org.wings.template; 15 16 import org.wings.SComponent; 17 import org.wings.SDimension; 18 import org.wings.STable; 19 20 import java.awt.*; 21 22 26 public class STablePropertyManager 27 extends SComponentPropertyManager { 28 static final Class [] classes = {STable.class}; 29 30 public STablePropertyManager() { 31 } 32 33 public void setProperty(SComponent comp, String name, String value) { 34 STable t = (STable) comp; 35 if (name.equals("GRID")) 36 t.setShowGrid(Boolean.valueOf(value).booleanValue()); 37 else if (name.equals("CELLSPACING")) 38 t.setIntercellSpacing(new SDimension(value, value)); 39 else if (name.equals("CELLPADDING")) 40 t.setIntercellPadding(new SDimension(value, value)); 41 else if (name.equals("SELECTION_FOREGROUND")) 42 t.setSelectionForeground(Color.decode(value)); 43 else if (name.equals("SELECTION_BACKGROUND")) 44 t.setSelectionBackground(Color.decode(value)); 45 else 46 super.setProperty(comp, name, value); 47 } 48 49 public Class [] getSupportedClasses() { 50 return classes; 51 } 52 } 53 54 55 | Popular Tags |