Skip to content

Commit

Permalink
fixup! fix: added scroll functionality to the CheckboxTableViewer for…
Browse files Browse the repository at this point in the history
… selecting…
  • Loading branch information
emanuelaepure10 committed Jun 27, 2024
1 parent 59ed0cc commit 3456454
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,8 @@ public void widgetSelected(SelectionEvent e) {

featureTypeTable = new CheckboxTableViewer(table);

// Configure the layout for the table
GridData tableGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
tableGridData.heightHint = 300; // Minimum height for the table
tableGridData.widthHint = 300; // Minimum width for the table
table.setLayoutData(tableGridData);
// Configure the layout for the table using GridDataFactory
GridDataFactory.fillDefaults().grab(true, true).hint(300, 300).applyTo(table);

featureTypeTable.setLabelProvider(new LabelProvider() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,13 @@ public void widgetSelected(SelectionEvent e) {
}
});

table = new Table(chooseFeatureTypes,
Table table = new Table(chooseFeatureTypes,
SWT.CHECK | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);

featureTypeTable = new CheckboxTableViewer(table);

// Configure the layout for the table
GridData tableGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
tableGridData.heightHint = 300; // Minimum height for the table
tableGridData.widthHint = 300; // Minimum width for the table
table.setLayoutData(tableGridData);
// Configure the layout for the table using GridDataFactory
GridDataFactory.fillDefaults().grab(true, true).hint(300, 300).applyTo(table);

featureTypeTable.setLabelProvider(new LabelProvider() {

Expand Down

0 comments on commit 3456454

Please sign in to comment.