/** * set user defined string ID of map types to show in the control. * * @param mapTypeIds */ public final void setMapTypeIds(String[] mapTypeIds) { JsArrayString result = JsArrayString.createArray().cast(); for (int i = 0; i < mapTypeIds.length; i++) { result.set(i, mapTypeIds[i]); } setMapTypeIdsStringJs(result); }
protected JsArrayString extractOptions(ToolbarButton[] options) { JsArrayString jsOptions = JsArrayString.createArray().cast(); for (ToolbarButton option : options) { jsOptions.push(option.getId()); } return jsOptions; } }
public void execute(final Collection<Suggestion<T>> suggestions) { JsArray<Suggestion<T>> jsArray = JsArrayString.createArray().cast(); if (suggestions != null) { for (Suggestion<T> s : suggestions) { jsArray.push(s); } } invokeCallback(jsCallback, jsArray); }
public final void importScripts(String[] urls) { JsArrayString jsUrls = JsArrayString.createArray().cast(); for (int i = 0, l = urls.length; i < l; ++i) { jsUrls.set(i, urls[i]); } importScripts(jsUrls); }
public final void importScripts(String[] urls) { JsArrayString jsUrls = JsArrayString.createArray().cast(); for (int i = 0, l = urls.length; i < l; ++i) { jsUrls.set(i, urls[i]); } importScripts(jsUrls); }
/** * set user defined string ID of map types to show in the control. * * @param mapTypeIds */ public final void setMapTypeIds(String[] mapTypeIds) { JsArrayString result = JsArrayString.createArray().cast(); for (int i = 0; i < mapTypeIds.length; i++) { result.set(i, mapTypeIds[i]); } setMapTypeIdsStringJs(result); }
public FastArrayString(){ if(GWT.isScript()) { stackNative = JsArrayString.createArray().cast(); } else { stackJava = new JsList<String>(); } }
public void execute(final Collection<Suggestion<T>> suggestions) { JsArray<Suggestion<T>> jsArray = JsArrayString.createArray().cast(); if (suggestions != null) { for (Suggestion<T> s : suggestions) { jsArray.push(s); } } invokeCallback(jsCallback, jsArray); }
private JavaScriptObject createKey(String[] keys) { if(keys.length == 1) { return createKey(keys[0]); } JsArrayString array = JsArrayString.createArray().cast(); for (String key : keys) { array.push(key); } return array; }
public native final void setSubDomains(JsArrayString subdomains) /*-{ this.subdomains = subdomains; }-*/;
/** * Converts an array of Java strings to an array of JavaScript strings. * * @param strings array of strings to convert */ public static JsArrayString toJsArrayString(String... strings) { JsArrayString result = JsArrayString.createArray().cast(); for (int i = 0; i < strings.length; i++) { result.set(i, strings[i]); } nativePatchConstructorForSafari(result); return result; }
/** * Sets the types of predictions to be returned. * Supported types are 'establishment' for businesses * and 'geocode' for addresses. * * @param types the types of predictions to be returned */ public void setTypes(final String... types) { final JsArrayString theTypes = JsArrayString.createArray().cast(); for (String type : types) { theTypes.push(type); } setTypes(theTypes); }
private final native void setLabels(JsArrayString labels) /*-{ this.labels = labels; }-*/;
public JsArrayString getCategories() { final JSObject property = getJSObject().getProperty(Property.CATEGORIES); if (property == null) { return JsArrayString.createArray().cast(); } else { return property.cast(); } }
public JsArrayString getCategories() { final JSObject property = getJSObject().getProperty(Property.CATEGORIES); if (property == null) { return JsArrayString.createArray().cast(); } else { return property.cast(); } }
/** * Sets IDs of map types to show in the control. * * @param typeIds IDs of map types to show in the control */ public void setMapTypeIds(final MapTypeId[] typeIds) { final JsArrayString ids = JsArrayString.createArray().cast(); for (final MapTypeId id : typeIds) { ids.push(id.name()); } setMapTypeIdsJs(ids); }
/** * set IDs of map types to show in the control. * * @param mapTypeIds */ public final void setMapTypeIds(MapTypeId[] mapTypeIds) { JsArrayString result = JsArrayString.createArray().cast(); for (int i = 0; i < mapTypeIds.length; i++) { result.set(i, mapTypeIds[i].value()); } // TODO cannot access private method. Perhaps API was updated? // ArrayHelper.nativePatchConstructorForSafari(result); setMapTypeIdsJs(result); }
/** * set IDs of map types to show in the control. * * @param mapTypeIds */ public final void setMapTypeIds(MapTypeId[] mapTypeIds) { JsArrayString result = JsArrayString.createArray().cast(); for (int i = 0; i < mapTypeIds.length; i++) { result.set(i, mapTypeIds[i].value()); } // TODO cannot access private method. Perhaps API was updated? // ArrayHelper.nativePatchConstructorForSafari(result); setMapTypeIdsJs(result); }
public void setCategories(final String[] categories) { final JsArrayString array = JsArrayString.createArray().cast(); for (final String category : categories) { array.push(category); } final JSObject jsObject = array.cast(); getJSObject().setProperty(Property.CATEGORIES, jsObject); }
public void setCategories(final String[] categories) { final JsArrayString array = JsArrayString.createArray().cast(); for (final String category : categories) { array.push(category); } final JSObject jsObject = array.cast(); getJSObject().setProperty(Property.CATEGORIES, jsObject); }