Remove usage of ImageBundle (deprecated in GWT 2.0)

Signed-off-by: James Ren <[email protected]>

--- autotest/frontend/client/src/autotest/TestPlannerClient.gwt.xml     
2010-05-04 16:57:02.000000000 -0700
+++ autotest/frontend/client/src/autotest/TestPlannerClient.gwt.xml     
2010-05-04 16:57:02.000000000 -0700
@@ -4,6 +4,7 @@
   <inherits name='com.google.gwt.http.HTTP'/>
   
   <inherits name='com.google.gwt.gen2.Gen2'/>
+  <inherits name="com.google.gwt.resources.Resources" />
 
   <source path="planner"/>
   <source path="common"/>
--- /dev/null   2009-12-17 12:29:38.000000000 -0800
+++ 
autotest/frontend/client/src/autotest/planner/resources/PlannerClientBundle.java
    2010-05-04 16:57:02.000000000 -0700
@@ -0,0 +1,14 @@
+package autotest.planner.resources;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.resources.client.ClientBundle;
+import com.google.gwt.resources.client.ImageResource;
+
+/*
+ * Based on sample code at 
http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html
+ */
+public interface PlannerClientBundle extends ClientBundle {
+    public static final PlannerClientBundle INSTANCE = 
GWT.create(PlannerClientBundle.class);
+
+    public ImageResource close();
+}
==== (deleted) 
//depot/google_vendor_src_branch/autotest/frontend/client/src/autotest/planner/resources/PlannerImageBundle.java
 ====
--- 
autotest/frontend/client/src/autotest/planner/resources/PlannerImageBundle.java 
    2010-05-04 16:57:02.000000000 -0700
+++ /dev/null   2009-12-17 12:29:38.000000000 -0800
@@ -1,8 +0,0 @@
-package autotest.planner.resources;
-
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-import com.google.gwt.user.client.ui.ImageBundle;
-
-public interface PlannerImageBundle extends ImageBundle {
-    public AbstractImagePrototype close();
-}
--- 
autotest/frontend/client/src/autotest/planner/triage/TriagePopupDisplay.java    
    2010-04-30 11:36:56.000000000 -0700
+++ 
autotest/frontend/client/src/autotest/planner/triage/TriagePopupDisplay.java    
    2010-05-04 16:57:02.000000000 -0700
@@ -2,9 +2,8 @@
 
 import autotest.common.ui.ExtendedListBox;
 import autotest.common.ui.SimplifiedList;
-import autotest.planner.resources.PlannerImageBundle;
+import autotest.planner.resources.PlannerClientBundle;
 
-import com.google.gwt.core.client.GWT;
 import com.google.gwt.event.dom.client.HasClickHandlers;
 import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.CheckBox;
@@ -23,8 +22,7 @@
 
 public class TriagePopupDisplay extends PopupPanel implements 
TriagePopup.Display {
     private Panel container = new VerticalPanel();
-    private Image closeX =
-            ((PlannerImageBundle) 
GWT.create(PlannerImageBundle.class)).close().createImage();
+    private Image closeX = new 
Image(PlannerClientBundle.INSTANCE.close().getURL());
     private TextBox labels = new TextBox();
     private TextArea keyvals = new TextArea();
     private TextBox bugs = new TextBox();
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to