void GMAccountList::HandleMouseDown ( const JPoint& pt, const JXMouseButton button, const JSize clickCount, const JXButtonStates& buttonStates, const JXKeyModifiers& modifiers ) { JPoint cell; if (button == kJXLeftButton && clickCount == 1 && GetCell(pt, &cell)) { JTableSelection& s = GetTableSelection(); if (!s.IsSelected(cell) && itsDialog->OKToSwitchAccounts()) { s.ClearSelection(); s.SelectRow(cell.y); Broadcast(NameSelected(cell.y)); BeginEditing(cell); } else if (s.IsSelected(cell) && !IsEditing()) { BeginEditing(cell); } } else if (button > kJXRightButton) { ScrollForWheel(button, modifiers); } }
JXInputField* JX2DCurveNameList::CreateXInputField ( const JPoint& cell, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h ) { JTableSelection& s = GetTableSelection(); s.ClearSelection(); s.SelectRow(cell.y); Broadcast(NameSelected(cell.y)); assert(itsInput == NULL); itsInput = jnew JXInputField(this, kHElastic, kVElastic, x, y, w, h); assert(itsInput != NULL); itsInput->SetText(*(itsNameList->NthElement(cell.y))); itsInput->SetIsRequired(); return itsInput; }