Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Weiser2017-05-24 08:58:01 -0400
committerDavid Weiser2017-07-17 07:23:45 -0400
commite564d213078e2b8b6ee2b8a0e5066a45fc276c3e (patch)
tree3e7e2e4902fbabeb430538174a7e4abc2978a144
parentb380644694e60689048d89017eb10e5bd2c2de46 (diff)
downloadrt.equinox.p2-e564d213078e2b8b6ee2b8a0e5066a45fc276c3e.tar.gz
rt.equinox.p2-e564d213078e2b8b6ee2b8a0e5066a45fc276c3e.tar.xz
rt.equinox.p2-e564d213078e2b8b6ee2b8a0e5066a45fc276c3e.zip
Bug 514806 - p2 installation dialog move Select All and Deselect All
button to the side of the filtered tree Change-Id: I4d7f13fc747c02d562ccbc4f41997e35736c8a7c Signed-off-by: David Weiser <david.weiser@vogella.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java38
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java1
2 files changed, 25 insertions, 14 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
index a75fd1289..3242115cc 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUsPage.java
@@ -106,6 +106,7 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
Composite aboveSash = new Composite(sashForm, SWT.NONE);
GridLayout grid = new GridLayout();
+ grid.numColumns = 2;
grid.marginWidth = 0;
grid.marginHeight = 0;
aboveSash.setLayout(grid);
@@ -140,6 +141,7 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
// select buttons
createSelectButtons(aboveSash);
+ createSelectionCount(aboveSash);
// Details area
iuDetailsGroup = new IUDetailsGroup(sashForm, availableIUGroup.getStructuredViewer(), SWT.DEFAULT, true);
@@ -184,6 +186,24 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
Dialog.applyDialogFont(composite);
}
+ private void createSelectionCount(Composite parentComposite) {
+ Composite selectionCountComposite = new Composite(parentComposite, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.marginWidth = 0;
+ layout.verticalSpacing = 10;
+ selectionCountComposite.setLayout(layout);
+ selectionCountComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1));
+
+ selectionCount = new Label(selectionCountComposite, SWT.NONE);
+ GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ selectionCount.setLayoutData(data);
+
+ // separator underneath
+ Label sep = new Label(selectionCountComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
+ GridData separatorGridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ sep.setLayoutData(separatorGridData);
+ }
+
private Composite createProgressBar(Composite parent) {
final Composite progressBarComposite = new Composite(parent, SWT.NONE);
Label progressBarLabel = new Label(progressBarComposite, SWT.NONE);
@@ -227,12 +247,14 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
private void createSelectButtons(Composite parent) {
Composite buttonParent = new Composite(parent, SWT.NONE);
GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
+ gridLayout.numColumns = 1;
+ gridLayout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+ gridLayout.marginHeight = 0;
gridLayout.marginWidth = 0;
gridLayout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
buttonParent.setLayout(gridLayout);
- GridData data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
+ GridData data = new GridData(SWT.FILL, SWT.DEFAULT, false, false);
buttonParent.setLayoutData(data);
Button selectAll = new Button(buttonParent, SWT.PUSH);
@@ -244,18 +266,6 @@ public class AvailableIUsPage extends ProvisioningWizardPage implements ISelecta
deselectAll.setText(ProvUIMessages.SelectableIUsPage_Deselect_All);
setButtonLayoutData(deselectAll);
deselectAll.addListener(SWT.Selection, event -> setAllChecked(false));
-
- // dummy to take extra space
- selectionCount = new Label(buttonParent, SWT.NONE);
- data = new GridData(SWT.FILL, SWT.CENTER, true, true);
- data.horizontalIndent = 20; // breathing room
- selectionCount.setLayoutData(data);
-
- // separator underneath
- Label sep = new Label(buttonParent, SWT.HORIZONTAL | SWT.SEPARATOR);
- data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
- data.horizontalSpan = 3;
- sep.setLayoutData(data);
}
// The viewer method is deprecated because it only applies to visible items,
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
index d4cbbfb9b..dd485c42c 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RepositorySelectionGroup.java
@@ -106,6 +106,7 @@ public class RepositorySelectionGroup {
layout.marginTop = 0;
layout.marginBottom = IDialogConstants.VERTICAL_SPACING;
layout.numColumns = 4;
+ layout.marginWidth = 0;
comboComposite.setLayout(layout);
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
comboComposite.setLayoutData(gd);

Back to the top