1 14 package org.wings.plaf.css; 15 16 import org.wings.SComponent; 17 import org.wings.SConstants; 18 import org.wings.SToolbar; 19 import org.wings.io.Device; 20 21 import java.io.IOException ; 22 23 public class ToolbarCG extends AbstractComponentCG implements 24 org.wings.plaf.ToolbarCG { 25 public void writeContent(final Device device, final SComponent _c) 26 throws IOException { 27 final SToolbar toolbar = (SToolbar) _c; 28 29 device.print("<table class=\"SLayout\"><tr>"); 30 SComponent[] components = toolbar.getComponents(); 31 for (int i = 0; i < components.length; i++) { 32 SComponent component = components[i]; 33 34 if (component.getHorizontalAlignment() == SConstants.RIGHT_ALIGN) 35 device.print("<td width=\"100%\" class=\"SLayout\"></td>"); 36 37 device.print("<td class=\"SLayout\">"); 38 component.write(device); 39 device.print("</td>"); 40 } 41 device.print("</tr></table>"); 42 } 43 } 44 | Popular Tags |