List of usage examples for com.google.gwt.core.client JsArrayString push
public final native void push(String value) ;
From source file:com.ait.toolkit.gmaps.client.services.DistanceMatrixRequest.java
License:Open Source License
/** * An array containing origin address strings and/or LatLngs, from which to * calculate distance and time. Required. * //ww w.ja v a2 s . c om * @param destinations */ public void setOriginsAsString(ArrayList<String> destinations) { JsArrayString values = JsArrayString.createArray().cast(); for (String s : destinations) { values.push(s); } _setDestinations(values); }
From source file:com.ait.toolkit.hopscotch.client.Tour.java
License:Open Source License
public void setStepNums(String... values) { JsArrayString peers = JsArrayString.createArray().cast(); for (String s : values) { peers.push(s); }/*from w ww.j a va2s. c o m*/ setStepNums(peers); }
From source file:com.ait.toolkit.hopscotch.client.TourStep.java
License:Open Source License
/** * Creates a new tour step//www .j a v a2 s. co m * * @param placement * , the position where the bubble should appear in relation to * its target * @param targets * , ids of DOM Element that will we be the target of this step */ public TourStep(Placement placement, String... targets) { peer = StepPeer.newInstance(); JsArrayString values = JsArrayString.createArray().cast(); for (String s : targets) { values.push(s); } peer.setTarget(values); peer.setPlacement(placement.getValue()); }
From source file:com.ait.toolkit.hopscotch.client.TourStep.java
License:Open Source License
/** * Creates a new tour step/*www .j a v a 2s. co m*/ * * @param placement * , the position where the bubble should appear in relation to * its target * @param targets * , DOM Element that will we be the target of this step */ public TourStep(Placement placement, Element... targets) { peer = StepPeer.newInstance(); peer.setPlacement(placement.getValue()); JsArrayString values = JsArrayString.createArray().cast(); for (Element el : targets) { values.push(getOrCreateId(el)); } peer.setTarget(values); }
From source file:com.ait.toolkit.hopscotch.client.TourStep.java
License:Open Source License
/** * Creates a new tour step//from www . j av a2 s.c om * * @param placement * , the position where the bubble should appear in relation to * its target * @param targets * , Widget that will we be the target of this step */ public TourStep(Placement placement, Widget... targets) { peer = StepPeer.newInstance(); peer.setPlacement(placement.getValue()); JsArrayString values = JsArrayString.createArray().cast(); for (Widget el : targets) { values.push(getOrCreateId(el.getElement())); } peer.setTarget(values); }
From source file:com.ait.toolkit.moment.client.Moment.java
License:Open Source License
public static void setLocale(String... locales) { JsArrayString values = JsArray.createArray().cast(); for (String s : locales) { values.push(s); }/*from w ww . j a va 2 s.com*/ setLocale(values); }
From source file:com.ait.toolkit.mousetrap.client.MouseTrap.java
License:Open Source License
/** * If you want to bind multiple key commands to the same callback you can pass in an array for the first argument *//*w w w. j a va 2 s . co m*/ public static void bind(MouseTrapHandler callback, String... commands) { JsArrayString values = JsArrayString.createArray().cast(); for (String c : commands) { values.push(c); } bind(values, callback); }
From source file:com.ait.toolkit.mousetrap.client.MouseTrap.java
License:Open Source License
public static void bindGlobal(MouseTrapHandler callback, String... commands) { JsArrayString values = JsArrayString.createArray().cast(); for (String c : commands) { values.push(c); }//from w w w . java2 s.c o m bindGlobal(values, callback); }
From source file:com.ait.toolkit.node.core.JavaScriptUtils.java
License:Open Source License
public static JsArrayString toStringArray(String... strings) { JsArrayString ret = JavaScriptObject.createArray().cast(); for (String string : strings) { ret.push(string); }//from w w w . ja v a 2 s . c o m return ret; }
From source file:com.ait.toolkit.sencha.shared.client.data.TreeStore.java
License:Open Source License
public TreeStore(List<? extends TableItem> data, boolean expanded, String... fields) { JavaScriptObject[] storeData = new JavaScriptObject[data.size()]; for (int i = 0; i < data.size(); i++) { storeData[i] = data.get(i).getJsObj(); }//from w w w. j av a2 s . com JsArrayString fs = JsArray.createArray().cast(); for (String s : fields) { fs.push(s); } create(JsoHelper.arrayConvert(storeData), fs, expanded); }