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:n3phele.client.presenter.RepoActivity.java

License:Open Source License

@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    this.eventBus = eventBus;

    display.setPresenter(this);
    panel.setWidget(display);//  w  w  w  .  j a  v  a  2 s .  c  om
    if (repositoryUri == null || repositoryUri.length() == 0 || repositoryUri.equals("null")) {
        this.repo = JavaScriptObject.createObject().<Repository>cast();
        display.setData(this.repo);
    } else {
        display.setData(this.repo);
        getRepo();
    }

}

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

License:Open Source License

@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
    this.eventBus = eventBus;

    display.setPresenter(this);
    panel.setWidget(display);/* w  w w . j a va 2s.c om*/
    this.eventBus = eventBus;
    handlerRegistration(eventBus);
    if (repositoryUri == null || repositoryUri.length() == 0 || repositoryUri.equals("null")) {
        this.repo = JavaScriptObject.createObject().<Repository>cast();
        display.setData(this.repo);
    } else {
        display.setData(this.repo);
        getRepo(this.repositoryUri);
        fetchFiles(repositoryUri, this.prefix);
        CacheManager.EventConstructor change = new CacheManager.EventConstructor() {
            @Override
            public RepoUpdate newInstance(String key) {
                return new RepoUpdate();
            }
        };
        cacheManager.register(repositoryUri, "repoContent", change);
    }
}

From source file:net.randomhacks.wave.gadgets.client.StateImpl.java

License:Apache License

public void submitDelta(Map<String, String> delta) {
    JavaScriptObject jsDelta = JavaScriptObject.createObject();
    for (Map.Entry<String, String> entry : delta.entrySet())
        putKeyValue(jsDelta, entry.getKey(), entry.getValue());
    getJsState().submitDelta(jsDelta);/*from  www  .  jav  a  2 s .  c om*/
}

From source file:nl.strohalm.cyclos.mobile.client.model.PaymentPreview.java

License:Open Source License

private final JsArray<Fee> ensureFees() {
    JsArrayString keys = getFeeKeys();/*from w  w  w  .j  a  va  2s . c  o m*/
    List<Fee> fees = new ArrayList<Fee>();
    if (keys != null && keys.length() > 0) {
        for (int i = 0; i < keys.length(); i++) {
            String key = keys.get(i);
            Fee fee = (Fee) JavaScriptObject.createObject().cast();
            fee.setName(key);
            fee.setFormattedAmount(AmountHelper.getFormattedAmount(getFeeAmount(key), getUnitsPattern()));
            fees.add(fee);
        }
    }
    return JsonHelper.createGenericArray(fees);
}

From source file:nz.co.doltech.gwtls.client.options.Breakpoint.java

License:Apache License

public static Breakpoint create(int startPoint) {
    Breakpoint breakpoint = JavaScriptObject.createObject().cast();
    breakpoint.setBreakpoint(startPoint);
    breakpoint.setSettings(Setting.create());
    return breakpoint;
}

From source file:nz.co.doltech.gwtls.client.options.Setting.java

License:Apache License

public static Setting create() {
    return JavaScriptObject.createObject().cast();
}

From source file:org.atmosphere.gwt20.client.AtmosphereRequestConfig.java

License:Apache License

private static AtmosphereRequestConfig createImpl() {
    return (AtmosphereRequestConfig) JavaScriptObject.createObject();
}

From source file:org.codehaus.enunciate.samples.petclinic.app.client.PetClinicApp.java

License:Apache License

public void onModuleLoad() {
    // Load all the components.
    loadComponents();/*from ww w.j a v a  2  s  .  c  om*/

    panel.add(list);
    panel.add(description);
    panel.setWidth("100%");

    description.setStyleName("clinic-Info");

    History.addHistoryListener(this);
    RootPanel.get().add(panel);

    // Show the initial screen.
    String initToken = History.getToken();
    if (initToken.length() > 0) {
        onHistoryChanged(initToken);
    } else {
        showInfo();
    }

    org.codehaus.enunciate.samples.petclinic.client.json.schema.Vet vet = (org.codehaus.enunciate.samples.petclinic.client.json.schema.Vet) JavaScriptObject
            .createObject();
}

From source file:org.cruxframework.crux.core.client.db.indexeddb.IDBIndexParameters.java

License:Apache License

public final static IDBIndexParameters create() {
    IDBIndexParameters res = JavaScriptObject.createObject().cast();
    res.setUnique(false);// w w  w. j  ava 2 s. c om
    res.setMultiEntry(false);
    return res;
}

From source file:org.cruxframework.crux.core.client.db.indexeddb.IDBIndexParameters.java

License:Apache License

public final static IDBIndexParameters create(boolean unique, boolean multiEntry) {
    IDBIndexParameters res = JavaScriptObject.createObject().cast();
    res.setUnique(unique);/*from   w w w . j  a  va 2s. co  m*/
    res.setMultiEntry(multiEntry);
    return res;
}