boolean (Object component, int x, int y, Rectangle bounds) { Rectangle port = getRectangle(component, ":port"); if ((x < port.x) || (y < port.y) || ((x >= port.x + port.width) && (y >= port.y + port.height))) { insidepart = "corner"; } else if ((x >= port.x + port.width) || (y >= port.y + port.height)) { boolean horizontal = (y >= port.y + port.height); int p = horizontal ? (x - port.x) : (y - port.y); int portsize = horizontal ? port.width : port.height; int button = Math.min(block, portsize / 2); if (p < button) { insidepart = horizontal ? "left" : "up"; } else if (p >= portsize - button) { insidepart = horizontal ? "right" : "down"; } else { Rectangle view = getRectangle(component, ":view"); int viewp = horizontal ? view.x : view.y; int viewsize = horizontal ? view.width : view.height; 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; }