[jbosstools-commits] JBoss Tools SVN: r43918 - trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/download.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Sep 21 05:27:12 EDT 2012


Author: rob.stryker at jboss.com
Date: 2012-09-21 05:27:12 -0400 (Fri, 21 Sep 2012)
New Revision: 43918

Modified:
   trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/download/DownloadRuntimeViewerDialog.java
Log:
very small changes to UI to improve download runtime dialog 

Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/download/DownloadRuntimeViewerDialog.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/download/DownloadRuntimeViewerDialog.java	2012-09-21 09:20:20 UTC (rev 43917)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/download/DownloadRuntimeViewerDialog.java	2012-09-21 09:27:12 UTC (rev 43918)
@@ -19,8 +19,8 @@
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
 import org.eclipse.jface.viewers.ColumnLabelProvider;
 import org.eclipse.jface.viewers.ColumnLayoutData;
 import org.eclipse.jface.viewers.ColumnWeightData;
@@ -55,7 +55,7 @@
  * @author snjeza
  * 
  */
-public class DownloadRuntimeViewerDialog extends Dialog {
+public class DownloadRuntimeViewerDialog extends TitleAreaDialog {
 	
 	private TableViewer viewer;
 	private Map<String, DownloadRuntime> downloadRuntimes;
@@ -88,9 +88,11 @@
 	
 	@Override
 	protected Control createDialogArea(Composite parent) {
-		getShell().setText("Runtimes");
+		getShell().setText("Download Runtimes");
+		setTitle("Download Runtimes");
+		setMessage("Please select a runtime to download and install.");
+
 		Composite area = (Composite) super.createDialogArea(parent);
-		area.setLayout(new GridLayout());
 		Composite contents = new Composite(area, SWT.NONE);
 		GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
 		contents.setLayoutData(gd);
@@ -98,7 +100,7 @@
 		applyDialogFont(contents);
 		initializeDialogUnits(area);
 
-		viewer = new TableViewer(parent, SWT.SINGLE | SWT.FULL_SELECTION | SWT.H_SCROLL
+		viewer = new TableViewer(contents, SWT.SINGLE | SWT.FULL_SELECTION | SWT.H_SCROLL
 				| SWT.V_SCROLL | SWT.BORDER);
 		gd = new GridData(SWT.FILL, SWT.FILL, true, true);
 		gd.heightHint = 400;
@@ -112,8 +114,7 @@
 		
 		viewer.setContentProvider(new DownloadRuntimesContentProvider());
 		
-		//String[] columnHeaders = {"Name", "ID", "Version", "URL"};
-		String[] columnHeaders = {"Name", "ID", "Version"};
+		String[] columnHeaders = {"Name", "Version", "URL"};
 		for (int i = 0; i < columnHeaders.length; i++) {
 			TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
 			column.setLabelProvider(new DownloadRuntimesLabelProvider(i));
@@ -210,11 +211,11 @@
 				case 0:
 					return downloadRuntime.getName();
 				case 1:
-					return downloadRuntime.getId();
+					return downloadRuntime.getVersion();
 				case 2:
-					return downloadRuntime.getVersion();
+					return downloadRuntime.getUrl();
 				case 3:
-					return downloadRuntime.getUrl();
+					return downloadRuntime.getId();
 				}
 			}
 			return null;



More information about the jbosstools-commits mailing list