1 14 package org.wings.plaf.css; 15 16 import org.wings.SGridLayout; 17 import org.wings.SLayoutManager; 18 import org.wings.io.Device; 19 20 import java.io.IOException ; 21 import java.util.List ; 22 23 public class GridLayoutCG extends AbstractLayoutCG 24 { 25 30 public void write(Device d, SLayoutManager l) 31 throws IOException { 32 final SGridLayout layout = (SGridLayout) l; 33 final List components = layout.getComponents(); 34 final int rows = layout.getRows(); 35 36 int cols = layout.getColumns(); 37 if (cols <= 0) 38 cols = components.size() / rows; 39 final int border = layout.getBorder(); 40 41 printLayouterTableHeader(d, "SGridLayout", layout.getHgap(), layout.getVgap(), border, layout); 42 43 printLayouterTableBody(d, cols, layout.getRenderFirstLineAsHeader(), layout.getHgap(), layout.getVgap(),border, components); 44 45 printLayouterTableFooter(d, "SGridLayout", layout); 46 } 47 48 } 49 | Popular Tags |