magi.toolkit.fields
Class ComboList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.ArrayList
                    |
                    +--magi.toolkit.util.MagiList
                          |
                          +--magi.toolkit.fields.ComboList
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, IList, java.util.List, java.util.RandomAccess, java.io.Serializable

public class ComboList
extends MagiList

A type of List for storing MagiComboBox data elements, and the selected Combo Box item.

Author:
Paul Atkinson, Magi Systems Pty Ltd.
See Also:
MagiComboBox, MagiComboBoxModel, Serialized Form

Field Summary
 
Fields inherited from class magi.toolkit.util.MagiList
ADD_MAP_KEYS, ADD_MAP_VALUES
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ComboList()
          Default constructor.
ComboList(java.util.Collection collection)
          Create a ComboList with the specified Collection of Objects.
ComboList(java.lang.Object[] objectArray)
          Create a ComboList with the specified array of Objects.
 
Method Summary
 int getSelectedIndex()
          Returns the selected item index from this data list.
 java.lang.Object getSelectedItem()
          Returns the selected item Object from this data list.
 void setSelectedIndex(int index)
          Set the selected item index for this data list.
 void setSelectedItem(java.lang.Object item)
          Set the selected item Object for this data list.
 
Methods inherited from class magi.toolkit.util.MagiList
add, add, addAll, addAll, addAll, addAll, asImmutable, reverse, sort, sort, sortAscending, sortDescending
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 
Methods inherited from interface magi.toolkit.util.IList
contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, size, subList, toArray, toArray
 

Constructor Detail

ComboList

public ComboList()
Default constructor.


ComboList

public ComboList(java.util.Collection collection)
Create a ComboList with the specified Collection of Objects.

Parameters:
collection - any Collection object, for example List, Set, Vector etc.

ComboList

public ComboList(java.lang.Object[] objectArray)
Create a ComboList with the specified array of Objects.

Parameters:
objectArray - an array of Objects to populate this list with.
Method Detail

setSelectedItem

public void setSelectedItem(java.lang.Object item)
Set the selected item Object for this data list.

Parameters:
item - the item Object to select.

getSelectedItem

public java.lang.Object getSelectedItem()
Returns the selected item Object from this data list.

Returns:
the item Object selected.

setSelectedIndex

public void setSelectedIndex(int index)
Set the selected item index for this data list.

Parameters:
index - the selected item index.

getSelectedIndex

public int getSelectedIndex()
Returns the selected item index from this data list.

Returns:
the selected item index.