boolean (Object component, int x, int y, <error descr="Cannot resolve symbol 'Rectangle'">Rectangle</error> bounds) { <error descr="Cannot resolve symbol 'Rectangle'">Rectangle</error> port = getRectangle(component, ":port"); if ((x < port.<error descr="Cannot resolve symbol 'x'">x</error>) || (y < port.<error descr="Cannot resolve symbol 'y'">y</error>) || ((x >= port.<error descr="Cannot resolve symbol 'x'">x</error> + port.<error descr="Cannot resolve symbol 'width'">width</error>) && (y >= port.<error descr="Cannot resolve symbol 'y'">y</error> + port.<error descr="Cannot resolve symbol 'height'">height</error>))) { insidepart = "corner"; } else if ((x >= port.<error descr="Cannot resolve symbol 'x'">x</error> + port.<error descr="Cannot resolve symbol 'width'">width</error>) || (y >= port.<error descr="Cannot resolve symbol 'y'">y</error> + port.<error descr="Cannot resolve symbol 'height'">height</error>)) { boolean horizontal = (y >= port.<error descr="Cannot resolve symbol 'y'">y</error> + port.<error descr="Cannot resolve symbol 'height'">height</error>); int p = horizontal ? (x - port.<error descr="Cannot resolve symbol 'x'">x</error>) : (y - port.<error descr="Cannot resolve symbol 'y'">y</error>); int portsize = horizontal ? port.<error descr="Cannot resolve symbol 'width'">width</error> : port.<error descr="Cannot resolve symbol 'height'">height</error>; int button = Math.min(block, portsize / 2); if (p < button) { insidepart = horizontal ? "left" : "up"; } else if (p >= portsize - button) { insidepart = horizontal ? "right" : "down"; } else { <error descr="Cannot resolve symbol 'Rectangle'">Rectangle</error> view = getRectangle(component, ":view"); int viewp = horizontal ? view.<error descr="Cannot resolve symbol 'x'">x</error> : view.<error descr="Cannot resolve symbol 'y'">y</error>; int viewsize = horizontal ? view.<error descr="Cannot resolve symbol 'width'">width</error> : view.<error descr="Cannot resolve symbol 'height'">height</error>; int track = portsize - (2 * button); int knob = Math.min(track, Math.max(track * (portsize - 2) / viewsize, 6)); int decrease = viewp * (track - knob) / (viewsize - portsize + 2); if (p < button + decrease) { insidepart = horizontal ? "lefttrack" : "uptrack"; } else if (p < button + decrease + knob) { insidepart = horizontal ? "hknob" : "vknob"; } else { insidepart = horizontal ? "righttrack" : "downtrack"; } } } else { return false; } return true; }