/** * Paints a single column heading. * * @param col the column to paint. * @param sortable true if the column is sortable, false otherwise * @param renderContext the RenderContext to paint to. */ private void paintColumnHeading(final WTableColumn col, final boolean sortable, final WebXmlRenderContext renderContext) { XmlStringBuilder xml = renderContext.getWriter(); int width = col.getWidth(); Alignment align = col.getAlign(); xml.appendTagOpen("ui:th"); xml.appendOptionalAttribute("width", width > 0, width); xml.appendOptionalAttribute("sortable", sortable, "true"); if (Alignment.RIGHT.equals(align)) { xml.appendAttribute("align", "right"); } else if (Alignment.CENTER.equals(align)) { xml.appendAttribute("align", "center"); } xml.appendClose(); col.paint(renderContext); xml.appendEndTag("ui:th"); }
/** * Paints a single column heading. * * @param col the column to paint. * @param sortable true if the column is sortable, false otherwise * @param renderContext the RenderContext to paint to. */ private void paintColumnHeading(final WTableColumn col, final boolean sortable, final WebXmlRenderContext renderContext) { XmlStringBuilder xml = renderContext.getWriter(); int width = col.getWidth(); Alignment align = col.getAlign(); xml.appendTagOpen("ui:th"); xml.appendOptionalAttribute("width", width > 0, width); xml.appendOptionalAttribute("sortable", sortable, "true"); if (Alignment.RIGHT.equals(align)) { xml.appendAttribute("align", "right"); } else if (Alignment.CENTER.equals(align)) { xml.appendAttribute("align", "center"); } xml.appendClose(); col.paint(renderContext); xml.appendEndTag("ui:th"); } }