Example usage for com.google.gwt.core.client JsArrayString push

List of usage examples for com.google.gwt.core.client JsArrayString push

Introduction

In this page you can find the example usage for com.google.gwt.core.client JsArrayString push.

Prototype

public final native void push(String value) ;

Source Link

Document

Pushes the given value onto the end of the array.

Usage

From source file:com.ait.toolkit.sencha.shared.client.data.TreeStore.java

License:Open Source License

public TreeStore(List<? extends TableItem> data, List<String> fields, SorterConfig... sorters) {
    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  a  v a 2 s .  com
    JsArrayString fs = JsArrayString.createArray().cast();
    for (String s : fields) {
        fs.push(s);
    }
    create(JsoHelper.arrayConvert(storeData), fs, false, JsoHelper.arrayConvert(sorters));
}

From source file:com.ait.toolkit.sencha.shared.client.data.TreeStore.java

License:Open Source License

public TreeStore(List<? extends TableItem> data, boolean expanded, SorterConfig... sorters) {
    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 a v a  2  s . c o  m*/
    JsArrayString fields = JsArrayString.createArray().cast();
    fields.push("text");
    create(JsoHelper.arrayConvert(storeData), fields, expanded, JsoHelper.arrayConvert(sorters));
}

From source file:com.ait.toolkit.sencha.touch.charts.client.AbstractChart.java

License:Open Source License

/**
 * Array of colors to override the color of items and legends.
 * // w w  w. j av a  2s.com
 * @param values
 */
public void setColors(Color... values) {
    JsArrayString colors = JsArray.createArray().cast();
    for (Color c : values) {
        colors.push(c.getValue());
    }
    setAttribute("colors", colors, true, true);
}

From source file:com.ait.toolkit.sencha.touch.charts.client.AbstractChart.java

License:Open Source License

public void setColors(String... values) {
    JsArrayString colors = JsArray.createArray().cast();
    for (String c : values) {
        colors.push(c);
    }//from  w ww .j  a  v a2s  . c o  m
    setAttribute("colors", colors, true, true);
}

From source file:com.ait.toolkit.sencha.touch.charts.client.AbstractChart.java

License:Open Source License

public void setInteractions(InteractionType... interactions) {
    JsArrayString values = JsArrayString.createArray().cast();
    for (InteractionType type : interactions) {
        values.push(type.getValue());
    }// w  ww.j ava2 s.c  om
    _setInteractions(values);
}

From source file:com.ait.toolkit.sencha.touch.charts.client.AbstractChart.java

License:Open Source License

public void setInteractions(String... interactions) {
    JsArrayString values = JsArrayString.createArray().cast();
    for (String s : interactions) {
        values.push(s);
    }//w ww.  j  ava 2 s.com
    _setInteractions(values);
}

From source file:com.ait.toolkit.sencha.touch.charts.client.axis.AbstractAxis.java

License:Open Source License

public void setFields(ArrayList<String> fields) {
    JsArrayString array = JsArrayString.createArray().cast();
    for (String string : fields) {
        array.push(string);
    }/*from  w  w w.  j ava2 s  .  c o m*/
    JsoHelper.setAttribute(jsObj, "fields", array);
}

From source file:com.ait.toolkit.sencha.touch.charts.client.axis.AbstractAxis.java

License:Open Source License

public void setFields(String... fields) {
    JsArrayString array = JsArrayString.createArray().cast();
    for (String string : fields) {
        array.push(string);
    }//  w ww  .  ja v  a2  s  . co  m
    JsoHelper.setAttribute(jsObj, "fields", array);
}

From source file:com.ait.toolkit.sencha.touch.charts.client.series.AbstractSeries.java

License:Open Source License

public void setFill(String... colors) {
    JsArrayString values = JsArrayString.createArray().cast();
    for (String color : colors) {
        values.push(color);
    }//ww  w . j av  a2  s.  co  m
    setFill(values);
}

From source file:com.ait.toolkit.sencha.touch.charts.client.series.AbstractSeries.java

License:Open Source License

public void setColors(String... values) {
    JsArrayString peers = JsArrayString.createArray().cast();
    for (String s : values) {
        peers.push(s);
    }/*from  w  ww . j  a va  2 s.co  m*/
    setColors(peers);
}