litesoft
Diff Revisions
658
vs
659
for /trunk/GWT_Sandbox/gwtUITrimmed/src/com/gwtmobile/ui/kitchensink/client/phonegap/CameraUi.java
|
@@ -26,29 +26,27 @@ |
26 |
26 |
|
|
27 |
27 |
|
public class CameraUi extends Page |
28 |
28 |
|
{ |
|
29 |
+ |
@UiField HTML text; |
29 |
30 |
|
|
30 |
|
- |
@UiField HTML text; |
31 |
|
- |
private static CameraUiUiBinder uiBinder = GWT.create( CameraUiUiBinder.class ); |
32 |
|
- |
|
33 |
|
- |
interface CameraUiUiBinder extends UiBinder<Widget, CameraUi> |
|
31 |
+ |
private static CameraUiUiBinder uiBinder = GWT.create( CameraUiUiBinder.class ); |
|
32 |
+ |
|
|
33 |
+ |
interface CameraUiUiBinder extends UiBinder<Widget, CameraUi> |
34 |
34 |
|
{ |
35 |
|
- |
} |
|
35 |
+ |
} |
36 |
36 |
|
|
37 |
|
- |
public CameraUi() { |
38 |
|
- |
initWidget(uiBinder.createAndBindUi(this)); |
39 |
|
- |
} |
40 |
|
- |
|
41 |
|
- |
@UiHandler("list") |
42 |
|
- |
void onListSelectionChanged(SelectionChangedEvent e) { |
43 |
|
- |
switch (e.getSelection()) { |
44 |
|
- |
case 0: |
45 |
|
- |
getPicture(); |
46 |
|
- |
break; |
47 |
|
- |
} |
|
37 |
+ |
public CameraUi() |
|
38 |
+ |
{ |
|
39 |
+ |
initWidget( uiBinder.createAndBindUi( this ) ); |
48 |
40 |
|
} |
49 |
41 |
|
|
50 |
|
- |
void getPicture() { |
51 |
|
- |
Camera.getPicture( new Callback() |
|
42 |
+ |
@UiHandler("list") void onListSelectionChanged( SelectionChangedEvent e ) |
|
43 |
+ |
{ |
|
44 |
+ |
getPicture(); |
|
45 |
+ |
} |
|
46 |
+ |
|
|
47 |
+ |
void getPicture() |
|
48 |
+ |
{ |
|
49 |
+ |
Camera.getPicture( new Callback() |
52 |
50 |
|
{ |
53 |
51 |
|
@Override |
54 |
52 |
|
public void onSuccess( String imageData ) |
|
@@ -62,6 +60,5 @@ |
62 |
60 |
|
text.setHTML( "Error: " + message ); |
63 |
61 |
|
} |
64 |
62 |
|
}, new Options().quality( 50 ).sourceType( SourceType.CAMERA ).destinationType( DestinationType.FILE_URI ).allowEdit( false ) ); |
65 |
|
- |
} |
66 |
|
- |
|
|
63 |
+ |
} |
67 |
64 |
|
} |