Package be.gaudry.swing.component.jlist
Class SortedListModel
java.lang.Object
javax.swing.AbstractListModel
be.gaudry.swing.component.jlist.SortedListModel
- All Implemented Interfaces:
- IModel,- Serializable,- ListModel
Wrapper class to add sort feature to a listModel
 
 Provided by the broldev.core.swing project.
- Since:
- 1.0 (Oct 11, 2008), broldev.core.swing 0.0.1-SNAPSHOT dependency
- Version:
- 1.0 (Oct 11, 2008)
- Author:
- Steph GAUDRY
- See Also:
- Serialized Form
- 
Field SummaryFields inherited from class javax.swing.AbstractListModellistenerList
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds all of the elements in the specified array to the listvoidaddElement(Object element)Adds the specified element to the listvoidclear()Removes all of the elements from this list The list will be empty after this call returns.booleanReturns true if this list contains the specified element.getElementAt(int index)intgetSize()booleanremoveElement(Object element)Removes the first occurrence of the specified element from this list, if it is present.Methods inherited from class javax.swing.AbstractListModeladdListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
- 
Constructor Details- 
SortedListModelpublic SortedListModel()Builds a default instance
 
- 
- 
Method Details- 
getSizepublic int getSize()
- 
getElementAt- Specified by:
- getElementAtin interface- ListModel
 
- 
addElementAdds the specified element to the list- Specified by:
- addElementin interface- IModel
- Parameters:
- element- element to be appended to this list
 
- 
addAllAdds all of the elements in the specified array to the list- Parameters:
- elements- elements to add
 
- 
clearpublic void clear()Removes all of the elements from this list The list will be empty after this call returns.
- 
containsReturns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that (o==null ? e==null : o.equals(e)).- Parameters:
- element- element whose presence in this list is to be tested
- Returns:
- true if this list contains the specified element
 
- 
removeElementRemoves the first occurrence of the specified element from this list, if it is present. If this list does not contain the element, it is unchanged. Returns true if this list contained the specified element (or equivalently, if this list changed as a result of the call).- Specified by:
- removeElementin interface- IModel
- Parameters:
- element- element to be removed from this list, if present
- Returns:
- true if this list contained the specified element
 
 
-