List of usage examples for com.google.gwt.core.client JsArray push
public final native void push(T value) ;
From source file:app.service.JSInvoker.java
License:GNU General Public License
private static JsArray<JavaScriptObject> _wrap(Object[] o) { JsArray<JavaScriptObject> a = JavaScriptObject.createArray().cast(); for (Object i : o) a.push(wrap(i)); return a;//w w w.j av a 2 s.co m }
From source file:cc.alcina.framework.gwt.client.util.ClientUtils.java
License:Apache License
public static <T extends JavaScriptObject> JsArray<T> toTypedJsArray(List<T> value) { JsArray<T> array = JavaScriptObject.createArray().cast(); for (T t : value) { array.push(t); }//w w w. ja va2s . co m return array; }
From source file:cn.mapway.document.ui.client.component.ace.AceCompletionCallbackImpl.java
License:Open Source License
@Override public void invokeWithCompletions(AceCompletion[] proposals) { JsArray<JavaScriptObject> jsProposals = JavaScriptObject.createArray().cast(); for (AceCompletion proposal : proposals) { jsProposals.push(proposal.toJsObject()); }// www . j a v a 2 s .co m doInvokeWithCompletions(jsProposals); }
From source file:com.ait.ext4j.client.core.Component.java
License:Apache License
/** * An array of plugin to be added to this component. *//*ww w .j a va 2s . co m*/ public void setPlugins(List<AbstractPlugin> values) { JsArray<JavaScriptObject> jsos = JsArray.createArray().cast(); for (AbstractPlugin p : values) { jsos.push(p.getJsObj()); } setAttribute("plugins", jsos, true); }
From source file:com.ait.ext4j.client.core.Ext.java
License:Apache License
public static void defineModel(String name, Set<String> fields) { JsArray<ModelFieldDefinition> fieldsDefinition = JsArray.createArray().cast(); for (String s : fields) { fieldsDefinition.push(ModelFieldDefinition.create(s)); }// w w w.ja v a 2 s. c o m createModel(name, fieldsDefinition); }
From source file:com.ait.ext4j.client.data.BaseModel.java
License:Apache License
public void set(String property, List<BaseModel> values) { map.put(property, values);//from w w w. jav a 2 s . co m JsArray<JavaScriptObject> rawValues = JsArray.createArray().cast(); for (BaseModel model : values) { rawValues.push(model.getJsObj()); } _setNative(property, rawValues); }
From source file:com.ait.ext4j.client.data.BaseModel.java
License:Apache License
public static JsArray<JavaScriptObject> fromList(List<BaseModel> models) { JsArray<JavaScriptObject> values = JsArray.createArray().cast(); for (BaseModel model : models) { values.push(model.getJsObj()); }/*from www . j a v a 2 s . co m*/ return values; }
From source file:com.ait.ext4j.client.data.NodeInterface.java
License:Apache License
static JsArray<JavaScriptObject> fromListOfNode(List<NodeInterface> models) { JsArray<JavaScriptObject> values = JsArray.createArray().cast(); for (NodeInterface model : models) { values.push(model.getJsObj()); }/*from ww w. j ava 2s.c om*/ return values; }
From source file:com.ait.ext4j.client.data.TableItem.java
License:Apache License
public void setChild(TableItem children) { this.setLeaf(false); JsArray<JavaScriptObject> array = JsArray.createArray().cast(); array.push(children.getJsObj()); JsoHelper.setAttribute(jsObj, "children", array); }
From source file:com.ait.ext4j.client.data.TableItem.java
License:Apache License
public void setChildren(List<? extends TableItem> children) { this.setLeaf(false); JsArray<JavaScriptObject> array = JsArray.createArray().cast(); for (TableItem model : children) { array.push(model.getJsObj()); JsoHelper.setAttribute(jsObj, "children", array); }// ww w . jav a 2s.c o m }