1 22 23 package de.laures.cewolf.util; 24 25 import java.util.Iterator ; 26 import java.util.List ; 27 28 34 public class HTMLStateTable { 35 36 public static String getStateTable(StateDescriptor sd){ 37 StringBuffer res = new StringBuffer ("<TABLE BORDER='1'>"); 38 res.append("<TR><TH colspan='2'>" + sd.getID() + "</TH></TR>"); 39 List params = sd.getStateParameters(); 40 Iterator it = params.iterator(); 41 while(it.hasNext()){ 42 Object key = it.next(); 43 Object val = sd.getState(key); 44 res.append("<TR><TD>" + key + "</TD><TD>" + val + "</TD></TR>"); 45 } 46 res.append("</TABLE>"); 47 return res.toString(); 48 } 49 50 } 51 | Popular Tags |