com.extjs.gxt.ui.client.js
Class JsArray

java.lang.Object
  extended by com.extjs.gxt.ui.client.js.JsArray
All Implemented Interfaces:
JsWrapper

public class JsArray
extends java.lang.Object
implements JsWrapper

Wraps a native javascript array.


Field Summary
protected  com.google.gwt.core.client.JavaScriptObject jsArray
          The wrapped javascript object.
 
Constructor Summary
JsArray()
          Creates a new instance.
 
Method Summary
 void add(boolean value)
          Adds a boolean value to the array.
 void add(byte value)
          Adds a byte value to the array.
 void add(char value)
          Adds a char value to the array.
 void add(double value)
          Adds a double value to the array.
 void add(float value)
          Adds a float value to the array.
 void add(int value)
          Adds a int value to the array.
 void add(com.google.gwt.core.client.JavaScriptObject object)
          Adds a native javascript object to the array.
 void add(java.lang.Object value)
           
 void add(short value)
          Adds a short value to the array.
 void add(java.lang.String value)
          Adds a string value to the array.
protected  com.google.gwt.core.client.JavaScriptObject create()
           
static com.google.gwt.core.client.JavaScriptObject eval(java.lang.String code)
           
 java.lang.Object get(int index)
          Returns a property value.
 boolean getBoolean(int index)
           
 byte getByte(int index)
           
 char getChar(int index)
           
 double getDouble(int index)
           
 float getFloat(int index)
           
 int getInt(int index)
          Returns a property value.
 com.google.gwt.core.client.JavaScriptObject getJsObject()
          Returns the javscript object.
 short getShort(int index)
           
 java.lang.String getString(int index)
          Returns a property value.
 int size()
          Returns the size of the array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jsArray

protected com.google.gwt.core.client.JavaScriptObject jsArray
The wrapped javascript object.

Constructor Detail

JsArray

public JsArray()
Creates a new instance.

Method Detail

eval

public static com.google.gwt.core.client.JavaScriptObject eval(java.lang.String code)

add

public void add(boolean value)
Adds a boolean value to the array.

Parameters:
value - the value to add

add

public void add(byte value)
Adds a byte value to the array.

Parameters:
value - the value to add

add

public void add(char value)
Adds a char value to the array.

Parameters:
value - the value to add

add

public void add(double value)
Adds a double value to the array.

Parameters:
value - the value to add

add

public void add(float value)
Adds a float value to the array.

Parameters:
value - the value to add

add

public void add(int value)
Adds a int value to the array.

Parameters:
value - the value to add

add

public void add(com.google.gwt.core.client.JavaScriptObject object)
Adds a native javascript object to the array.

Parameters:
object - the object to add

add

public void add(java.lang.Object value)

add

public void add(short value)
Adds a short value to the array.

Parameters:
value - the value to add

add

public void add(java.lang.String value)
Adds a string value to the array.

Parameters:
value - the value to add

get

public java.lang.Object get(int index)
Returns a property value.

Parameters:
index - the index
Returns:
the value

getBoolean

public boolean getBoolean(int index)

getByte

public byte getByte(int index)

getChar

public char getChar(int index)

getDouble

public double getDouble(int index)

getFloat

public float getFloat(int index)

getInt

public int getInt(int index)
Returns a property value.

Parameters:
index - the index
Returns:
the value

getJsObject

public com.google.gwt.core.client.JavaScriptObject getJsObject()
Description copied from interface: JsWrapper
Returns the javscript object.

Specified by:
getJsObject in interface JsWrapper
Returns:
the object

getShort

public short getShort(int index)

getString

public java.lang.String getString(int index)
Returns a property value.

Parameters:
index - the index
Returns:
the value

size

public int size()
Returns the size of the array.

Returns:
the size

create

protected com.google.gwt.core.client.JavaScriptObject create()