Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package org.litesoft.GWT.client.widgets;

import com.google.gwt.user.client.*;
import com.google.gwt.user.client.ui.*;

public class LowLevelLogger {
    public static void println( String text ) {
        print( text );
        if ( !appendToLog( DOM.createElement( "BR" ) ) ) {
            System.out.println();
        }
    }

    public static void print( String text ) {
        Element span = DOM.createSpan();
        span.setInnerText( text );
        if ( !appendToLog( span ) ) {
            System.out.print( text );
        }
    }

    private static boolean appendToLog( Element element ) {
        RootPanel panel = RootPanel.get( "logPanel" );
        if ( panel == null ) {
            return false;
        }
        panel.getElement().appendChild( element );
        return true;
    }
}

Commits for litesoft/trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/LowLevelLogger.java

Diff revisions: vs.
Revision Author Commited Message
948 Diff Diff GeorgeS picture GeorgeS Sat 07 Jun, 2014 23:42:39 +0000

Jusefuls Formatter Updated to New Code Format

720 Diff Diff GeorgeS picture GeorgeS Sun 10 Jun, 2012 16:20:42 +0000
608 GeorgeS picture GeorgeS Sat 10 Mar, 2012 18:32:36 +0000

Saving