void (Object component, Object row, String first, String child, boolean shiftdown, boolean controldown) { String selection = getString(component, "selection", "single"); Object lead = null; if (shiftdown && (selection != "single") && ((lead = get(component, "lead")) != null)) { extend(component, lead, row, first, child); } else { if (controldown && (selection == "multiple")) { setBoolean(row, "selected", !getBoolean(row, "selected", false), false); repaint(component, null, row); invoke(component, "action"); set(component, "anchor", null); } else if (controldown && getBoolean(row, "selected", false)) { for (Object item = row; item != null; item = getNextItem(component, item, child)) { if (setBoolean(item, "selected", false, false)) { repaint(component, null, item); } } invoke(component, "action"); set(component, "anchor", null); } else { selectItem(component, row, first, child); } } setLead(component, (lead != null) ? lead : get(component, "lead"), row); }