if (style != null) { device.print("</span>"); } device.print("</td></tr></table>");
device.print("</div>");
    public void writeContent(final Device device,                             final SComponent _c)            throws IOException {        final SProgressBar component = (SProgressBar) _c;//--- code from write-template.        String style = component.getStyle();        SDimension size = component.getPreferredSize();        int width = size != null ? size.getIntWidth() : 200;        int height = size != null ? size.getIntHeight() : 5;        if (component.isStringPainted()) {            device.print("<table><tr><td>");        }        if (component.isBorderPainted()) {            device.print("<table cellpadding=\"1\"><tr><td");            Utils.optAttribute(device, "bgcolor", component.getBorderColor());            device.print(">");        }        device.print("<table>");        device.print("<tr>");        device.print("<td");        //Utils.optAttribute(device, "bgcolor", component.getFilledColor());        if (component.getFilledColor() != null) {            device.print(" style=\"background-color: ");            Utils.write(device, component.getFilledColor());            device.print(";\"");        }        device.print(">");        device.print("<img");        Utils.optAttribute(device, "src", BLIND_ICON.getURL());        device.print(" width=\"");        device.print(String.valueOf(width * component.getPercentComplete()));        device.print("\"");        device.print(" height=\"");        device.print(String.valueOf(height));        device.print("\"></td>");        device.print("<td");        //Utils.optAttribute(device, "bgcolor", component.getUnfilledColor());        if (component.getUnfilledColor() != null) {            device.print(" style=\"background-color: ");            Utils.write(device, component.getUnfilledColor());            device.print(";\"");        }        device.print(">");        device.print("<img");        Utils.optAttribute(device, "src", BLIND_ICON.getURL());        device.print(" width=\"");        device.print(String.valueOf(width * (1 - component.getPercentComplete())));        device.print("\"");        device.print(" height=\"");        device.print(String.valueOf(height));        device.print("\">");        device.print("</td>");        device.print("</tr>");        device.print("</table>");        if (component.isBorderPainted()) {            device.print("</td></tr></table>");        }        if (component.isStringPainted()) {            device.print("</td></tr><tr><td align=\"center\">");            if (style != null) {                device.print("<span class=\"");                Utils.write(device, style);                device.print("\">");            }            Utils.write(device, component.getString());            if (style != null) {                device.print("</span>");            }            device.print("</td></tr></table>");        }//--- end code from write-template.    }