|
@@ -16,53 +16,52 @@ |
16 |
16 |
|
|
17 |
17 |
|
package com.gwtmobile.ui.kitchensink.client.widget; |
18 |
18 |
|
|
19 |
|
- |
import com.google.gwt.core.client.GWT; |
20 |
|
- |
import com.google.gwt.event.dom.client.ClickEvent; |
21 |
|
- |
import com.google.gwt.uibinder.client.UiBinder; |
22 |
|
- |
import com.google.gwt.uibinder.client.UiHandler; |
23 |
|
- |
import com.google.gwt.user.client.Window; |
24 |
|
- |
import com.google.gwt.user.client.ui.Widget; |
25 |
|
- |
import com.gwtmobile.ui.client.page.Page; |
26 |
|
- |
|
27 |
|
- |
public class ButtonPage extends Page{ |
28 |
|
- |
|
29 |
|
- |
private static ButtonPageUiBinder uiBinder = GWT |
30 |
|
- |
.create(ButtonPageUiBinder.class); |
31 |
|
- |
|
32 |
|
- |
interface ButtonPageUiBinder extends UiBinder<Widget, ButtonPage> { |
33 |
|
- |
} |
34 |
|
- |
|
35 |
|
- |
public ButtonPage() { |
36 |
|
- |
initWidget(uiBinder.createAndBindUi(this)); |
37 |
|
- |
} |
38 |
|
- |
|
39 |
|
- |
@UiHandler("ok1") |
40 |
|
- |
public void onClickOk1(ClickEvent e) { |
41 |
|
- |
Window.alert("You clicked OK1"); |
42 |
|
- |
} |
43 |
|
- |
|
44 |
|
- |
@UiHandler("ok2") |
45 |
|
- |
public void onClickOk2(ClickEvent e) { |
46 |
|
- |
Window.alert("You clicked OK2"); |
47 |
|
- |
} |
48 |
|
- |
|
49 |
|
- |
@UiHandler("cancel2") |
50 |
|
- |
public void onClickCancel2(ClickEvent e) { |
51 |
|
- |
Window.alert("You clicked Cancel2"); |
52 |
|
- |
} |
53 |
|
- |
|
54 |
|
- |
@UiHandler("yes3") |
55 |
|
- |
public void onClickYes3(ClickEvent e) { |
56 |
|
- |
Window.alert("You clicked Yes3"); |
57 |
|
- |
} |
58 |
|
- |
|
59 |
|
- |
@UiHandler("no3") |
60 |
|
- |
public void onClickNo3(ClickEvent e) { |
61 |
|
- |
Window.alert("You clicked No3"); |
62 |
|
- |
} |
63 |
|
- |
|
64 |
|
- |
@UiHandler("cancel3") |
65 |
|
- |
public void onClickCancel(ClickEvent e) { |
66 |
|
- |
Window.alert("You clicked Cancel3"); |
67 |
|
- |
} |
|
19 |
+ |
import com.google.gwt.core.client.*; |
|
20 |
+ |
import com.google.gwt.event.dom.client.*; |
|
21 |
+ |
import com.google.gwt.uibinder.client.*; |
|
22 |
+ |
import com.google.gwt.user.client.*; |
|
23 |
+ |
import com.google.gwt.user.client.ui.*; |
|
24 |
+ |
import com.gwtmobile.ui.client.page.*; |
|
25 |
+ |
|
|
26 |
+ |
public class ButtonPage extends Page { |
|
27 |
+ |
|
|
28 |
+ |
private static ButtonPageUiBinder uiBinder = GWT |
|
29 |
+ |
.create( ButtonPageUiBinder.class ); |
|
30 |
+ |
|
|
31 |
+ |
interface ButtonPageUiBinder extends UiBinder<Widget, ButtonPage> { |
|
32 |
+ |
} |
|
33 |
+ |
|
|
34 |
+ |
public ButtonPage() { |
|
35 |
+ |
initWidget( uiBinder.createAndBindUi( this ) ); |
|
36 |
+ |
} |
|
37 |
+ |
|
|
38 |
+ |
@UiHandler("ok1") |
|
39 |
+ |
public void onClickOk1( ClickEvent e ) { |
|
40 |
+ |
Window.alert( "You clicked OK1" ); |
|
41 |
+ |
} |
|
42 |
+ |
|
|
43 |
+ |
@UiHandler("ok2") |
|
44 |
+ |
public void onClickOk2( ClickEvent e ) { |
|
45 |
+ |
Window.alert( "You clicked OK2" ); |
|
46 |
+ |
} |
|
47 |
+ |
|
|
48 |
+ |
@UiHandler("cancel2") |
|
49 |
+ |
public void onClickCancel2( ClickEvent e ) { |
|
50 |
+ |
Window.alert( "You clicked Cancel2" ); |
|
51 |
+ |
} |
|
52 |
+ |
|
|
53 |
+ |
@UiHandler("yes3") |
|
54 |
+ |
public void onClickYes3( ClickEvent e ) { |
|
55 |
+ |
Window.alert( "You clicked Yes3" ); |
|
56 |
+ |
} |
|
57 |
+ |
|
|
58 |
+ |
@UiHandler("no3") |
|
59 |
+ |
public void onClickNo3( ClickEvent e ) { |
|
60 |
+ |
Window.alert( "You clicked No3" ); |
|
61 |
+ |
} |
|
62 |
+ |
|
|
63 |
+ |
@UiHandler("cancel3") |
|
64 |
+ |
public void onClickCancel( ClickEvent e ) { |
|
65 |
+ |
Window.alert( "You clicked Cancel3" ); |
|
66 |
+ |
} |
68 |
67 |
|
} |