Java Code Examples for org.eclipse.jface.viewers.TableViewer#setComparator()
The following examples show how to use
org.eclipse.jface.viewers.TableViewer#setComparator() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProjectSelector.java From google-cloud-eclipse with Apache License 2.0 | 6 votes |
public ProjectSelector(Composite parent) { super(parent, SWT.NONE); GridLayoutFactory.fillDefaults().numColumns(2).spacing(0, 0).applyTo(this); Composite tableComposite = new Composite(this, SWT.NONE); TableColumnLayout tableColumnLayout = new TableColumnLayout(); tableComposite.setLayout(tableColumnLayout); GridDataFactory.fillDefaults().grab(true, true).applyTo(tableComposite); viewer = new TableViewer(tableComposite, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION); createColumns(tableColumnLayout); viewer.getTable().setHeaderVisible(true); viewer.getTable().setLinesVisible(false); input = WritableList.withElementType(GcpProject.class); projectProperties = PojoProperties.values(new String[] {"name", "id"}); //$NON-NLS-1$ //$NON-NLS-2$ ViewerSupport.bind(viewer, input, projectProperties); viewer.setComparator(new ViewerComparator()); Composite linkComposite = new Composite(this, SWT.NONE); statusLink = new Link(linkComposite, SWT.WRAP); statusLink.addSelectionListener( new OpenUriSelectionListener(new ErrorDialogErrorHandler(getShell()))); statusLink.setText(""); GridDataFactory.fillDefaults().span(2, 1).applyTo(linkComposite); GridLayoutFactory.fillDefaults().generateLayout(linkComposite); }
Example 2
Source File: DynamicWorkingSetPage.java From eclipse-extras with Eclipse Public License 1.0 | 6 votes |
private void createControls( Composite parent ) { composite = new Composite( parent, SWT.NONE ); Label nameLabel = new Label( composite, SWT.NONE ); nameLabel.setText( "&Name" ); nameText = new Text( composite, SWT.BORDER ); Label patternLabel = new Label( composite, SWT.NONE ); patternLabel.setText( "&Pattern" ); patternText = new Text( composite, SWT.BORDER ); installPatternContentAssist(); previewLabel = new Label( composite, SWT.NONE ); previewLabel.setText( "Preview" ); previewViewer = new TableViewer( composite, SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER ); previewViewer.getControl().setBackground( getWidgetBackgroundColor() ); previewViewer.getControl().addListener( SWT.FocusOut, new PreviewFocusOutListener() ); previewLabelProvider = new PreviewLabelProvider( getShell().getDisplay() ); previewViewer.setLabelProvider( previewLabelProvider ); previewViewer.setContentProvider( ArrayContentProvider.getInstance() ); previewViewer.setInput( projectsProvider.getProjects() ); previewViewer.setComparator( new PreviewComparator( "" ) ); }
Example 3
Source File: MultiPageCSVEditor.java From gama with GNU General Public License v3.0 | 6 votes |
/** * */ private void createTablePage() { final Composite parent = getContainer(); final Composite intermediate = new Composite(parent, SWT.NONE); final Composite composite = GamaToolbarFactory.createToolbars(this, intermediate); tableViewer = new TableViewer(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER); tableViewer.setUseHashlookup(true); final Table table = tableViewer.getTable(); table.setHeaderVisible(true); table.setLinesVisible(true); // set the sorter for the table tableViewer.setComparator(tableSorter); // set a table filter tableViewer.addFilter(tableFilter); addPage(intermediate); setPageText(indexTBL, "Table"); }
Example 4
Source File: CListTable.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
private void createTable(Composite parent) { tableViewer = new TableViewer(parent, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION); tableViewer.getControl().setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); tableViewer.setContentProvider(ArrayContentProvider.getInstance()); tableViewer.setLabelProvider(new LabelProvider()); tableViewer.setComparator(new ViewerComparator()); tableViewer.setInput(items); tableViewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { updateStates(); } }); updateStates(); }
Example 5
Source File: NLSSearchResultPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 6 votes |
@Override protected void configureTableViewer(TableViewer viewer) { viewer.setComparator(new ViewerComparator() { @Override public int category(Object element) { if (element instanceof FileEntry) { return 0; } else { return 1; } } }); viewer.setLabelProvider(new ColoringLabelProvider(new NLSSearchResultLabelProvider2(this))); fContentProvider= new TextSearchTableContentProvider(); viewer.setContentProvider(fContentProvider); }
Example 6
Source File: AssignStickerDialog.java From elexis-3-core with Eclipse Public License 1.0 | 6 votes |
@Override protected Control createDialogArea(Composite parent){ Composite ret = new Composite(parent, SWT.NONE); ret.setLayoutData(SWTHelper.getFillGridData(1, true, 1, true)); ret.setLayout(new GridLayout()); Label lbl = new Label(ret, SWT.WRAP); lbl.setText(Messages.AssignStickerDialog_PleaseConfirm); //$NON-NLS-1$ viewer = new TableViewer(ret, SWT.CHECK | SWT.FULL_SELECTION); viewer.getTable().setLayoutData(SWTHelper.getFillGridData(1, true, 1, true)); viewer.getTable().setHeaderVisible(true); viewer.setContentProvider(ArrayContentProvider.getInstance()); viewer.setInput(alleEtiketten); createColumns(); comparator = new StickerViewerComparator(); viewer.setComparator(comparator); checkAlreadySelected(); return ret; }
Example 7
Source File: EdgeMatcherTableControl.java From depan with Apache License 2.0 | 5 votes |
public EdgeMatcherTableControl(Composite parent) { super(parent, SWT.NONE); setLayout(Widgets.buildContainerLayout(1)); viewer = new TableViewer(this, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL); // Layout embedded table Table relationTable = viewer.getTable(); relationTable.setLayoutData(Widgets.buildGrabFillData()); // initialize the table relationTable.setHeaderVisible(true); relationTable.setToolTipText("Edge Matcher Definition"); EditColTableDef.setupTable(TABLE_DEF, relationTable); CellEditor[] cellEditors = new CellEditor[TABLE_DEF.length]; cellEditors[INDEX_RELATION] = null; cellEditors[INDEX_FORWARD] = new CheckboxCellEditor(relationTable); cellEditors[INDEX_BACKWARD] = new CheckboxCellEditor(relationTable); // cell content viewer.setCellEditors(cellEditors); viewer.setLabelProvider(new CellLabelProvider()); viewer.setColumnProperties(EditColTableDef.getProperties(TABLE_DEF)); viewer.setCellModifier(new CellModifier()); viewer.setContentProvider(ArrayContentProvider.getInstance()); viewer.setComparator(new AlphabeticSorter(new ViewerObjectToString() { @Override public String getString(Object object) { if (object instanceof Relation) { return ((Relation) object).toString(); } return object.toString(); } })); }
Example 8
Source File: TasksPreferencePage.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
/** * @param parent */ private void createTaskTableArea(Composite parent) { fTasksTableViewer = new TableViewer(parent, SWT.BORDER | SWT.SINGLE); Table table = fTasksTableViewer.getTable(); table.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); table.setHeaderVisible(true); table.setLinesVisible(true); table.setFont(parent.getFont()); TableColumn tagNameColumn = new TableColumn(table, SWT.NONE); tagNameColumn.setText(Messages.TasksPreferencePage_TagNameColumnHeader); tagNameColumn.setWidth(100); TableColumn tagPriorityColumn = new TableColumn(table, SWT.NONE); tagPriorityColumn.setText(Messages.TasksPreferencePage_PriorityColumnHeader); tagPriorityColumn.setWidth(100); fTasksTableViewer.setContentProvider(ArrayContentProvider.getInstance()); fTasksTableViewer.setLabelProvider(new TaskLabelProvider()); fTasksTableViewer.setComparator(new ViewerComparator()); fTasksTableViewer.setInput(getTaskTags()); fTasksTableViewer.addSelectionChangedListener(new ISelectionChangedListener() { public void selectionChanged(SelectionChangedEvent event) { // Enable/disable buttons updateButtonStates(); } }); createTaskButtons(parent); }
Example 9
Source File: OccurrencesSearchResultPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected void configureTableViewer(TableViewer viewer) { viewer.setComparator(new ViewerComparator() { @Override public int compare(Viewer v, Object e1, Object e2) { JavaElementLine jel1= (JavaElementLine) e1; JavaElementLine jel2= (JavaElementLine) e2; return jel1.getLineNumber() - jel2.getLineNumber(); } }); viewer.setLabelProvider(new ColoringLabelProvider(new OccurrencesSearchLabelProvider(this))); fContentProvider= new TextSearchTableContentProvider(); viewer.setContentProvider(fContentProvider); }
Example 10
Source File: JavaSearchResultPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected void configureTableViewer(TableViewer viewer) { viewer.setUseHashlookup(true); fSortingLabelProvider= new SortingLabelProvider(this); viewer.setLabelProvider(new DecoratingJavaLabelProvider(fSortingLabelProvider, false)); fContentProvider=new JavaSearchTableContentProvider(this); viewer.setContentProvider(fContentProvider); viewer.setComparator(new DecoratorIgnoringViewerSorter(fSortingLabelProvider)); setSortOrder(fCurrentSortOrder); addDragAdapters(viewer); }
Example 11
Source File: JavaWorkingSetPage.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * {@inheritDoc} */ @Override protected void configureTable(TableViewer table) { AppearanceAwareLabelProvider javaElementLabelProvider= new AppearanceAwareLabelProvider( AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | JavaElementLabels.P_COMPRESSED | JavaElementLabels.ROOT_POST_QUALIFIED | JavaElementLabels.P_POST_QUALIFIED, AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS | JavaElementImageProvider.SMALL_ICONS ); table.setLabelProvider(new DecoratingJavaLabelProvider(javaElementLabelProvider)); table.setComparator(new JavaElementComparator()); }
Example 12
Source File: TableSorter.java From Flashtool with GNU General Public License v3.0 | 5 votes |
public TableSorter(TableViewer tableViewer) { this.tableViewer = tableViewer; addColumnSelectionListeners(tableViewer); tableViewer.setComparator(new ViewerComparator() { public int compare(Viewer viewer, Object e1, Object e2) { return compareElements(e1, e2); } }); }
Example 13
Source File: FileSearchPage.java From Pydev with Eclipse Public License 1.0 | 5 votes |
@Override protected void configureTableViewer(TableViewer viewer) { viewer.setUseHashlookup(true); FileLabelProvider innerLabelProvider = new FileLabelProvider(this, fCurrentSortOrder); viewer.setLabelProvider(innerLabelProvider); viewer.setContentProvider(new FileTableContentProvider(this)); viewer.setComparator(new DecoratorIgnoringViewerSorter(innerLabelProvider)); fContentProvider = (IFileSearchContentProvider) viewer.getContentProvider(); addDragAdapters(viewer); }
Example 14
Source File: TableViewerSorter.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
public TableViewerSorter(TableViewer tableViewer){ this.tableViewer = tableViewer; addColumnSelectionListeners(tableViewer); tableViewer.setComparator(new ViewerComparator() { public int compare(Viewer viewer, Object e1, Object e2){ return compareElements(e1, e2); } }); }
Example 15
Source File: Viewer.java From olca-app with Mozilla Public License 2.0 | 5 votes |
@Override protected TableViewer createViewer(Composite parent) { TableViewer viewer = super.createViewer(parent); Tables.bindColumnWidths(viewer, 0.7, 0.25, 0.05); viewer.setComparator(new Comparator()); return viewer; }
Example 16
Source File: ContactSelectorView.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
@Override public void createPartControl(Composite parent){ Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout(1, false)); Composite compositeSearch = new Composite(composite, SWT.NONE); compositeSearch.setLayout(new GridLayout(1, false)); compositeSearch.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); txtFilter = new Text(compositeSearch, SWT.BORDER | SWT.SEARCH | SWT.CANCEL); txtFilter.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); tableViewerContacts = new TableViewer(composite, SWT.BORDER | SWT.FULL_SELECTION); Table table = tableViewerContacts.getTable(); table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); Composite compositeStatus = new Composite(composite, SWT.NONE); compositeStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); compositeStatus.setLayout(new GridLayout(1, false)); lblStatus = new Label(compositeStatus, SWT.NONE); lblStatus.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); tableViewerContacts.setComparator(new ContactSelectorViewerComparator(tableViewerContacts)); filterAnzeigeTyp = new KontaktAnzeigeTypViewerFilter(tableViewerContacts); ViewerFilter[] filters = new ViewerFilter[] { filterAnzeigeTyp, filterPositionTitle }; tableViewerContacts.setFilters(filters); int operations = DND.DROP_COPY | DND.DROP_MOVE; Transfer[] transferTypes = new Transfer[] { TextTransfer.getInstance() }; tableViewerContacts.addDragSupport(operations, transferTypes, new ContactSelectorDragListener(tableViewerContacts)); tableViewerContacts.addDropSupport(operations, transferTypes, new ContactSelectorDropListener(tableViewerContacts)); txtFilter.addKeyListener(new FilterKeyListener(txtFilter, tableViewerContacts)); txtFilter.addSelectionListener(new SelectionAdapter() { public void widgetDefaultSelected(SelectionEvent e){ if (e.detail == SWT.CANCEL) { filterPositionTitle.setSearchText(null); tableViewerContacts.getControl().setRedraw(false); tableViewerContacts.refresh(); tableViewerContacts.getControl().setRedraw(true); } } }); initDataBindings(); MenuManager menuManager = new MenuManager(); menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); tableViewerContacts.getTable().setMenu( menuManager.createContextMenu(tableViewerContacts.getTable())); getSite().registerContextMenu(menuManager, tableViewerContacts); getSite().setSelectionProvider(tableViewerContacts); contactList.getRealm().asyncExec(loadContactsRunnable); tableViewerContacts .addSelectionChangedListener(new ContactSelectionChangedToEventDispatcher()); tableViewerContacts.addSelectionChangedListener(new ISelectionChangedListener() { @Override public void selectionChanged(SelectionChangedEvent event){ StructuredSelection ss = (StructuredSelection) event.getSelection(); tableViewerContacts.refresh(ss.getFirstElement()); } }); }
Example 17
Source File: MakrosComposite.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
/** * Create the composite. * * @param parent * @param style */ public MakrosComposite(Composite parent, int style){ super(parent, style); setLayout(new GridLayout(1, false)); CLabel lblHeader = new CLabel(this, SWT.NONE); lblHeader.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1)); lblHeader.setText("Makros des Anwender " + CoreHub.getLoggedInContact().getLabel()); SashForm sash = new SashForm(this, SWT.HORIZONTAL); sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); Composite selectionComposite = new Composite(sash, SWT.NONE); selectionComposite.setLayout(new GridLayout(1, true)); ToolBarManager toolbar = new ToolBarManager(); ToolBar toolbarControl = toolbar.createControl(selectionComposite); toolbarControl.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false)); viewer = new TableViewer(selectionComposite, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI); viewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); viewer.setContentProvider(new ArrayContentProvider()); viewer.setLabelProvider(new DefaultLabelProvider()); viewer.setInput(getUserMakros(CoreHub.getLoggedInContact())); viewer.addSelectionChangedListener(new ISelectionChangedListener() { @Override public void selectionChanged(SelectionChangedEvent event){ StructuredSelection selection = (StructuredSelection) viewer.getSelection(); if (selection != null && !selection.isEmpty()) { detailComposite.setMakro((MakroDTO) selection.getFirstElement()); } else { detailComposite.setMakro(null); } } }); viewer.setComparator(new ViewerComparator()); MenuManager menuManager = new MenuManager(); menuManager.add(new RemoveMakroAction(viewer)); MenuManager subMenu = new MenuManager("Marko zu Anwender kopieren"); subMenu.setRemoveAllWhenShown(true); subMenu.addMenuListener(new IMenuListener() { @Override public void menuAboutToShow(IMenuManager manager){ addCopyToUserActions(manager); } }); menuManager.add(subMenu); Menu menu = menuManager.createContextMenu(viewer.getTable()); viewer.getTable().setMenu(menu); toolbar.add(new AddMakroAction(viewer)); toolbar.add(new RemoveMakroAction(viewer)); toolbar.add(new RefreshMakrosAction(viewer)); toolbar.update(true); detailComposite = new MakroDetailComposite(sash, SWT.NONE); // can only be set after child components are available sash.setWeights(new int[] { 1, 4 }); }
Example 18
Source File: ImportFileWizardPage.java From bonita-studio with GNU General Public License v2.0 | 4 votes |
protected Composite doCreateControls(Composite parent, DataBindingContext dbc) { final Composite mainComposite = new Composite(parent, SWT.NONE); mainComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(3).margins(0, 0).extendedMargins(10, 10, 10, 0).create()); final Group transfoGroup = new Group(mainComposite, SWT.NONE); transfoGroup.setText(Messages.fileFormat); transfoGroup.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).span(3, 1).create()); transfoGroup.setLayout(new GridLayout(2, true)); final TableViewer importList = new TableViewer(transfoGroup, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION); importList.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); importList.setContentProvider(ArrayContentProvider.getInstance()); importList.setComparator(new ImporterPriorityDisplayComparator()); importList.setLabelProvider(new LabelProvider() { @Override public String getText(Object item) { return ((ImporterFactory) item).getName(); } }); final List<ImporterFactory> allAvailableImports = ImporterRegistry.getInstance().getAllAvailableImports(); importList.setInput(allAvailableImports); final IObservableValue importerFactoryObservable = PojoObservables.observeValue(importFileData, "importerFactory"); importerFactoryObservable.setValue(importList.getElementAt(0)); dbc.bindValue(ViewersObservables.observeSingleSelection(importList), importerFactoryObservable, updateValueStrategy().withValidator(mandatoryValidator(Messages.fileFormat)).create(), updateValueStrategy().create()); final Composite descComposite = new Composite(transfoGroup, SWT.NONE); descComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).spacing(5, 3).create()); descComposite.setLayoutData(GridDataFactory.fillDefaults().grab(false, true).create()); final Label importDescriptionLabel = new Label(descComposite, SWT.NONE); importDescriptionLabel.setText(Messages.importDescriptionLabel); final Label descriptionImage = new Label(descComposite, SWT.NONE); descriptionImage.setLayoutData(GridDataFactory.fillDefaults().align(SWT.BEGINNING, SWT.FILL).create()); final Label separator = new Label(descComposite, SWT.SEPARATOR | SWT.HORIZONTAL); separator.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); final Label descriptionLabel = new Label(descComposite, SWT.WRAP); descriptionLabel.setLayoutData(GridDataFactory.fillDefaults().hint(230, SWT.DEFAULT).grab(false, true).create()); updatePanel(importFileData.getImporterFactory(), descriptionImage, descriptionLabel); doCreateAdditionalControls(mainComposite, dbc); final Label fileLabel = new Label(mainComposite, SWT.NONE); fileLabel.setText(Messages.selectFileToImport); final Text text = new Text(mainComposite, SWT.BORDER); text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); final IObservableValue filePathObservable = PojoObservables.observeValue(importFileData, "filePath"); dbc.bindValue(SWTObservables.observeText(text, SWT.Modify), filePathObservable, updateValueStrategy().withValidator(pathValidator(Messages.selectFileToImport).overrideMessage(Messages.invalidFilePath)).create(), updateValueStrategy().create()); final Button browseButton = new Button(mainComposite, SWT.PUSH); browseButton.setText(Messages.browseButton_label); browseButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { final String file = openFileDialog(); if (file != null) { text.setText(file); if (new File(file).exists()) { savePath(new File(file).getParentFile().getAbsolutePath()); } } } }); importList.addSelectionChangedListener(new ISelectionChangedListener() { @Override public void selectionChanged(SelectionChangedEvent event) { updatePanel((ImporterFactory) importerFactoryObservable.getValue(), descriptionImage, descriptionLabel); } }); importList.addDoubleClickListener(new IDoubleClickListener() { @Override public void doubleClick(DoubleClickEvent arg0) { updatePanel((ImporterFactory) importerFactoryObservable.getValue(), descriptionImage, descriptionLabel); browseButton.notifyListeners(SWT.Selection, null); } }); return mainComposite; }
Example 19
Source File: ProblemsDialog.java From bonita-studio with GNU General Public License v2.0 | 4 votes |
@Override protected Control createCustomArea(Composite parent) { Collection<T> input = getInput(); Assert.isNotNull(input); if (input.isEmpty()) { return super.createCustomArea(parent); } if(messageLabel != null) { GridData layoutData = (GridData) messageLabel.getLayoutData(); layoutData.verticalAlignment = SWT.CENTER; } TableViewer problemsViewer = new TableViewer(parent, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION); problemsViewer.getControl().setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(600, 100).create()); problemsViewer.setContentProvider(ArrayContentProvider.getInstance()); problemsViewer.setComparator(getComparator()); TableLayout layout = new TableLayout(); layout.addColumnData(new ColumnWeightData(1, false)); problemsViewer.getTable().setLayout(layout); tableViewerColumn = new TableViewerColumn(problemsViewer, SWT.NONE); TypedLabelProvider<T> typedLabelProvider = getTypedLabelProvider(); Assert.isNotNull(typedLabelProvider); tableViewerColumn.setLabelProvider(new LabelProviderBuilder<T>() .withTextProvider(typedLabelProvider::getText) .withImageProvider(typedLabelProvider::getImage) .withTooltipProvider(typedLabelProvider::getToolTipText) .createColumnLabelProvider()); problemsViewer.getTable().getShell().addControlListener(new ControlAdapter() { @Override public void controlResized(ControlEvent e) { tableViewerColumn.getColumn().pack(); } }); problemsViewer.setInput(input); ColumnViewerToolTipSupport.enableFor(problemsViewer); return problemsViewer.getControl(); }
Example 20
Source File: GroupPage.java From olca-app with Mozilla Public License 2.0 | 4 votes |
private void configureViewer(TableViewer viewer) { viewer.setLabelProvider(new GroupPageLabel()); viewer.setContentProvider(new ArrayContentProvider()); viewer.setComparator(new GroupPageComparator()); }