class org.aswing.VectorListModel extends AbstractListModel

The mutable list model vector implementation. @author paling

Class Fields

static var CASEINSENSITIVE:Int

static var DESCENDING:Int

static var NUMERIC:Int

static var UNIQUESORT:Int

Instance Fields

Show inherited public instance fieldsHide inherited public instance fields

Inherited from AbstractListModel

function addListDataListener(l:ListDataListener):Void
function removeListDataListener(l:ListDataListener):Void

function new(?initalData:Array<Dynamic> = null): Void

Create a VectorListModel instance.

initalData

(optional)the to be copid to the model.

function append(obj:Dynamic, ?index:Int = -1): Void

function appendAll(arr:Array<Dynamic>, ?index:Int = -1): Void

Append all the elements of a array(arr) to the specified position of the vector.

arr

the elements array

index

the position to be append, default is -1 means the end of the vector.

function appendList(list:List, ?index:Int = -1): Void

function clear(): Void

function contains(obj:Dynamic): Bool

function first(): Dynamic

function get(i:Int): Dynamic

function getElementAt(i:Int): Dynamic

implemented ListMode

function getSize(): Int

Implemented ListMode

function indexOf(obj:Dynamic): Int

function insertElementAt(item:Dynamic, index:Int): Void

@see #append()

function isEmpty(): Bool

function last(): Dynamic

function pop(): Dynamic

function remove(obj:Dynamic): Dynamic

function removeAt(index:Int): Dynamic

function removeElementAt(index:Int): Void

@see #removeAt()

function removeRange(fromIndex:Int, toIndex:Int): Array<Dynamic>

Removes from this List all of the elements whose index is between fromIndex, and toIndex(both inclusive). Shifts any succeeding elements to the left (reduces their index). This call shortens the ArrayList by (toIndex - fromIndex) elements. (If toIndex==fromIndex, this operation has no effect.)

returns

the elements were removed from the vector

function replaceAt(index:Int, obj:Dynamic): Dynamic

function shift(): Dynamic

function size(): Int

function sort(compare:Dynamic, options:Int): Array<Dynamic>

function sortOn(key:Dynamic, options:Int): Array<Dynamic>

function subArray(startIndex:Int, length:Int): Array<Dynamic>

Returns a array that contains elements start with startIndex and has length elements.

startIndex

the element started index(include)

length

length of the elements, if there is not enough elements left, return the elements ended to the end of the vector.

function toArray(): Array<Dynamic>

function toString(): String

function valueChanged(obj:Dynamic): Void

Notice the listeners the specified obj's value changed.

function valueChangedAt(index:Int): Void

Notice the listeners the specified obj's value changed.

function valueChangedRange(from:Int, to:Int): Void

Notice the listeners the specified range values changed. [from, to](include "from" and "to").