void FitParmsTable::Append ( const JCharacter* col1, const JCharacter* col2 ) { const JFontManager* fm = GetFontManager(); JSize lineHeight = fm->GetDefaultFont().GetLineHeight(); AppendRows(1, lineHeight + 2); JString* str = jnew JString(col1); itsCol1->Append(str); JSize col1Width = GetColWidth(1); JSize strWidth = fm->GetDefaultFont().GetStringWidth(*str); if (strWidth + 10 > col1Width) { SetColWidth(1, strWidth + 10); } str = jnew JString(col2); itsCol2->Append(str); JSize col2Width = GetColWidth(2); strWidth = fm->GetDefaultFont().GetStringWidth(*str); if (strWidth + 10 > col2Width) { SetColWidth(2, strWidth + 10); } TableRefresh(); }
void FitParmsTable::Clear() { itsCol1->DeleteAll(); itsCol2->DeleteAll(); RemoveAllRows(); SetColWidth(1, kDefColWidth); SetColWidth(2, kDefColWidth); TableRefresh(); }
void GLFitParameterTable::SetValue ( const JIndex index, const JFloat value, const JFloat error ) { assert(itsFitValues->IndexValid(index)); itsFitValues->SetElement(index, value); itsErrorValues->SetElement(index, error); TableRefresh(); }
void GPMTreeHeaderWidget::HandleMouseDown ( const JPoint& pt, const JXMouseButton button, const JSize clickCount, const JXButtonStates& buttonStates, const JXKeyModifiers& modifiers ) { JPoint cell; if (GetCell(pt, &cell)) { itsList->TreeColSelected(cell.x); TableRefresh(); } }
void GMFilterMBoxTable::SetFilter ( GMFilter* filter ) { itsFilter = filter; if (filter == NULL) { RemoveAllRows(); } else if (GetRowCount() == 0) { AppendRow(GetApertureHeight()); } AdjustButtons(); TableRefresh(); }