List of usage examples for com.google.gwt.core.client JavaScriptObject createObject
public static native JavaScriptObject createObject() ;
From source file:com.emitrom.ti4j.mobile.client.Titanium.java
License:Apache License
/** * Creates a new buffer with the specified size. * /*from w ww .jav a2 s . c om*/ * @param bufferSize * the size of the buffer * @return Buffer * @since 1.1.0 */ public static Buffer createBuffer(int bufferSize) { JavaScriptObject jso = JavaScriptObject.createObject(); JsoHelper.setAttribute(jso, "length", bufferSize); return Titanium.createBuffer(jso); }
From source file:com.emitrom.ti4j.mobile.client.Titanium.java
License:Apache License
/** * Creates a new buffer with the specified data in it. * /*from w ww.ja v a 2 s.com*/ * @param data * the data to reside in the buffer * @return Buffer * @since 1.1.0 */ public static Buffer createBuffer(String value) { JavaScriptObject jso = JavaScriptObject.createObject(); JsoHelper.setAttribute(jso, "value", value); return Titanium.createBuffer(jso); }
From source file:com.emitrom.touch4j.client.data.TreeModel.java
License:Open Source License
public TreeModel() { super(JavaScriptObject.createObject()); setLeaf(leaf); }
From source file:com.emitrom.touch4j.client.data.TreeStore.java
License:Open Source License
public TreeStore(TreeModel data) { super(JavaScriptObject.createObject()); assert data != null : "Model cannot be null"; this.treeModel = data; modelRegistry++;/*ww w .j a va2 s . c o m*/ modelName = model + modelRegistry; Ext.defineModel(modelName, data.getFields()); create(modelName, data.getJsObj()); }
From source file:com.emitrom.touch4j.client.ui.TabItem.java
License:Open Source License
public TabItem() { jsObj = JavaScriptObject.createObject(); id = Ext.generateId("ext-container-"); JsoHelper.setAttribute(jsObj, Attribute.ID.getValue(), id); initWidget(new Container()); setLayout(new FitLayout()); }
From source file:com.github.timeu.dygraphsgwt.client.options.Properties.java
License:Apache License
/** * Create an empty Properties object.//from w w w .j a v a 2 s . c om * @return An empty Properties object. */ public static Properties create() { return JavaScriptObject.createObject().cast(); }
From source file:com.goodow.realtime.json.js.JsJsonObject.java
License:Apache License
public static JsJsonObject create() { return JavaScriptObject.createObject().cast(); }
From source file:com.google.code.gwt.geolocation.client.PositionOptions.java
License:Apache License
/** * Creates a new, empty PositionOptions object to use in the * {@link Geolocation} functions./*from w w w . j a v a 2s . c o m*/ * * @return a new PositionOptions instance */ public static final PositionOptions create() { return JavaScriptObject.createObject().cast(); }
From source file:com.google.collide.json.client.Jso.java
License:Open Source License
public static Jso create() { return JavaScriptObject.createObject().cast(); }
From source file:com.google.gerrit.client.account.AccountApi.java
License:Apache License
/** Register a new email address */ public static void registerEmail(String account, String email, AsyncCallback<NativeString> cb) { JavaScriptObject in = JavaScriptObject.createObject(); new RestApi("/accounts/").id(account).view("emails").id(email).ifNoneMatch().put(in, cb); }