Author: adietish
Date: 2011-07-22 05:35:18 -0400 (Fri, 22 Jul 2011)
New Revision: 33132
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/profiles/SelectProfilesDialog.java
Log:
[JBIDE-8969] corrected layout so that warning label gets aligned correctly
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/profiles/SelectProfilesDialog.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/profiles/SelectProfilesDialog.java 2011-07-22
08:56:52 UTC (rev 33131)
+++
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/profiles/SelectProfilesDialog.java 2011-07-22
09:35:18 UTC (rev 33132)
@@ -19,6 +19,8 @@
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTableViewer;
@@ -103,10 +105,11 @@
@Override
protected Control createDialogArea(Composite parent) {
Composite area = (Composite) super.createDialogArea(parent);
+
Composite container = new Composite(area, SWT.NONE);
container.setEnabled(true);
- GridLayout layout = new GridLayout(2, false);
+ GridLayout layout = new GridLayout(3, false);
layout.marginLeft = 12;
container.setLayout(layout);
container.setLayoutData(new GridData(GridData.FILL_BOTH));
@@ -125,7 +128,7 @@
if (facade != null) {
Label profilesLabel = new Label(container, SWT.NONE);
- profilesLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 2,
1));
+ profilesLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1,
1));
profilesLabel.setText(NLS.bind(Messages.SelectProfilesDialog_Active_Profiles_for_Project,
facade.getProject().getName()));
profilesText = new Text(container, SWT.BORDER);
@@ -137,16 +140,17 @@
}
boolean hasProfiles = !sharedProfiles.isEmpty();
- //Label warningLabel = new Label(container, SWT.CENTER);
- //warningLabel.setVisible(false);
+ Label warningLabel = new Label(container, SWT.CENTER);
+ warningLabel.setVisible(false);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(warningLabel);
Label lblAvailable = new Label(container, SWT.NONE);
String textLabel;
if (hasProfiles) {
if (facade == null) {
textLabel = Messages.SelectProfilesDialog_Common_profiles;
- //warningLabel.setImage(JFaceResources.getImage(DLG_IMG_MESSAGE_WARNING));
- //warningLabel.setVisible(true);
+ warningLabel.setImage(JFaceResources.getImage(DLG_IMG_MESSAGE_WARNING));
+ warningLabel.setVisible(true);
} else {
textLabel = Messages.SelectProfilesDialog_Available_profiles;
}
@@ -164,7 +168,7 @@
if (hasProfiles) {
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 4);
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 4);
gd.heightHint = 200;
gd.widthHint = 500;
Show replies by date