01 /**
02 * Copyright (C) 2006 Carrier Access, Corp.
03 */
04 package biz.xsoftware.mock.client.example1;
05
06 import com.google.gwt.user.client.ui.Button;
07 import com.google.gwt.user.client.ui.ClickListener;
08 import com.google.gwt.user.client.ui.Widget;
09
10 /**
11 */
12 public class MyApplication
13 {
14
15 private boolean wasClicked = false;
16
17 public MyApplication(ListenerManager mgr) {
18 Button button = new Button("Gwt-Button");
19 mgr.addClickListener(button, new MyClickListener());
20 }
21
22 private class MyClickListener implements ClickListener {
23
24 /**
25 * @see com.google.gwt.user.client.ui.ClickListener#onClick(com.google.gwt.user.client.ui.Widget)
26 */
27 public void onClick(Widget sender)
28 {
29 wasClicked = true;
30 }
31 }
32
33 public boolean getWasClicked() {
34 return wasClicked;
35 }
36 }
|