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

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

Introduction

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

Prototype

public static native JavaScriptObject createObject() ;

Source Link

Document

Returns a new object.

Usage

From source file:gwtupload.client.Uploader.java

License:Apache License

private JavaScriptObject getDataInfo(UploadedInfo info) {
    return info == null ? JavaScriptObject.createObject()
            : getDataImpl(info.fileUrl, info.field, info.name, Utils.basename(info.name), serverRawResponse,
                    info.message, getStatus().toString(), info.size);
}

From source file:io.reinert.requestor.examples.showcase.activity.InterceptorsActivity.java

License:Apache License

private JavaScriptObject getMessageJson(String message) {
    JavaScriptObject json = JavaScriptObject.createObject();
    Overlays.setString(json, "message", message);
    return json;/*  w w  w .j  ava  2s.c om*/
}

From source file:io.reinert.requestor.serialization.json.JsonRecordWriter.java

License:Apache License

static JsonRecordWriter create() {
    return (JsonRecordWriter) JavaScriptObject.createObject();
}

From source file:jake2.gwt.client.WebGLAdapter.java

License:Open Source License

public WebGLAdapter(CanvasElement canvas) {
    super(canvas.getWidth(), canvas.getHeight());

    this.canvas = canvas;
    gl = WebGL.getContext(canvas, JavaScriptObject.createObject());

    if (gl == null) {
        throw new UnsupportedOperationException("WebGL N/A");
    }/*from   w  w w. j  a  va  2 s .co  m*/

    initShader();
    checkError("initShader");

    elementBuffer = gl.glCreateBuffer();
    checkError("createBuffer f. elements");

    for (int i = 0; i < bufferData.length; i++) {
        BufferData bd = new BufferData();
        bd.buffer = gl.glCreateBuffer();
        checkError("createBuffer" + i);
        bufferData[i] = bd;
    }

}

From source file:java.lang.Enum.java

License:Apache License

protected static <T extends Enum<T>> JavaScriptObject createValueOfMap(T[] enumConstants) {
    JavaScriptObject result = JavaScriptObject.createObject();
    for (T value : enumConstants) {
        put0(result, ":" + value.name(), value);
    }//from w w  w. j  ava  2 s.co  m
    return result;
}

From source file:java.util.AbstractHashMap.java

License:Apache License

private void clearImpl() {
    hashCodeMap = JavaScriptObject.createArray();
    stringMap = JavaScriptObject.createObject();
    nullSlotLive = false;
    nullSlot = null;
    size = 0;
}

From source file:kellegous.client.data.MapFromString.java

License:Apache License

public static <T> MapFromString<T> create() {
    return JavaScriptObject.createObject().cast();
}

From source file:n3phele.client.model.FileNode.java

License:Open Source License

public static FileNode newInstance(String name, String path, String mime, String repository,
        String repositoryName) {//from   w  w  w . j a  v a  2  s  .  com
    FileNode result = (FileNode) JavaScriptObject.createObject();
    result._init(name, path, mime, repository, repositoryName);
    return result;
}

From source file:n3phele.client.presenter.AccountActivity.java

License:Open Source License

@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    display.setPresenter(this);
    panel.setWidget(display);/*from ww  w. j a  va 2 s.  co m*/
    getClouds();

    if (accountUri == null || accountUri.length() == 0 || accountUri.equals("null")) {
        this.account = JavaScriptObject.createObject().<Account>cast();
        display.setData(this.account);
    } else {
        this.account = null;
        display.setData(this.account);
        getAccount();
    }

}

From source file:n3phele.client.presenter.CreateServiceActivity.java

License:Open Source License

@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    display.setPresenter(this);
    panel.setWidget(display);//from w w w  .  ja v a  2s.  co  m
    getClouds();
    getAccountList();
    //Window.alert("serviceAddress "+ cacheManager.ServiceAddress);
    if (accountUri == null || accountUri.length() == 0 || accountUri.equals("null")) {
        this.account = JavaScriptObject.createObject().<Account>cast();
        display.setData(this.account);
    } else {
        this.account = null;
        getAccount();
        display.setData(this.account);
    }

}