Groovy JDK

javax.swing
Class DefaultListModel

Method Summary
void clear()
Removes all elements from the DefaultListModel.
Iterator iterator()
Returns an Iterator which traverses the DefaultListModel one element at a time.
DefaultListModel leftShift(Object e)
Overloads the left shift operator to provide an easy way to add elements to a DefaultListModel.
void putAt(int index, Object e)
Allow DefaultListModel to work with subscript operators.
 
Method Detail

clear

public void clear()
 
Removes all elements from the DefaultListModel.
Since:
1.6.4

iterator

public Iterator iterator()
 
Returns an Iterator which traverses the DefaultListModel one element at a time.
Returns:
an Iterator for a DefaultListModel
Since:
1.6.4

leftShift

public DefaultListModel leftShift(Object e)
 
Overloads the left shift operator to provide an easy way to add elements to a DefaultListModel.
Parameters:
e - an element to be added to the listModel..
Returns:
same listModel, after the value was added to it.
Since:
1.6.4

putAt

public void putAt(int index, Object e)
 
Allow DefaultListModel to work with subscript operators.

WARNING: this operation does not replace the element at the specified index, rather it inserts the element at that index, thus increasing the size of of the model by 1.

Parameters:
index - an index.
e - the element to insert at the given index.
Since:
1.6.4

Groovy JDK