device.print("');\" onClick=\"javascript:return wpm_menuPopup(event, '");
device.print("');\" onMouseDown=\"javascript:return wpm_menuPopup(event, '");
    public void writePrefix(Device device, SComponent component) throws IOException {        SDimension prefSize = component.getPreferredSize();        Utils.printDebugNewline(device, component);        Utils.printDebug(device, "<!-- ").print(component.getName()).print(" -->");        device.print("<table id=\"");        device.print(component.getName()).print("\"");        Utils.optAttribute(device, "class", component.getStyle());        Utils.printCSSInlinePreferredSize(device, prefSize);                    if (component instanceof LowLevelEventListener) {            LowLevelEventListener lowLevelEventListener = (LowLevelEventListener) component;            device.print(" event=\"")                    .print(lowLevelEventListener.getEncodedLowLevelEventId()).print("\"");        }        String toolTip = component.getToolTipText();        if (toolTip != null)            device.print(" onmouseover=\"return makeTrue(domTT_activate(this, event, 'content', '")                    .print(toolTip)                    .print("', 'predefined', 'default'));\"");        InputMap inputMap = component.getInputMap();        if (inputMap != null && !(inputMap instanceof VersionedInputMap)) {            log.debug("inputMap = " + inputMap);            inputMap = new VersionedInputMap(inputMap);            component.setInputMap(inputMap);        }        if (inputMap != null) {            VersionedInputMap versionedInputMap = (VersionedInputMap) inputMap;            Integer inputMapVersion = (Integer) component.getClientProperty("inputMapVersion");            if (inputMapVersion == null || versionedInputMap.getVersion() != inputMapVersion.intValue()) {                log.debug("inputMapVersion = " + inputMapVersion);                InputMapScriptListener.install(component);                component.putClientProperty("inputMapVersion", new Integer(versionedInputMap.getVersion()));            }        }        SPopupMenu menu = component.getComponentPopupMenu();        if (menu != null) {            ComponentCG menuCG = menu.getCG();            String componentId = menu.getName();            String popupId = componentId + "_pop";            String hookId = component.getName();            System.out.println(menuCG.getClass().getName());            device.print(" onContextMenu=\"javascript:return wpm_menuPopup(event, '");            device.print(popupId);            device.print("');\" onClick=\"javascript:return wpm_menuPopup(event, '");            device.print(popupId);            device.print("');\"");        }        device.print("><tr><td>"); // table        // Special handling: Render title of STitledBorder        if (component.getBorder() instanceof STitledBorder) {            STitledBorder titledBorder = (STitledBorder) component.getBorder();            device.print("<div class=\"STitledBorderLegend\" style=\"");            titledBorder.getTitleAttributes().write(device);            device.print("\">");            device.print(titledBorder.getTitle());            device.print("</div>");        }        component.fireRenderEvent(SComponent.START_RENDERING);    }