Package org.fife.ui.autocomplete
Class CompletionListModel
- java.lang.Object
-
- javax.swing.AbstractListModel<Completion>
-
- org.fife.ui.autocomplete.CompletionListModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.ListModel<Completion>
class CompletionListModel extends javax.swing.AbstractListModel<Completion>
A list model implementation that allows the bulk addition of elements. This is the only feature missing fromDefaultListModel
that we need.- Version:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Completion>
delegate
Container for items in this model.
-
Constructor Summary
Constructors Constructor Description CompletionListModel()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes all the elements from this list.Completion
getElementAt(int index)
int
getSize()
void
setContents(java.util.Collection<Completion> contents)
Sets the contents of this model.
-
-
-
Field Detail
-
delegate
private final java.util.List<Completion> delegate
Container for items in this model.
-
-
Method Detail
-
clear
public void clear()
Removes all the elements from this list. The list will be empty after this call returns (unless it throws an exception).- See Also:
setContents(Collection)
-
getElementAt
public Completion getElementAt(int index)
-
getSize
public int getSize()
-
setContents
public void setContents(java.util.Collection<Completion> contents)
Sets the contents of this model. All previous contents are removed.- Parameters:
contents
- The new contents of this model.
-
-