/** * Returns Hot Area under coordinates (x, y) */ public PMHotArea getAreaUnder(int x, int y) { // Have to check all elements of hotAreas vector // from end to start. Compare against zero works faster. for (int i = (areascount - 1); i >= 0; i--) { PMHotArea ha = (PMHotArea) hotAreas.elementAt(i); if ((ha != null) && intersects(ha.getAreaShape(), x, y)) return ha; } return null; }