}
}
- public TableViewer addTableViewer(Table table) {
- TableViewer tableViewer = new TableViewer(table);
- tableViewer.setUseHashlookup(true);
- String[] colNams = new String[columnNames.size()];
- for (int i = 0; i < columnNames.size(); i++) {
- colNams[i] = (String) columnNames.get(i);
- }
- tableViewer.setColumnProperties(colNams);
-
- // Create the cell editors
- CellEditor[] editors = new CellEditor[columnNames.size()];
- for (int i = 0; i < columnNames.size(); i++) {
- TextCellEditor textEditor = new TextCellEditor(table);
- ((Text) textEditor.getControl()).setTextLimit(60);
- editors[i] = textEditor;
- }
- // Assign the cell editors to the viewer
- tableViewer.setCellEditors(editors);
- // Set the cell modifier for the viewer
- //tableViewer.setCellModifier(new MetaDataModifier(this));
- // Set the default sorter for the viewer
- //tableViewer.setSorter(new ExampleTaskSorter(ExampleTaskSorter.DESCRIPTION));
-
- return tableViewer;
- }
+// public TableViewer addTableViewer(Table table) {
+// TableViewer tableViewer = new TableViewer(table);
+// tableViewer.setUseHashlookup(true);
+// String[] colNams = new String[columnNames.size()];
+// for (int i = 0; i < columnNames.size(); i++) {
+// colNams[i] = (String) columnNames.get(i);
+// }
+// tableViewer.setColumnProperties(colNams);
+//
+// // Create the cell editors
+// CellEditor[] editors = new CellEditor[columnNames.size()];
+// for (int i = 0; i < columnNames.size(); i++) {
+// TextCellEditor textEditor = new TextCellEditor(table);
+// ((Text) textEditor.getControl()).setTextLimit(60);
+// editors[i] = textEditor;
+// }
+// // Assign the cell editors to the viewer
+// tableViewer.setCellEditors(editors);
+// // Set the cell modifier for the viewer
+// //tableViewer.setCellModifier(new MetaDataModifier(this));
+// // Set the default sorter for the viewer
+// //tableViewer.setSorter(new ExampleTaskSorter(ExampleTaskSorter.DESCRIPTION));
+//
+// return tableViewer;
+// }
public int getPageSize() {
return pageSize;