Top Description Fields Constructors Methods
com.dlsc.gmapsfx.javascript.object

public Class MVCArray

extends JavascriptObject
Class Inheritance
Imports
com.dlsc.gmapsfx.javascript.JavascriptObject, netscape.javascript.JSObject

This javascript object current takes JavascriptObjects as parameters, but returns JSObjects, as it doesn't know what has been placed within it.
Author
Geoff Capper

Field Summary

Inherited from com.dlsc.gmapsfx.javascript.JavascriptObject:
jsObjectobjectCounterpeerRegistryruntimevariableName

Constructor Summary

AccessConstructor and Description
public
public
public
MVCArray(JSObject obj)
References Deprecated JSObject is deprecated or references (maybe indirectly) at least one deprecated element.

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Removes all elements from the array.

public void
forEach(String func)

Iterates over the elements within the array, calling the supplied function for each member.

public JSObject
getArray()
References Deprecated JSObject is deprecated or references (maybe indirectly) at least one deprecated element.

Returns a JSObject representing the underlying array.

public JSObject

Returns:

The object at the specified index.
getAt
(int
The index of the item to be returned.
idx
)
References Deprecated JSObject is deprecated or references (maybe indirectly) at least one deprecated element.

Returns the item at the specified index in the array.

public int
getLength()

Gets the length of the array.

public void
insertAt(int
The index at which to insert the item.
idx
,
JavascriptObject
The item to be inserted.
elem
)

Inserts the supplied element at the specified index in the array.

public JSObject
pop()
References Deprecated JSObject is deprecated or references (maybe indirectly) at least one deprecated element.

Removes and returns the last element of the array

public int

Returns:

The length of the array after the addition.
push
(JavascriptObject
The Javascript object to be added to the array.
obj
)

Adds the supplied element onto the end of the array, then returns the length of the array.

public void
removeAt(int
The index of the object to be removed.
idx
)

Removes and discards the item at the specified index.

public void
setAt(int
The index at which the item should be set.
idx
,
JavascriptObject
The object to be set at the supplied index.
obj
)

Sets the supplied object at the supplied index.

Inherited from com.dlsc.gmapsfx.javascript.JavascriptObject:
checkBooleancheckIntegercheckUndefinedgetJSObjectgetNextVariableNamegetPropertygetPropertygetVariableNameinvokeJavascriptinvokeJavascriptinvokeJavascriptReturnValueinvokeJavascriptReturnValueisMemberDefinedsetPropertysetPropertysetProperty

Constructor Detail

MVCArrayback to summary
public MVCArray()
MVCArrayback to summary
public MVCArray(Object[] ary)
MVCArrayback to summary
public MVCArray(JSObject obj)

References Deprecated

JSObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Method Detail

clearback to summary
public void clear()

Removes all elements from the array.

forEachback to summary
public void forEach(String func)

Iterates over the elements within the array, calling the supplied function for each member. The parameters to the callback function are: func(element, index)

getArrayback to summary
public JSObject getArray()

References Deprecated

JSObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Returns a JSObject representing the underlying array. Not entirely sure how useful this would be for people.

getAtback to summary
public JSObject getAt(int idx)

References Deprecated

JSObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Returns the item at the specified index in the array.

Parameters
idx:int

The index of the item to be returned.

Returns:JSObject

The object at the specified index.

getLengthback to summary
public int getLength()

Gets the length of the array.

insertAtback to summary
public void insertAt(int idx, JavascriptObject elem)

Inserts the supplied element at the specified index in the array.

Parameters
idx:int

The index at which to insert the item.

elem:JavascriptObject

The item to be inserted.

popback to summary
public JSObject pop()

References Deprecated

JSObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Removes and returns the last element of the array

pushback to summary
public int push(JavascriptObject obj)

Adds the supplied element onto the end of the array, then returns the length of the array.

Parameters
obj:JavascriptObject

The Javascript object to be added to the array.

Returns:int

The length of the array after the addition.

removeAtback to summary
public void removeAt(int idx)

Removes and discards the item at the specified index.

Parameters
idx:int

The index of the object to be removed.

setAtback to summary
public void setAt(int idx, JavascriptObject obj)

Sets the supplied object at the supplied index.

Parameters
idx:int

The index at which the item should be set.

obj:JavascriptObject

The object to be set at the supplied index.