void JXFSBindingTable::ApertureResized ( const JCoordinate dw, const JCoordinate dh ) { JXEditTable::ApertureResized(dw, dh); UpdateColWidths(); }
JXFSBindingTable::JXFSBindingTable ( JFSBindingList* list, JXTextButton* addButton, JXTextButton* removeButton, JXTextButton* duplicateButton, JXScrollbarSet* scrollbarSet, JXContainer* enclosure, const HSizingOption hSizing, const VSizingOption vSizing, const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h ) : JXEditTable(1,1, scrollbarSet, enclosure, hSizing, vSizing, x, y, w, h), itsBindingList(list), itsAddButton(addButton), itsRemoveButton(removeButton), itsDuplicateButton(duplicateButton), itsTextInput(NULL) { // row height const JSize rowHeight = 2*kVMarginWidth + JMax( (GetFontManager())->GetLineHeight(JGetDefaultFontName(), kJDefaultFontSize, JFontStyle()), (GetFontManager())->GetLineHeight(JGetMonospaceFontName(), kJDefaultMonoFontSize, JFontStyle())); SetDefaultRowHeight(rowHeight); // buttons ListenTo(itsAddButton); ListenTo(itsRemoveButton); ListenTo(itsDuplicateButton); // type menu itsTypeMenu = new JXTextMenu("", this, kFixedLeft, kFixedTop, 0,0, 10,10); assert( itsTypeMenu != NULL ); itsTypeMenu->Hide(); itsTypeMenu->SetToHiddenPopupMenu(kJTrue); itsTypeMenu->SetMenuItems(kTypeMenuStr); itsTypeMenu->SetUpdateAction(JXMenu::kDisableNone); ListenTo(itsTypeMenu); // regex for testing itsTestRegex = new JRegex; assert( itsTestRegex != NULL ); // data for (JIndex i=1; i<=kColCount; i++) { AppendCols(1, kInitColWidth[i-1]); } UpdateColWidths(); const JSize rowCount = itsBindingList->GetElementCount(); AppendRows(rowCount); UpdateButtons(); ListenTo(&(GetTableSelection())); }