final SBorder border = component.getBorder(); if (border instanceof STitledBorder) { STitledBorder titledBorder = (STitledBorder)border;  device.print("<div class=\"legend\" style=\""); titledBorder.getTitleAttributes().write(device); device.print("\">"); device.print(titledBorder.getTitle()); device.print("</div>"); }
    protected void writePrefix(Device device, SComponent component) throws IOException {        device            .print("<div id=\"")            .print(component.getComponentId())            .print("\" class=\"")            .print(component.getStyle());        final SBorder border = component.getBorder();        //borderStyle(border);        final SDimension dim = component.getPreferredSize();        if (dim != null)            device                .print("\" style=\"width:")                .print(dim.width)                .print("; height:")                .print(dim.height);        device            .print("\">\n");        component.fireRenderEvent(SComponent.START_RENDERING);    }