void (Object component, <error descr="Cannot resolve symbol 'Graphics'">Graphics</error> g, int clipx, int clipy, int clipwidth, int clipheight, int x, int y, int width, int height, <error descr="Cannot resolve symbol 'Color'">Color</error> fg, String defaultalignment, boolean checkmnemonic) { String text = getString(component, "text", null); <error descr="Cannot resolve symbol 'Image'">Image</error> icon = getIcon(component, "icon", null); if ((text == null) && (icon == null)) { return; } String alignment = getString(component, "alignment", defaultalignment); <error descr="Cannot resolve symbol 'FontMetrics'">FontMetrics</error> fm = null; //java int tw = 0, th = 0; int ta = 0; //java if (text != null) { fm = g.<error descr="Cannot resolve method 'getFontMetrics()'">getFontMetrics</error>(); //java tw = fm.<error descr="Cannot resolve method 'stringWidth(java.lang.String)'">stringWidth</error>(text); ta = fm.<error descr="Cannot resolve method 'getAscent()'">getAscent</error>(); //java th = fm.<error descr="Cannot resolve method 'getDescent()'">getDescent</error>() + ta; //java //midp th = font.getHeight(); g.<error descr="Cannot resolve method 'setColor(Color)'">setColor</error>(fg); } int iw = 0, ih = 0; if (icon != null) { iw = icon.<error descr="Cannot resolve method 'getWidth(Thinlet)'">getWidth</error>(this); ih = icon.<error descr="Cannot resolve method 'getHeight(Thinlet)'">getHeight</error>(this); //java } boolean clipped = (tw + iw > width) || (th > height) || (ih > height); int cx = x; if ("center" == alignment) { cx += (width - tw - iw) / 2; } else if ("right" == alignment) { cx += width - tw - iw; } if (clipped) { g.<error descr="Cannot resolve method 'clipRect(int, int, int, int)'">clipRect</error>(x, y, width, height); } if (icon != null) { g.<error descr="Cannot resolve method 'drawImage(Image, int, int, Thinlet)'">drawImage</error>(icon, cx, y + (height - ih) / 2, this); //java //midp g.drawImage(icon, cx, y + height / 2, Graphics.LEFT | Graphics.VCENTER); cx += iw; } if (text != null) { int ty = y + (height - th) / 2 + ta; //java g.<error descr="Cannot resolve method 'drawString(java.lang.String, int, int)'">drawString</error>(text, cx, ty); //java //midp g.drawString(text, cx, y + (height - th) / 2, Graphics.LEFT | Graphics.TOP); if (checkmnemonic) { int mnemonic = getInteger(component, "mnemonic", -1); if ((mnemonic != -1) && (mnemonic < text.length())) { int mx = cx + fm.<error descr="Cannot resolve method 'stringWidth(java.lang.String)'">stringWidth</error>(text.substring(0, mnemonic)); //java //midp int mx = cx + font.substringWidth(text, 0, mnemonic); //midp int ty = (height + th) / 2; g.<error descr="Cannot resolve method 'drawLine(int, int, ?, int)'">drawLine</error>(mx, ty + 1, mx + fm.<error descr="Cannot resolve method 'charWidth(char)'">charWidth</error>(text.charAt(mnemonic)), ty + 1); } } } if (clipped) { g.<error descr="Cannot resolve method 'setClip(int, int, int, int)'">setClip</error>(clipx, clipy, clipwidth, clipheight); } }