void (Object component, int dw, boolean hidden, int left) { int width = getRectangle(component, "bounds").<error descr="Cannot resolve symbol 'width'">width</error> - left -dw; String text = getString(component, "text", ""); int start = getInteger(component, "start", 0); if (start > text.length()) { setInteger(component, "start", start = text.length(), 0); } int end = getInteger(component, "end", 0); if (end > text.length()) { setInteger(component, "end", end = text.length(), 0); } int offset = getInteger(component, "offset", 0); int off = offset; <error descr="Cannot resolve symbol 'FontMetrics'">FontMetrics</error> fm = getFontMetrics(getFont()); int caret = hidden ? (fm.<error descr="Cannot resolve method 'charWidth(char)'">charWidth</error>('*') * end) : fm.<error descr="Cannot resolve method 'stringWidth(java.lang.String)'">stringWidth</error>(text.substring(0, end)); //java //midp font.substringWidth(text, 0, end); if (off > caret) { off = caret; } else if (off < caret - width + 4) { off = caret - width + 4; } off = Math.max(0, Math.min(off, (hidden ? (fm.<error descr="Cannot resolve method 'charWidth(char)'">charWidth</error>('*') * text.length()) : fm.<error descr="Cannot resolve method 'stringWidth(java.lang.String)'">stringWidth</error>(text)) - width + 4)); if (off != offset) { setInteger(component, "offset", off, 0); } }