diff options
| author | Rüdiger Herrmann | 2016-04-19 13:31:28 +0000 |
|---|---|---|
| committer | Rüdiger Herrmann | 2016-04-19 13:31:28 +0000 |
| commit | a13473aeb156855d65ef648453ece233c88ad337 (patch) | |
| tree | 1a214a905a72d42e39ce263d105a54c6a1640c09 | |
| parent | 5a8644b801db30e3d0cdf8bdda4f35952b63d79e (diff) | |
| download | eclipse.platform.ui-a13473aeb156855d65ef648453ece233c88ad337.tar.gz eclipse.platform.ui-a13473aeb156855d65ef648453ece233c88ad337.tar.xz eclipse.platform.ui-a13473aeb156855d65ef648453ece233c88ad337.zip | |
Bug 491949 - [Smart project import] Buttons in wizard should have the same width
Signed-off-by: Rüdiger Herrmann <ruediger.herrmann@gmx.de>
Change-Id: Iaaef8f1160880fea6dbce863d53670ceef104236
| -rw-r--r-- | bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/SmartImportRootWizardPage.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/SmartImportRootWizardPage.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/SmartImportRootWizardPage.java index 454dcd2635c..6a8b03d0268 100644 --- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/SmartImportRootWizardPage.java +++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/SmartImportRootWizardPage.java @@ -9,6 +9,7 @@ * Mickael Istria (Red Hat Inc.) - initial API and implementation * Snjezana Peco (Red Hat Inc.) * Lars Vogel <Lars.Vogel@vogella.com> + * Rüdiger Herrmann <ruediger.herrmann@gmx.de> ******************************************************************************/ package org.eclipse.ui.internal.wizards.datatransfer; @@ -29,6 +30,8 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.fieldassist.ControlDecoration; import org.eclipse.jface.fieldassist.FieldDecorationRegistry; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.viewers.CellLabelProvider; import org.eclipse.jface.viewers.CheckStateChangedEvent; @@ -300,6 +303,7 @@ public class SmartImportRootWizardPage extends WizardPage { .setDescriptionText(DataTransferMessages.SmartImportWizardPage_incorrectRootDirectory); this.rootDirectoryTextDecorator.hide(); Button directoryButton = new Button(res, SWT.PUSH); + GridDataFactory.defaultsFor(directoryButton).applyTo(directoryButton); directoryButton.setText(DataTransferMessages.SmartImportWizardPage_browse); directoryButton.addSelectionListener(new SelectionAdapter() { @Override @@ -324,6 +328,7 @@ public class SmartImportRootWizardPage extends WizardPage { } }); Button browseArchiveButton = new Button(res, SWT.PUSH); + GridDataFactory.defaultsFor(browseArchiveButton).applyTo(browseArchiveButton); browseArchiveButton.setText(DataTransferMessages.SmartImportWizardPage_selectArchiveButton); browseArchiveButton.addSelectionListener(new SelectionAdapter() { @Override @@ -408,7 +413,7 @@ public class SmartImportRootWizardPage extends WizardPage { */ private void createProposalsGroup(Composite parent) { Composite res = new Composite(parent, SWT.NONE); - res.setLayout(new GridLayout(2, false)); + GridLayoutFactory.fillDefaults().numColumns(2).applyTo(res); PatternFilter patternFilter = new PatternFilter(); patternFilter.setIncludeLeadingWildcard(true); FilteredTree filterTree = new FilteredTree(res, SWT.BORDER | SWT.CHECK, patternFilter, true) { @@ -484,10 +489,10 @@ public class SmartImportRootWizardPage extends WizardPage { tree.getTree().getColumn(1).setWidth(250); Composite selectionButtonsGroup = new Composite(res, SWT.NONE); - selectionButtonsGroup.setLayout(new GridLayout(1, false)); + GridLayoutFactory.fillDefaults().applyTo(selectionButtonsGroup); selectionButtonsGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true)); Button selectAllButton = new Button(selectionButtonsGroup, SWT.PUSH); - selectAllButton.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, false, false)); + GridDataFactory.defaultsFor(selectAllButton).applyTo(selectAllButton); selectAllButton.setText(DataTransferMessages.DataTransfer_selectAll); selectAllButton.addSelectionListener(new SelectionAdapter() { @Override @@ -497,7 +502,7 @@ public class SmartImportRootWizardPage extends WizardPage { } }); Button deselectAllButton = new Button(selectionButtonsGroup, SWT.PUSH); - deselectAllButton.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, false, false)); + GridDataFactory.defaultsFor(deselectAllButton).applyTo(deselectAllButton); deselectAllButton.setText(DataTransferMessages.DataTransfer_deselectAll); deselectAllButton.addSelectionListener(new SelectionAdapter() { @Override |
