litesoft
Diff Revisions
691
vs
692
for /trunk/GWT_Sandbox/SampleHello/src/org/litesoft/hello/client/Hello.java
|
@@ -1,12 +1,12 @@ |
1 |
1 |
|
/* |
2 |
2 |
|
* Copyright 2007 Google Inc. |
3 |
|
- |
* |
|
3 |
+ |
* |
4 |
4 |
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not |
5 |
5 |
|
* use this file except in compliance with the License. You may obtain a copy of |
6 |
6 |
|
* the License at |
7 |
|
- |
* |
|
7 |
+ |
* |
8 |
8 |
|
* http://www.apache.org/licenses/LICENSE-2.0 |
9 |
|
- |
* |
|
9 |
+ |
* |
10 |
10 |
|
* Unless required by applicable law or agreed to in writing, software |
11 |
11 |
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
12 |
12 |
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
|
@@ -26,6 +26,7 @@ |
26 |
26 |
|
*/ |
27 |
27 |
|
public class Hello implements EntryPoint |
28 |
28 |
|
{ |
|
29 |
+ |
public static final String VERSION = "1.3"; |
29 |
30 |
|
private Label mLabel; |
30 |
31 |
|
private int mDecaSecs = 1; |
31 |
32 |
|
|
|
@@ -74,24 +75,27 @@ |
74 |
75 |
|
@Override |
75 |
76 |
|
public void onPhoneGapTimeout( PhoneGapTimeoutEvent event ) |
76 |
77 |
|
{ |
77 |
|
- |
Window.alert( "can not load phonegap" ); |
|
78 |
+ |
Window.alert( "can not load Phonegap\nvs " + VERSION ); |
78 |
79 |
|
} |
79 |
80 |
|
} ); |
80 |
81 |
|
|
81 |
82 |
|
new Timer() |
82 |
83 |
|
{ |
83 |
84 |
|
long started = System.currentTimeMillis(); |
|
85 |
+ |
|
84 |
86 |
|
@Override |
85 |
87 |
|
public void run() |
86 |
88 |
|
{ |
87 |
89 |
|
int delay; |
88 |
|
- |
do { |
|
90 |
+ |
do |
|
91 |
+ |
{ |
89 |
92 |
|
String zText = " " + (mDecaSecs++); |
90 |
93 |
|
zText = zText.substring( zText.length() - 10 ); |
91 |
|
- |
zText = zText.substring( 0, 9 ) + '.' + zText.substring( 9 ) + " tenths of a second"; |
|
94 |
+ |
zText = zText.substring( 0, 9 ) + '.' + zText.substring( 9 ) + " tenths of a second vs " + VERSION; |
92 |
95 |
|
mLabel.setText( zText ); |
93 |
|
- |
delay = (int)((started + (mDecaSecs * 100)) - System.currentTimeMillis()); |
94 |
|
- |
} while (delay < 10); |
|
96 |
+ |
delay = (int) ((started + (mDecaSecs * 100)) - System.currentTimeMillis()); |
|
97 |
+ |
} |
|
98 |
+ |
while ( delay < 10 ); |
95 |
99 |
|
schedule( delay ); |
96 |
100 |
|
} |
97 |
101 |
|
}.schedule( 100 ); |
|
@@ -101,6 +105,7 @@ |
101 |
105 |
|
|
102 |
106 |
|
private void startShowCase( PhoneGap phoneGap ) |
103 |
107 |
|
{ |
104 |
|
- |
Window.alert( "phonegap ready!" ); |
|
108 |
+ |
Window.alert( "Phonegap ready!\n" + |
|
109 |
+ |
"vs " + VERSION ); |
105 |
110 |
|
} |
106 |
111 |
|
} |