Example usage for com.google.gwt.core.client JsArrayUtils readOnlyJsArray

List of usage examples for com.google.gwt.core.client JsArrayUtils readOnlyJsArray

Introduction

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

Prototype

public static <T extends JavaScriptObject> JsArray<T> readOnlyJsArray(T[] array) 

Source Link

Document

Take a Java array, and produce a JS array that is only used for reading.

Usage

From source file:bz.davide.dmweb.client.openlayer.LineString.java

License:Open Source License

public LineString(Point[] points) {
    JavaScriptObject[] tmp = new JavaScriptObject[points.length];
    for (int i = 0; i < points.length; i++) {
        tmp[i] = points[i].jsGeometry;/*from  w  w w  . jav a2  s  .c  o m*/
    }
    JsArray<JavaScriptObject> jsArray = JsArrayUtils.readOnlyJsArray(tmp);
    this.jsGeometry = this.newLineString(jsArray);
}

From source file:com.googlecode.gwtphonegap.client.notification.NotificationMobileImpl.java

License:Apache License

@Override
public void vibrate(int[] pattern) {
    JsArrayInteger jsPattern = JsArrayUtils.readOnlyJsArray(pattern);
    vibrate0(jsPattern);
}

From source file:com.googlecode.gwtphonegap.client.notification.NotificationMobileImpl.java

License:Apache License

@Override
public void vibrateWithPattern(int[] pattern) {
    JsArrayInteger jsPattern = JsArrayUtils.readOnlyJsArray(pattern);
    vibrateWithPattern0(jsPattern);
}

From source file:com.googlecode.gwtphonegap.client.notification.NotificationMobileImpl.java

License:Apache License

@Override
@Deprecated//from   w  w w.  ja  va2s .  c o m
public void vibrateWithPattern(int[] pattern, int repeat) {
    JsArrayInteger jsPattern = JsArrayUtils.readOnlyJsArray(pattern);
    vibrateWithPattern0(jsPattern, repeat);
}

From source file:com.seanchenxi.gwt.webrtc.client.Constraints.java

License:Apache License

public final void setOptional(Constraint[] constraint) {
    set("optional", JsArrayUtils.readOnlyJsArray(constraint));
}

From source file:org.jahia.ajax.gwt.client.util.content.CopyPasteEngine.java

License:Open Source License

private JsArray<JavaScriptObject> getCopiedNodesAsJs() {
    List<JavaScriptObject> l = new ArrayList<JavaScriptObject>();
    for (GWTJahiaNode gwtJahiaNode : copiedNodes) {
        l.add(convertGwtNode(gwtJahiaNode.getName(), gwtJahiaNode.getPath(), gwtJahiaNode.getUUID(),
                (gwtJahiaNode.getNodeTypes() != null && gwtJahiaNode.getNodeTypes().size() > 0)
                        ? gwtJahiaNode.getNodeTypes().get(0)
                        : null));//from w w w. j  a  v a  2s  .c o  m
    }
    return JsArrayUtils.readOnlyJsArray(l.toArray(new JavaScriptObject[l.size()]));
}