litesoft
Diff Revisions
608
vs
720
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/LowLevelLogger.java
|
@@ -1,37 +1,37 @@ |
1 |
1 |
|
package org.litesoft.GWT.client.widgets; |
2 |
2 |
|
|
3 |
|
- |
import com.google.gwt.user.client.DOM; |
4 |
|
- |
import com.google.gwt.user.client.Element; |
5 |
|
- |
import com.google.gwt.user.client.ui.RootPanel; |
|
3 |
+ |
import com.google.gwt.user.client.*; |
|
4 |
+ |
import com.google.gwt.user.client.ui.*; |
6 |
5 |
|
|
7 |
6 |
|
public class LowLevelLogger |
8 |
7 |
|
{ |
9 |
|
- |
public static void println(String text) |
|
8 |
+ |
public static void println( String text ) |
10 |
9 |
|
{ |
11 |
|
- |
print(text); |
12 |
|
- |
if ( !appendToLog(DOM.createElement("BR")) ) |
|
10 |
+ |
print( text ); |
|
11 |
+ |
if ( !appendToLog( DOM.createElement( "BR" ) ) ) |
13 |
12 |
|
{ |
14 |
13 |
|
System.out.println(); |
15 |
14 |
|
} |
16 |
15 |
|
} |
17 |
16 |
|
|
18 |
|
- |
public static void print(String text) |
|
17 |
+ |
public static void print( String text ) |
19 |
18 |
|
{ |
20 |
19 |
|
Element span = DOM.createSpan(); |
21 |
|
- |
span.setInnerText(text); |
22 |
|
- |
if ( !appendToLog(span) ) |
|
20 |
+ |
span.setInnerText( text ); |
|
21 |
+ |
if ( !appendToLog( span ) ) |
23 |
22 |
|
{ |
24 |
|
- |
System.out.print(text); |
|
23 |
+ |
System.out.print( text ); |
25 |
24 |
|
} |
26 |
25 |
|
} |
27 |
26 |
|
|
28 |
|
- |
private static boolean appendToLog(Element element) { |
29 |
|
- |
RootPanel panel = RootPanel.get("logPanel"); |
30 |
|
- |
if (panel == null) |
|
27 |
+ |
private static boolean appendToLog( Element element ) |
|
28 |
+ |
{ |
|
29 |
+ |
RootPanel panel = RootPanel.get( "logPanel" ); |
|
30 |
+ |
if ( panel == null ) |
31 |
31 |
|
{ |
32 |
32 |
|
return false; |
33 |
33 |
|
} |
34 |
|
- |
panel.getElement().appendChild(element); |
|
34 |
+ |
panel.getElement().appendChild( element ); |
35 |
35 |
|
return true; |
36 |
36 |
|
} |
37 |
37 |
|
} |