com.partnersoft.v3x.gui
Class SortedListModel
java.lang.Object
javax.swing.AbstractListModel
com.partnersoft.v3x.gui.SortedListModel
- All Implemented Interfaces:
- ArraySearchingGopher, java.io.Serializable, javax.swing.ListModel
public class SortedListModel
- extends javax.swing.AbstractListModel
- implements ArraySearchingGopher
A basic sorted ListModel.
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.AbstractListModel |
listenerList |
|
Method Summary |
int |
compare(int a,
java.lang.Object key)
Compares the items at the two index positions using their natural
ordering. |
int |
compare(int a,
java.lang.Object key,
java.util.Comparator comp)
Compares the items at the two index positions using the given Comparator. |
boolean |
contains(java.lang.Object item)
|
java.util.Comparator |
getComparer()
|
java.lang.Object |
getElementAt(int index)
|
java.util.ArrayList |
getSelectionList()
|
java.util.Iterator |
getSelectionSet()
|
int |
getSize()
Returns the number of items in the array. |
void |
itemChanged(java.lang.Object item)
|
void |
removeItem(java.lang.Object item)
Removes an item from the selection set. |
void |
setComparer(java.util.Comparator newComparer)
|
void |
setSelectionList(java.util.ArrayList list)
|
void |
setSelectionSet(java.util.Iterator e)
|
| Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultComparer
public static final java.util.Comparator defaultComparer
SortedListModel
public SortedListModel()
getElementAt
public java.lang.Object getElementAt(int index)
- Specified by:
getElementAt in interface javax.swing.ListModel
getSize
public int getSize()
- Description copied from interface:
ArraySearchingGopher
- Returns the number of items in the array.
- Specified by:
getSize in interface ArraySearchingGopher- Specified by:
getSize in interface javax.swing.ListModel
compare
public int compare(int a,
java.lang.Object key)
- Description copied from interface:
ArraySearchingGopher
- Compares the items at the two index positions using their natural
ordering.
- Specified by:
compare in interface ArraySearchingGopher
compare
public int compare(int a,
java.lang.Object key,
java.util.Comparator comp)
- Description copied from interface:
ArraySearchingGopher
- Compares the items at the two index positions using the given Comparator.
- Specified by:
compare in interface ArraySearchingGopher
setSelectionSet
public void setSelectionSet(java.util.Iterator e)
getSelectionSet
public java.util.Iterator getSelectionSet()
setSelectionList
public void setSelectionList(java.util.ArrayList list)
getSelectionList
public java.util.ArrayList getSelectionList()
setComparer
public void setComparer(java.util.Comparator newComparer)
getComparer
public java.util.Comparator getComparer()
removeItem
public void removeItem(java.lang.Object item)
- Removes an item from the selection set.
itemChanged
public void itemChanged(java.lang.Object item)
contains
public boolean contains(java.lang.Object item)