org.wings.plaf.Utils.optAttribute(device, "class", component.getStyle());
Utils.optAttribute(device, "class", component.getStyle());
    public void writeContent(final Device device,                             final SComponent _c)            throws IOException {        final SMenuBar component = (SMenuBar) _c;//--- code from write-template.        SMenuBar mbar = (SMenuBar) component;        int mcount = mbar.getComponentCount();        device.print("<table class=\"menubar\" cellspacing=\"0\" cellpadding=\"0\" vspace=\"0\" hspace=\"0\" width=\"100%\"");        org.wings.plaf.Utils.optAttribute(device, "class", component.getStyle());        device.print(">");        device.print("<tr align=\"left\">");        /***         * Due to the current Opera problems we are switching to the older Menue style         * in all other cases we do a normal job         ***/        boolean rightAligned = false;        for (int i = 0; i < mcount; i++) {            if (mbar.getComponent(i).isVisible()) {                if (mbar.getComponent(i).getHorizontalAlignment() == SConstants.RIGHT_ALIGN &&                        !rightAligned) {                    device.print("<td width=\"100%\"></td>");                    rightAligned = true;                }                device.print("<td id=\"");                org.wings.plaf.Utils.write(device, mbar.getComponent(i).getName() + "_hook");                device.print("\" class=\"menu\"");                if (mbar.getComponent(i).isEnabled() &&                        mbar.getComponent(i) instanceof SMenuItem) {                    device.print(" onMouseOver=\"Menu.prototype.setMouseOverStyle(this)\"");                    device.print(" onMouseOut=\"Menu.prototype.setMouseOutStyle(this)\"");                }                device.print(">");                mbar.getComponent(i).write(device);                device.print("</nobr></td>");            }        }        if (!rightAligned) {            device.print("<td width=\"100%\">&nbsp;</td>");        }        device.print("</tr></table>");        device.print("\n");//--- end code from write-template.    }