boolean (<error descr="Cannot resolve symbol 'Graphics'">Graphics</error> g, int clipx, int clipy, int clipwidth, int clipheight, <error descr="Cannot resolve symbol 'Rectangle'">Rectangle</error> bounds, <error descr="Cannot resolve symbol 'Rectangle'">Rectangle</error> view, <error descr="Cannot resolve symbol 'Rectangle'">Rectangle</error> viewport, boolean enabled, boolean inside, boolean pressed) { if ((viewport.<error descr="Cannot resolve symbol 'y'">y</error> + viewport.<error descr="Cannot resolve symbol 'height'">height</error> < bounds.<error descr="Cannot resolve symbol 'height'">height</error>) && (clipy + clipheight > viewport.<error descr="Cannot resolve symbol 'y'">y</error> + viewport.<error descr="Cannot resolve symbol 'height'">height</error>)) { // need horizontal int x = viewport.<error descr="Cannot resolve symbol 'x'">x</error>; int y = viewport.<error descr="Cannot resolve symbol 'y'">y</error> + viewport.<error descr="Cannot resolve symbol 'height'">height</error>; int height = bounds.<error descr="Cannot resolve symbol 'height'">height</error> - y; int button = Math.min(block, viewport.<error descr="Cannot resolve symbol 'width'">width</error> / 2); int track = viewport.<error descr="Cannot resolve symbol 'width'">width</error> - (2 * button); //max 10 int knob = Math.min(track, Math.max(track * (viewport.<error descr="Cannot resolve symbol 'width'">width</error> - 2) / view.<error descr="Cannot resolve symbol 'width'">width</error>, 6)); int decrease = view.<error descr="Cannot resolve symbol 'x'">x</error> * (track - knob) / (view.<error descr="Cannot resolve symbol 'width'">width</error> - viewport.<error descr="Cannot resolve symbol 'width'">width</error> + 2); int increase = track - decrease - knob; paintArrow(g, x, y, button, height, 'W', enabled, inside, pressed, "left", false, true, true, false); paintRect(g, x + button, y, decrease, height, enabled ? c_border : c_disable, c_bg, false, true, true, false); paintRect(g, x + button + decrease, y, knob, height, enabled ? c_border : c_disable, enabled ? c_ctrl : c_bg, false, true, true, true); int n = Math.min(5, (knob - 4) / 3); g.<error descr="Cannot resolve method 'setColor(Color)'">setColor</error>(enabled ? c_border : c_disable); int cx = (x + button + decrease) + (knob + 2 - n * 3) / 2; for (int i = 0; i < n; i++ ) { g.<error descr="Cannot resolve method 'drawLine(int, int, int, int)'">drawLine</error>(cx + i * 3, y + 2, cx + i * 3, y + height - 4); } paintRect(g, x + button + decrease + knob, y, increase, height, enabled ? c_border : c_disable, c_bg, false, false, true, true); paintArrow(g, x + button + track, y, button, height, 'E', enabled, inside, pressed, "right", false, false, true, true); } if ((viewport.<error descr="Cannot resolve symbol 'x'">x</error> + viewport.<error descr="Cannot resolve symbol 'width'">width</error> < bounds.<error descr="Cannot resolve symbol 'width'">width</error>) && (clipx + clipwidth > viewport.<error descr="Cannot resolve symbol 'x'">x</error> + viewport.<error descr="Cannot resolve symbol 'width'">width</error>)) { // need vertical int x = viewport.<error descr="Cannot resolve symbol 'x'">x</error> + viewport.<error descr="Cannot resolve symbol 'width'">width</error>; int y = viewport.<error descr="Cannot resolve symbol 'y'">y</error>; int width = bounds.<error descr="Cannot resolve symbol 'width'">width</error> - x; //if (y > 0) { // paintRect(g, x - 1, 0, width + 1, y, // enabled ? c_border : c_disable, c_bg, false, true, false, false); //} int track = viewport.<error descr="Cannot resolve symbol 'height'">height</error> - (2 * block); int knob = track * (viewport.<error descr="Cannot resolve symbol 'height'">height</error> - 2) / view.<error descr="Cannot resolve symbol 'height'">height</error>; int decrease = view.<error descr="Cannot resolve symbol 'y'">y</error> * (track - knob) / (view.<error descr="Cannot resolve symbol 'height'">height</error> - viewport.<error descr="Cannot resolve symbol 'height'">height</error> + 2); int increase = track - decrease - knob; paintArrow(g, x, y, width, block, 'N', enabled, inside, pressed, "up", true, false, false, true); paintRect(g, x, y + block, width, decrease, enabled ? c_border : c_disable, c_bg, true, false, false, true); paintRect(g, x, y + block + decrease, width, knob, enabled ? c_border : c_disable, enabled ? c_ctrl : c_bg, true, false, true, true); int n = Math.min(5, (knob - 4) / 3); g.<error descr="Cannot resolve method 'setColor(Color)'">setColor</error>(enabled ? c_border : c_disable); int cy = (y + block + decrease) + (knob + 2 - n * 3) / 2; for (int i = 0; i < n; i++ ) { g.<error descr="Cannot resolve method 'drawLine(int, int, int, int)'">drawLine</error>(x + 2, cy + i * 3, x + width - 4, cy + i * 3); } paintRect(g, x, y + block + decrease + knob, width, increase, enabled ? c_border : c_disable, c_bg, false, false, true, true); paintArrow(g, x, y + block + track, width, block, 'S', enabled, inside, pressed, "down", false, false, true, true); } if ((clipx + clipwidth > viewport.<error descr="Cannot resolve symbol 'x'">x</error>) && (clipy + clipheight > viewport.<error descr="Cannot resolve symbol 'y'">y</error>) && (clipx < viewport.<error descr="Cannot resolve symbol 'x'">x</error> + viewport.<error descr="Cannot resolve symbol 'width'">width</error>) && (clipy < viewport.<error descr="Cannot resolve symbol 'y'">y</error> + viewport.<error descr="Cannot resolve symbol 'height'">height</error>)) { g.<error descr="Cannot resolve method 'clipRect(?, ?, ?, ?)'">clipRect</error>(viewport.<error descr="Cannot resolve symbol 'x'">x</error> + 1, viewport.<error descr="Cannot resolve symbol 'y'">y</error> + 1, viewport.<error descr="Cannot resolve symbol 'width'">width</error> - 2, viewport.<error descr="Cannot resolve symbol 'height'">height</error> - 2); g.<error descr="Cannot resolve method 'translate(?, ?)'">translate</error>(viewport.<error descr="Cannot resolve symbol 'x'">x</error> + 1 - view.<error descr="Cannot resolve symbol 'x'">x</error>, viewport.<error descr="Cannot resolve symbol 'y'">y</error> + 1 - view.<error descr="Cannot resolve symbol 'y'">y</error>); return true; } return false; }