//
// 5. refresh pageup/pagedown highlights
//
BHighlights h = getHighlights();
BHighlight pageup = h.get(H_PAGEUP);
BHighlight pagedown = h.get(H_PAGEDOWN);
if (pageup != null && pagedown != null) {
pageup.setVisible((top > 0) ? H_VIS_TRUE : H_VIS_FALSE);
pagedown.setVisible((top + nVisibleRows < rows.size()) ? H_VIS_TRUE : H_VIS_FALSE);
h.refresh(anim);
}
//
// 6. refresh row highlights if we still have focus
//
if (focused != -1) {
h = getRowHighlights();
BHighlight up = h.get(H_UP);
BHighlight down = h.get(H_DOWN);
if (up != null && down != null) {
up.setVisible((focused > 0) ? H_VIS_FOCUS : H_VIS_FALSE);
down.setVisible((focused < size - 1) ? H_VIS_FOCUS : H_VIS_FALSE);
}
h.refresh(anim);
if (mutable) {
h = getUpDownHighlights();
up = h.get(H_UP);
down = h.get(H_DOWN);
if (up != null && down != null) {
up.setVisible((focused > 0) ? H_VIS_FOCUS : H_VIS_FALSE);
down.setVisible((focused < size - 1) ? H_VIS_FOCUS : H_VIS_FALSE);
}
h.refresh(anim);
}
} else if (isAncestorOf(screen.getFocus())) {
//
// 7. make sure that focus hasn't been removed