List of usage examples for com.google.gwt.core.client JsArrayString push
public final native void push(String value) ;
From source file:com.emitrom.ti4j.mobile.client.media.MediaOptionsType.java
License:Apache License
public void setMediaTypes(String... values) { JsArrayString peers = JsArrayString.createArray().cast(); for (String s : values) { peers.push(s); }// www . j a v a 2 s.c om setMediaTypes(peers); }
From source file:com.emitrom.ti4j.mobile.client.ui.AlertDialog.java
License:Apache License
public AlertDialog(String... buttonNames) { JsArrayString names = JsArrayString.createArray().cast(); for (String name : buttonNames) { names.push(name); }/* www.ja v a 2 s .c o m*/ jsObj = UI.createAlertDialog(names); }
From source file:com.emitrom.ti4j.mobile.client.ui.ButtonBar.java
License:Apache License
public void setLabels(String... values) { JsArrayString peers = JsArrayString.createArray().cast(); for (String s : values) { peers.push(s); }// w w w.j ava 2 s .co m setLabels(peers); }
From source file:com.emitrom.ti4j.mobile.client.ui.EmailDialog.java
License:Apache License
public void setToRecipients(String... values) { JsArrayString peers = JsArray.createArray().cast(); for (String s : values) { peers.push(s); }//from w ww. ja v a2 s . co m setToRecipients(peers); }
From source file:com.emitrom.ti4j.mobile.client.ui.OptionDialog.java
License:Apache License
public void setOptions(String... values) { JsArrayString strings = JsArrayString.createArray().cast(); for (String s : values) { strings.push(s); }/*from w w w .j av a2s . com*/ setOptions(strings); }
From source file:com.emitrom.touch4j.charts.client.series.PieSeries.java
License:Open Source License
/** * An array of color values which will be used, in order, as the pie slice * fill colors./*w w w. j a v a 2 s .c om*/ * * @param colors */ public void setColorSet(Color[] colors) { JsArrayString strings = JsArrayString.createArray().cast(); for (Color color : colors) { strings.push(color.getValue()); } setColorSet(strings); }
From source file:com.floatzcss.gwt.client.jsni.JSNIUtils.java
License:Apache License
/** * Convert collection of strings into Javascript array. * /* w w w .j a v a2 s . c o m*/ * @param collection Collection of strings * @return Javascript array */ public static JsArrayString convert(List<String> collection) { JsArrayString jsArray = (JsArrayString) JsArrayString.createArray(); for (String item : collection) { jsArray.push(item); } return jsArray; }
From source file:com.floatzcss.gwt.client.jsni.JSNIUtils.java
License:Apache License
/** * Convert string vararg into Javascript array. * // w w w. ja va2 s.c o m * @param strings String... vararg * @return Javascript array */ public static JsArrayString convert(String... strings) { JsArrayString jsArray = (JsArrayString) JsArrayString.createArray(); for (String item : strings) { jsArray.push(item); } return jsArray; }
From source file:com.github.nmorel.gwtjackson.client.deser.array.cast.StringArrayJsonDeserializer.java
License:Apache License
@Override public String[] doDeserializeArray(JsonReader reader, JsonDeserializationContext ctx, JsonDeserializerParameters params) { JsArrayString jsArray = JsArrayString.createArray().cast(); reader.beginArray();/* w w w . j a v a 2 s . c o m*/ while (JsonToken.END_ARRAY != reader.peek()) { if (JsonToken.NULL == reader.peek()) { reader.skipValue(); jsArray.push(null); } else { jsArray.push(reader.nextString()); } } reader.endArray(); if (GWT.isScript()) { return reinterpretCast(jsArray); } else { int length = jsArray.length(); String[] ret = new String[length]; for (int i = 0; i < length; i++) { ret[i] = jsArray.get(i); } return ret; } }
From source file:com.google.gerrit.client.diff.Unified.java
License:Apache License
@Override CodeMirror newCm(DiffInfo.FileMeta meta, String contents, Element parent) { JsArrayString gutters = JavaScriptObject.createArray().cast(); gutters.push(UnifiedTable.style.lineNumbersLeft()); gutters.push(UnifiedTable.style.lineNumbersRight()); return CodeMirror.create(parent, Configuration.create().set("cursorBlinkRate", prefs.cursorBlinkRate()).set("cursorHeight", 0.85) .set("gutters", gutters).set("inputStyle", "textarea").set("keyMap", "vim_ro") .set("lineNumbers", false).set("lineWrapping", prefs.lineWrapping()) .set("matchBrackets", prefs.matchBrackets()) .set("mode", getFileSize() == FileSize.SMALL ? getContentType(meta) : null) .set("readOnly", true).set("scrollbarStyle", "overlay").set("styleSelectedText", true) .set("showTrailingSpace", prefs.showWhitespaceErrors()).set("tabSize", prefs.tabSize()) .set("theme", prefs.theme().name().toLowerCase()).set("value", meta != null ? contents : "") .set("viewportMargin", renderEntireFile() ? POSITIVE_INFINITY : 10)); }