Example usage for com.google.gwt.core.client JavaScriptObject toString

List of usage examples for com.google.gwt.core.client JavaScriptObject toString

Introduction

In this page you can find the example usage for com.google.gwt.core.client JavaScriptObject toString.

Prototype

@Override
public final String toString() 

Source Link

Document

Makes a best-effort attempt to get a useful debugging string describing the given JavaScriptObject.

Usage

From source file:org.vaadin.chronographer.gwt.client.netthreads.BandOptions.java

License:Apache License

/**
 * optional, set hot zones/*from www .j  ava2 s . c  o m*/
 */
public final void setZones(List zones) {
    JavaScriptObject[] zonesArr = JavaScriptObjectHelper.listToArray(zones);

    JavaScriptObject jarr = JavaScriptObjectHelper.arrayConvert(zonesArr);

    GWT.log(jarr.toString());

    JavaScriptObjectHelper.setAttribute(this, "zones", jarr);
}

From source file:org.waveprotocol.wave.client.gadget.renderer.GadgetWidget.java

License:Apache License

@Override
public void waveGadgetStateUpdate(final JavaScriptObject delta) {
    // Return if in playback mode. isEditable indicates playback.
    if (!canModifyDocument()) {
        return;// ww  w  .  j a  v  a 2s. c  o m
    }

    final StateMap deltaState = StateMap.create();
    deltaState.fromJsonObject(delta);
    // Defer state modifications to avoid RPC failure in Safari 3. The
    // intermittent failure is caused by RPC called from received RPC
    // callback.
    // TODO(user): Remove this workaround once this is fixed in GGS.
    ScheduleCommand.addCommand(new Task() {
        @Override
        public void execute() {
            deltaState.each(new Each() {
                @Override
                public void apply(final String key, final String value) {
                    if (value != null) {
                        modifyState(key, value);
                    } else {
                        deleteState(key);
                    }
                }
            });
            log("Applied delta ", delta.toString(), " new state ", state.toJson());
            gadgetStateSubmitter.triggerScheduledSubmit();
            blipSubmitter.submitImmediately();
        }
    });
}

From source file:ur.tools.cron.client.impl.Parser.java

License:LGPL

private static boolean matches(final String string, final String regexp) {

    final JavaScriptObject match = Parser.match(string, regexp);
    return match != null && match.toString().split(",").length > 0;
}