Object (Object component, Object scrollpane, int keycode, Object lead, String itemname, String leafname) { Object row = null; if (keycode == <error descr="Cannot resolve symbol 'KeyEvent'">KeyEvent</error>.VK_UP) { for (Object prev = get(component, itemname); prev != lead; prev = getNextItem(component, prev, leafname)) { row = prev; // component -> getParent(lead) } } else if (keycode == <error descr="Cannot resolve symbol 'KeyEvent'">KeyEvent</error>.VK_DOWN) { row = (lead == null) ? get(component, itemname) : getNextItem(component, lead, leafname); } else if ((keycode == <error descr="Cannot resolve symbol 'KeyEvent'">KeyEvent</error>.VK_PAGE_UP) || (keycode == <error descr="Cannot resolve symbol 'KeyEvent'">KeyEvent</error>.VK_PAGE_DOWN)) { <error descr="Cannot resolve symbol 'Rectangle'">Rectangle</error> view = getRectangle(scrollpane, ":view"); <error descr="Cannot resolve symbol 'Rectangle'">Rectangle</error> port = getRectangle(scrollpane, ":port"); <error descr="Cannot resolve symbol 'Rectangle'">Rectangle</error> rl = (lead != null) ? getRectangle(lead, "bounds") : null; int vy = (keycode == <error descr="Cannot resolve symbol 'KeyEvent'">KeyEvent</error>.VK_PAGE_UP) ? view.<error descr="Cannot resolve symbol 'y'">y</error> : (view.<error descr="Cannot resolve symbol 'y'">y</error> + port.<error descr="Cannot resolve symbol 'height'">height</error> - 2); if ((keycode == <error descr="Cannot resolve symbol 'KeyEvent'">KeyEvent</error>.VK_PAGE_UP) && (rl != null) && (rl.<error descr="Cannot resolve symbol 'y'">y</error> <= view.<error descr="Cannot resolve symbol 'y'">y</error>)) { vy -= port.<error descr="Cannot resolve symbol 'height'">height</error> - 2; } if ((keycode == <error descr="Cannot resolve symbol 'KeyEvent'">KeyEvent</error>.VK_PAGE_DOWN) && (rl != null) && (rl.<error descr="Cannot resolve symbol 'y'">y</error> + rl.<error descr="Cannot resolve symbol 'height'">height</error> >= view.<error descr="Cannot resolve symbol 'y'">y</error> + port.<error descr="Cannot resolve symbol 'height'">height</error> - 2)) { vy += port.<error descr="Cannot resolve symbol 'height'">height</error> - 2; } for (Object item = get(component, itemname); item != null; item = getNextItem(component, item, leafname)) { <error descr="Cannot resolve symbol 'Rectangle'">Rectangle</error> r = getRectangle(item, "bounds"); if (keycode == <error descr="Cannot resolve symbol 'KeyEvent'">KeyEvent</error>.VK_PAGE_UP) { row = item; if (r.<error descr="Cannot resolve symbol 'y'">y</error> + r.<error descr="Cannot resolve symbol 'height'">height</error> > vy) { break; } } else { if (r.<error descr="Cannot resolve symbol 'y'">y</error> > vy) { break; } row = item; } } } else if (keycode == <error descr="Cannot resolve symbol 'KeyEvent'">KeyEvent</error>.VK_HOME) { row = get(component, itemname); } else if (keycode == <error descr="Cannot resolve symbol 'KeyEvent'">KeyEvent</error>.VK_END) { for (Object last = lead; last != null; last = getNextItem(component, last, leafname)) { row = last; } } return row; }