void GLFitDescriptionList::SyncWithManager() { RemoveAllRows(); const JSize count = GetFitManager()->GetFitCount(); AppendRows(count); itsNameList->DeleteAll(); for (JIndex i=1; i<=count; i++) { const GLFitDescription& fd = GetFitManager()->GetFitDescription(i); JString* str = jnew JString(fd.GetFnName()); assert(str != NULL); itsNameList->Append(str); const JCoordinate width = 2*kHMarginWidth + kIconWidth + GetFontManager()->GetDefaultFont().GetStringWidth(*str); if (width > itsMinColWidth) { itsMinColWidth = width; } } AdjustColWidth(); }
void FitParmsTable::Clear() { itsCol1->DeleteAll(); itsCol2->DeleteAll(); RemoveAllRows(); SetColWidth(1, kDefColWidth); SetColWidth(2, kDefColWidth); TableRefresh(); }
void GLFitParameterTable::SetFitDescription ( const GLFitDescription& fit ) { RemoveAllRows(); itsNameList->DeleteAll(); itsStartValues->RemoveAll(); itsFitValues->RemoveAll(); itsErrorValues->RemoveAll(); GLFitDescription::FitType type = fit.GetType(); if (fit.RequiresStartValues()) { if (!itsHasStartValues) { InsertCols(kStartColIndex, 1, kDefColWidth); itsColHeaderWidget->SetColTitle(2, kParmStartTitle); itsHasStartValues = kJTrue; AdjustColWidth(); } } else { if (itsHasStartValues) { RemoveCol(kStartColIndex); itsHasStartValues = kJFalse; AdjustColWidth(); } } const JSize count = fit.GetParameterCount(); AppendRows(count); for (JIndex i = 1; i <= count; i++) { JString* str = new JString(""); fit.GetParameterName(i, str); itsNameList->Append(str); itsStartValues->AppendElement(0); itsFitValues->AppendElement(0); itsErrorValues->AppendElement(0); } }
void GMFilterMBoxTable::SetFilter ( GMFilter* filter ) { itsFilter = filter; if (filter == NULL) { RemoveAllRows(); } else if (GetRowCount() == 0) { AppendRow(GetApertureHeight()); } AdjustButtons(); TableRefresh(); }