Package com.google.gwt.core.client

Examples of com.google.gwt.core.client.JsArrayInteger


        bytes[pos++] = (byte) (v & 0xFF);
    }

    public void writeFloat(float v) throws IOException {
        growToFit(4);
        JsArrayInteger bytes = IEEE754.fromFloat(v);
        for (int i = 0; i < 4; i++) {
            this.bytes[pos++] = (byte)bytes.get(i);
        }
    }
View Full Code Here


        }
    }

    public void writeDouble(double v) throws IOException {
        growToFit(8);
        JsArrayInteger bytes = IEEE754.fromDoubleClosure(v);
        for (int i = 0; i < 8; i++) {
            this.bytes[pos++] = (byte)bytes.get(i);
        }
    }
View Full Code Here

   * Converts Java integer array to JavaScript integer array.
   *
   * @param integers array of integers to convert.
   */
  public static JsArrayInteger toJsArrayInteger(int... integers) {
    JsArrayInteger result = JsArrayInteger.createArray().cast();
    for (int i = 0; i < integers.length; i++) {
      result.set(i, integers[i]);
    }
    nativePatchConstructorForSafari(result);
    return result;
  }
View Full Code Here

   * Converts Java integer array to JavaScript integer array.
   *
   * @param integers array of integers to convert.
   */
  public static JsArrayInteger toJsArrayInteger(int... integers) {
    JsArrayInteger result = JsArrayInteger.createArray().cast();
    for (int i = 0; i < integers.length; i++) {
      result.set(i, integers[i]);
    }
    nativePatchConstructorForSafari(result);
    return result;
  }
View Full Code Here

  public final native String getValueString(int rowIndex, int columnIndex) /*-{
    return this.getValue(rowIndex, columnIndex);
  }-*/;

  public final TimeOfDay getValueTimeOfDay(int rowIndex, int columnIndex) {
    JsArrayInteger jsArray = getValueArrayInteger(rowIndex, columnIndex);
    if (jsArray == null) {
      return null;
    }
    TimeOfDay result = new TimeOfDay();
    try {
      result.setHour(jsArray.get(0));
      result.setMinute(jsArray.get(1));
      result.setSecond(jsArray.get(2));
      result.setMillisecond(jsArray.get(3));
    } catch (BadTimeException e) {
      // this should never happen, because setValue should catch an invalid
      // time of day
      throw new RuntimeException("Invalid time of day.");
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.core.client.JsArrayInteger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.