JX2DCurveNameList::JX2DCurveNameList ( const JArray<J2DCurveInfo>& curveInfo, const JIndex startIndex, JXScrollbarSet* scrollbarSet, JXContainer* enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h ) : JXEditTable(1, kDefColWidth, scrollbarSet, enclosure, hSizing,vSizing, x,y, w,h), itsInput(NULL) { itsMinColWidth = 1; const JFontManager* fontMgr = GetFontManager(); const JSize rowHeight = 2*kVMarginWidth + fontMgr->GetDefaultFont().GetLineHeight(); SetDefaultRowHeight(rowHeight); const JSize count = curveInfo.GetElementCount(); itsNameList = jnew JPtrArray<JString>(JPtrArrayT::kForgetAll, count); assert(itsNameList != NULL); AppendRows(count); for (JIndex i=1; i<=count; i++) { const J2DCurveInfo info = curveInfo.GetElement(i); itsNameList->Append(info.name); const JCoordinate width = 2*kHMarginWidth + fontMgr->GetDefaultFont().GetStringWidth(*(info.name)); if (width > itsMinColWidth) { itsMinColWidth = width; } } AppendCols(1); AdjustColWidth(); JXColormap* colormap = GetColormap(); SetRowBorderInfo(0, colormap->GetBlackColor()); SetColBorderInfo(0, colormap->GetBlackColor()); BeginEditing(JPoint(1, startIndex)); }
JXTreeListWidget::JXTreeListWidget ( JTreeList* treeList, JXScrollbarSet* scrollbarSet, JXContainer* enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h ) : JXStyleTable(scrollbarSet, enclosure, hSizing,vSizing, x,y, w,h), itsToggleOpenColIndex(0), itsNodeColIndex(0), itsElasticColIndex(0) { itsTreeList = treeList; ListenTo(itsTreeList); itsMinColWidths = new JArray<JSize>; assert( itsMinColWidths != NULL ); itsReselectNodeList = new JPtrArray<JTreeNode>(JPtrArrayT::kForgetAll); assert( itsReselectNodeList != NULL ); ListenTo(itsTreeList->GetTree()); itsIndentWidth = kDefaultIndent; itsDrawSelectionFlag = kJTrue; itsAdjustToTreeTask = NULL; itsToggleDragIndex = 0; itsDNDTargetIndex = 0; itsMaxOpenDepth = kDefaultMaxOpenDepth; itsSavedScrollSetup = NULL; SetRowBorderInfo(0, GetBackColor()); SetColBorderInfo(0, GetBackColor()); ShouldActLike1DList(); NeedsAdjustToTree(); AppendRows(itsTreeList->GetElementCount()); AppendCols(2, kToggleColWidth); // second width adjusts automatically itsToggleOpenColIndex = 1; itsNodeColIndex = 2; itsElasticColIndex = itsNodeColIndex; ListenTo(this); }
GLFitDescriptionList::GLFitDescriptionList ( JXScrollbarSet* scrollbarSet, JXContainer* enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h ) : JXEditTable(1, kDefColWidth, scrollbarSet, enclosure, hSizing,vSizing, x,y, w,h), itsInput(NULL) { itsMinColWidth = 1; const JFontManager* fontMgr = GetFontManager(); const JSize rowHeight = 2*kVMarginWidth + fontMgr->GetDefaultFont().GetLineHeight(); SetDefaultRowHeight(rowHeight); const JSize count = GetFitManager()->GetFitCount(); itsNameList = jnew JPtrArray<JString>(JPtrArrayT::kDeleteAll); assert(itsNameList != NULL); AppendCols(1); SyncWithManager(); JXColormap* colormap = GetColormap(); SetRowBorderInfo(0, colormap->GetBlackColor()); SetColBorderInfo(0, colormap->GetBlackColor()); itsBuiltInIcon = jnew JXImage(GetDisplay(), JXPM(glBuiltInFit)); assert(itsBuiltInIcon != NULL); itsBuiltInIcon->ConvertToRemoteStorage(); itsNonLinearIcon = jnew JXImage(GetDisplay(), JXPM(glNonLinearFit)); assert(itsNonLinearIcon != NULL); itsNonLinearIcon->ConvertToRemoteStorage(); itsPolyIcon = jnew JXImage(GetDisplay(), JXPM(glPolyFit)); assert(itsPolyIcon != NULL); itsPolyIcon->ConvertToRemoteStorage(); itsExecutableIcon = jnew JXImage(GetDisplay(), JXPM(jx_executable_small)); assert( itsExecutableIcon != NULL ); itsExecutableIcon->ConvertToRemoteStorage(); ListenTo(GetFitManager()); }
CMLineIndexTable::CMLineIndexTable ( JOrderedSetT::CompareResult (*bpCcompareFn)(CMBreakpoint *const &, CMBreakpoint *const &), CMSourceDirector* dir, CMSourceText* text, JXScrollbarSet* scrollbarSet, JXContainer* enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h ) : JXTable(1, 1, NULL, enclosure, hSizing, vSizing, x, y, w, h), itsDirector(dir), itsText(text), itsVScrollbar(scrollbarSet->GetVScrollbar()), itsCurrentLineIndex(0), itsLineMenu(NULL), itsDeselectTask(NULL) { itsLink = CMGetLink(); ListenTo(itsLink); itsBPList = jnew JPtrArray<CMBreakpoint>(JPtrArrayT::kForgetAll); assert(itsBPList != NULL); itsBPList->SetCompareFunction(bpCcompareFn); itsBPList->SetSortOrder(JOrderedSetT::kSortAscending); WantInput(kJFalse); SetBackColor(CMGetPrefsManager()->GetColor(CMPrefsManager::kBackColorIndex)); SetFocusColor(GetBackColor()); SetRowBorderInfo(0, GetBackColor()); SetColBorderInfo(0, GetBackColor()); SetDrawOrder(kDrawByCol); AppendCols(3); CMAdjustLineTableToTextTask* task = jnew CMAdjustLineTableToTextTask(this); assert( task != NULL ); task->Go(); ListenTo(itsText); ListenTo(itsVScrollbar); ListenTo(itsLink->GetBreakpointManager()); }
JXColHeaderWidget::JXColHeaderWidget ( JXTable* table, JXScrollbarSet* scrollbarSet, JXContainer* enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h ) : JXEditTable(h,1, NULL, enclosure, hSizing,vSizing, x,y, w,h) { assert( table != NULL && scrollbarSet != NULL ); itsTable = table; itsTable->SetColHeader(this); ListenTo(itsTable); itsHScrollbar = scrollbarSet->GetHScrollbar(); ListenTo(itsHScrollbar); itsTitles = NULL; itsAllowColResizingFlag = kJFalse; itsMinColWidth = 1; itsDragType = kInvalidDrag; itsDragLineCursor = JXGetDragVertLineCursor(GetDisplay()); itsDragAllLineCursor = JXGetDragAllVertLineCursor(GetDisplay()); SetDrawOrder(kDrawByRow); SetRowBorderInfo(0, (GetColormap())->GetBlackColor()); // override JXEditTable WantInput(kJFalse); SetBackColor((GetColormap())->GetDefaultBackColor()); AppendRows(1, GetApertureHeight()); AdjustToTable(); }
CBSymbolTable::CBSymbolTable ( CBSymbolDirector* symbolDirector, CBSymbolList* symbolList, JXScrollbarSet* scrollbarSet, JXContainer* enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h ) : JXTable(10, 10, scrollbarSet, enclosure, hSizing,vSizing, x,y, w,h) { itsSymbolDirector = symbolDirector; itsSymbolList = symbolList; itsMaxStringWidth = 0; itsVisibleList = new JArray<JIndex>(CBSymbolList::kBlockSize); assert( itsVisibleList != NULL ); itsVisibleListLockedFlag = kJFalse; itsNameFilter = NULL; itsNameLiteral = NULL; const JIndex blackColor = (GetColormap())->GetBlackColor(); SetRowBorderInfo(0, blackColor); SetColBorderInfo(0, blackColor); AppendCols(1); SetDefaultRowHeight((GetFontManager())-> GetLineHeight(JGetDefaultFontName(), kJDefaultFontSize, JFontStyle()) + 2*kVMarginWidth); SetSelectionBehavior(kJTrue, kJTrue); ListenTo(itsSymbolList); ListenTo(CBGetSymbolTypeList()); }
GMAccountList::GMAccountList ( GMAccountDialog* dialog, JPtrArray<GMAccount>* accounts, JXScrollbarSet* scrollbarSet, JXContainer* enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h ) : JXEditTable(1, kDefColWidth, scrollbarSet, enclosure, hSizing,vSizing, x,y, w,h), itsInput(NULL), itsDialog(dialog), itsAccountInfo(accounts) { itsMinColWidth = 1; JXColormap* colormap = GetColormap(); const JColorIndex blackColor = colormap->GetBlackColor(); SetRowBorderInfo(0, blackColor); SetColBorderInfo(0, blackColor); const JSize fontHeight = (GetFontManager())->GetLineHeight(JGetDefaultFontName(), kJDefaultFontSize, JFontStyle()); const JCoordinate rowHeight = fontHeight + 2*kVMarginWidth; SetDefaultRowHeight(rowHeight); SetAllRowHeights(rowHeight); itsLineHeight = GetFontManager()->GetLineHeight(JGetDefaultFontName(), kJDefaultFontSize, JFontStyle()) + 2 * kVMarginWidth; ListenTo(itsAccountInfo); }
FitParmsTable::FitParmsTable ( JXScrollbarSet* scrollbarSet, JXContainer* enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h ) : JXTable(1,kDefColWidth, scrollbarSet, enclosure, hSizing,vSizing, x,y, w,h) { AppendCols(2, kDefColWidth); itsCol1 = jnew JPtrArray<JString>(JPtrArrayT::kDeleteAll); assert(itsCol1 != NULL); itsCol2 = jnew JPtrArray<JString>(JPtrArrayT::kDeleteAll); assert(itsCol2 != NULL); SetColBorderInfo(0, GetColormap()->GetBlackColor()); SetRowBorderInfo(0, GetColormap()->GetBlackColor()); }
JXTable::JXTable ( const JCoordinate defRowHeight, const JCoordinate defColWidth, JXScrollbarSet* scrollbarSet, JXContainer* enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h ) : JXScrollableWidget(scrollbarSet, enclosure, hSizing, vSizing, x,y, w,h), JTable(defRowHeight, defColWidth, (GetColormap())->GetGray50Color(), (GetColormap())->GetDefaultSelectionColor()) { const JColorIndex gray50Color = (GetColormap())->GetGray50Color(); SetRowBorderInfo(1, gray50Color); // calls TableSetScrollSteps() SetColBorderInfo(1, gray50Color); }