litesoft
Diff Revisions
947
vs
948
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/nonpublic/GwtClientDelayedTimedRunnableRunner.java
|
@@ -8,44 +8,37 @@ |
8 |
8 |
|
|
9 |
9 |
|
import com.google.gwt.user.client.*; |
10 |
10 |
|
|
11 |
|
- |
public class GwtClientDelayedTimedRunnableRunner extends AbstractDelayedTimedRunnableRunner |
12 |
|
- |
{ |
|
11 |
+ |
public class GwtClientDelayedTimedRunnableRunner extends AbstractDelayedTimedRunnableRunner { |
13 |
12 |
|
private final MyTimer mTimer; |
14 |
13 |
|
|
15 |
|
- |
public GwtClientDelayedTimedRunnableRunner(MillisecTimeSource pMillisecTimeSource) |
16 |
|
- |
{ |
|
14 |
+ |
public GwtClientDelayedTimedRunnableRunner( MillisecTimeSource pMillisecTimeSource ) { |
17 |
15 |
|
super( pMillisecTimeSource, AlertUnexpectedExceptionHandler.INSTANCE ); |
18 |
16 |
|
mTimer = new MyTimer(); |
19 |
17 |
|
} |
20 |
18 |
|
|
21 |
|
- |
public GwtClientDelayedTimedRunnableRunner() |
22 |
|
- |
{ |
23 |
|
- |
this(null); |
|
19 |
+ |
public GwtClientDelayedTimedRunnableRunner() { |
|
20 |
+ |
this( null ); |
24 |
21 |
|
} |
25 |
22 |
|
|
26 |
23 |
|
@Override |
27 |
|
- |
protected void LLscheduleFor( long pWhenTimeInMilliSecs, long pNowInMilliSecs ) |
28 |
|
- |
{ |
|
24 |
+ |
protected void LLscheduleFor( long pWhenTimeInMilliSecs, long pNowInMilliSecs ) { |
29 |
25 |
|
int zMsDelay = (int) (pWhenTimeInMilliSecs - pNowInMilliSecs); |
30 |
|
- |
if ( zMsDelay <= 0 ) |
31 |
|
- |
{ |
32 |
|
- |
throw new IllegalArgumentException( "Delay is not greater than 0 (" + zMsDelay + "=" + pWhenTimeInMilliSecs + "-" + pNowInMilliSecs + ") with: " + Objects |
33 |
|
- |
.justClassNameOf( mTimedRunnable ) ); |
|
26 |
+ |
if ( zMsDelay <= 0 ) { |
|
27 |
+ |
throw new IllegalArgumentException( |
|
28 |
+ |
"Delay is not greater than 0 (" + zMsDelay + "=" + pWhenTimeInMilliSecs + "-" + pNowInMilliSecs + ") with: " + Objects |
|
29 |
+ |
.justClassNameOf( mTimedRunnable ) ); |
34 |
30 |
|
} |
35 |
31 |
|
mTimer.schedule( zMsDelay ); |
36 |
32 |
|
} |
37 |
33 |
|
|
38 |
34 |
|
@Override |
39 |
|
- |
protected void LLcancel() |
40 |
|
- |
{ |
|
35 |
+ |
protected void LLcancel() { |
41 |
36 |
|
mTimer.cancel(); |
42 |
37 |
|
} |
43 |
38 |
|
|
44 |
|
- |
private class MyTimer extends Timer |
45 |
|
- |
{ |
|
39 |
+ |
private class MyTimer extends Timer { |
46 |
40 |
|
@Override |
47 |
|
- |
public void run() |
48 |
|
- |
{ |
|
41 |
+ |
public void run() { |
49 |
42 |
|
LLrun(); |
50 |
43 |
|
} |
51 |
44 |
|
} |