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:com.akjava.gwt.three.client.js.materials.MaterialParameter.java

License:Open Source License

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

From source file:com.appkit.collection.client.JsLightMap.java

License:Apache License

/**
 * Construct a {@link JsLightMap}
 */
public JsLightMap() {
    this(JavaScriptObject.createObject());
}

From source file:com.arcbees.snap.client.snap.Attributes.java

License:Apache License

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

From source file:com.dawg6.web.dhcalc.client.GearPanel.java

License:Open Source License

protected void renameItem() {
    final int i = savedItems.getSelectedIndex();

    if (i >= 0) {
        final String name = savedItems.getItemText(i);
        final String item = savedItems.getValue(i);

        final TextBox field = new TextBox();
        field.setText(name);/*from   w ww  .  jav a2s .c  o  m*/

        ApplicationPanel.showDialogBox("Rename Item", field, ApplicationPanel.OK | ApplicationPanel.CANCEL,
                new DialogBoxResultHandler() {

                    @Override
                    public void dialogBoxResult(int result) {

                        if (result == ApplicationPanel.OK) {
                            JsoArray<Entry> list = removeItem(getSavedItems(), name, item);
                            Entry e = (Entry) JavaScriptObject.createObject();
                            e.setName(field.getText());
                            e.setItem(item);
                            list.push(e);
                            saveItems(list);

                            savedItems.removeItem(i);
                            savedItems.insertItem(e.getName(), item, i);
                            savedItems.setSelectedIndex(i);
                        }

                    }
                });
    }

}

From source file:com.dawg6.web.dhcalc.client.GearPanel.java

License:Open Source License

private void saveItem(String name, ItemInformation item) {

    Storage storage = getStorage();//ww  w.j  a  v a  2  s .c om

    if (storage != null) {

        Entry entry = (Entry) JavaScriptObject.createObject();
        entry.setName(name);
        entry.setItem(item.tooltipParams);

        JsoArray<Entry> list = getSavedItems();

        list.push(entry);
        saveItems(list);

        savedItems.addItem(name, item.tooltipParams);
        int i = savedItems.getItemCount();
        savedItems.setSelectedIndex(i - 1);
    }

}

From source file:com.emitrom.flash4j.tween.client.config.ColorMatrixFilter.java

License:Apache License

public ColorMatrixFilter() {
    jsObj = JavaScriptObject.createObject();
}

From source file:com.emitrom.flash4j.tween.client.config.ColorTransform.java

License:Apache License

public ColorTransform() {
    jsObj = JavaScriptObject.createObject();
}

From source file:com.emitrom.flash4j.tween.client.config.Filter.java

License:Apache License

public Filter() {
    jsObj = JavaScriptObject.createObject();
}

From source file:com.emitrom.flash4j.tween.client.config.TweenMaxConfig.java

License:Apache License

public TweenMaxConfig() {
    jsObj = JavaScriptObject.createObject();
}

From source file:com.emitrom.ti4j.mobile.client.network.socket.Socket.java

License:Apache License

/**
 * Returns a new TCP socket, connecting to the given host and port.
 * //from w w  w .j  a v  a 2  s  .  c o m
 * @param host
 * @param port
 * @return TCP
 * @since 1.1.0
 */
public TCP createTCP(String host, int port) {
    JavaScriptObject jso = JavaScriptObject.createObject();
    JsoHelper.setAttribute(jso, "host", host);
    JsoHelper.setAttribute(jso, "port", port);
    return createTCP(jso);
}