Author: adietish
Date: 2011-02-02 05:40:23 -0500 (Wed, 02 Feb 2011)
New Revision: 28910
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
Log:
[JBIDE-8310] added choosing an image by double clicking it
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
---
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-02-02
10:18:38 UTC (rev 28909)
+++
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-02-02
10:40:23 UTC (rev 28910)
@@ -1,5 +1,7 @@
2011-02-02 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
(onImageDoubleclick):
+ [JBIDE-8310] added choosing an image by double clicking it
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
(createWidgets):
[JBIDE-8309] fixed layout for image text field
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
===================================================================
---
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2011-02-02
10:18:38 UTC (rev 28909)
+++
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2011-02-02
10:40:23 UTC (rev 28910)
@@ -33,7 +33,9 @@
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
@@ -51,6 +53,7 @@
import org.jboss.tools.deltacloud.ui.views.Columns.Column;
import org.jboss.tools.deltacloud.ui.views.cloudelements.ITableContentAndLabelProvider;
import org.jboss.tools.deltacloud.ui.views.cloudelements.TableViewerColumnComparator;
+import org.jboss.tools.internal.deltacloud.ui.utils.WizardUtils;
/**
* @author Jeff Johnston
@@ -226,7 +229,8 @@
viewer.setComparator(comparator);
createColumns(provider, tableLayout, table);
table.setSortDirection(SWT.NONE);
-
+ viewer.getTable().addListener(SWT.MouseDoubleClick, onImageDoubleclick());
+
Point p1 = nameLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT);
Point p2 = nameText.computeSize(SWT.DEFAULT, SWT.DEFAULT);
int centering = (p2.y - p1.y + 1) / 2;
@@ -350,4 +354,15 @@
}
});
}
+
+ private Listener onImageDoubleclick() {
+ return new Listener() {
+
+ @Override
+ public void handleEvent(Event event) {
+ WizardUtils.nextPageOrFinish(FindImagePage.this);
+ }
+ };
+ }
+
}
Show replies by date