/** * @param d the device to write the code to * @param l the layout manager * @throws IOException */ @Override public void write(Device d, SLayoutManager l) throws IOException { final SGridLayout layout = (SGridLayout) l; final List components = layout.getComponents(); final int rows = layout.getRows(); final TableCellStyle styles = cellLayoutStyle(layout); styles.renderAsTH = layout.getRenderFirstLineAsHeader(); int cols = layout.getColumns(); if (cols <= 0) { cols = components.size() / rows; } openLayouterBody(d, layout); printLayouterTableBody(d, layout.getContainer(), cols, layout.getComponents(), styles); closeLayouterBody(d, layout); }