import java.util.Map;\r
\r
import com.google.gwt.core.client.GWT;\r
+import com.google.gwt.event.dom.client.ClickEvent;\r
+import com.google.gwt.event.dom.client.ClickHandler;\r
import com.google.gwt.gears.client.Factory;\r
import com.google.gwt.gears.client.desktop.Desktop;\r
import com.google.gwt.gears.client.desktop.File;\r
import com.google.gwt.user.client.Command;\r
import com.google.gwt.user.client.DeferredCommand;\r
import com.google.gwt.user.client.ui.Button;\r
-import com.google.gwt.user.client.ui.ClickListener;\r
import com.google.gwt.user.client.ui.FlexTable;\r
import com.google.gwt.user.client.ui.HTML;\r
import com.google.gwt.user.client.ui.HasHorizontalAlignment;\r
import com.google.gwt.user.client.ui.HorizontalPanel;\r
import com.google.gwt.user.client.ui.VerticalPanel;\r
-import com.google.gwt.user.client.ui.Widget;\r
\r
/**\r
* The 'File upload' dialog box implementation with Google Gears support.\r
HorizontalPanel buttons = new HorizontalPanel();\r
\r
submit = new Button("Upload");\r
- submit.addClickListener(new ClickListener() {\r
-\r
- public void onClick(Widget sender) {\r
+ submit.addClickHandler(new ClickHandler() {\r
+ @Override\r
+ public void onClick(ClickEvent event) {\r
prepareAndSubmit();\r
}\r
});\r
buttons.setCellHorizontalAlignment(submit, HasHorizontalAlignment.ALIGN_CENTER);\r
// Create the 'Cancel' button, along with a listener that hides the\r
// dialog when the button is clicked.\r
- Button cancel = new Button("Cancel", new ClickListener() {\r
-\r
- public void onClick(Widget sender) {\r
+ Button cancel = new Button("Cancel", new ClickHandler() {\r
+ @Override\r
+ public void onClick(ClickEvent event) {\r
cancelUpload();\r
}\r
});\r
buttons.setSpacing(8);\r
buttons.addStyleName("gss-DialogBox");\r
\r
- browse.addClickListener(new ClickListener() {\r
- public void onClick(Widget sender) {\r
+ browse.addClickHandler(new ClickHandler() {\r
+ @Override\r
+ public void onClick(ClickEvent event) {\r
Desktop desktop = factory.createDesktop();\r
desktop.openFiles(new OpenFilesHandler() {\r
\r