|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.washington.biostr.sig.brainj3d.shwing.swing.AutoCompleteModel
public class AutoCompleteModel
An AutoCompleteModel is a ListModel for the autocomplete. It is backed by a set that does not allow duplicate values and it only ever shows a portion of backing data based on the prefix passed to it.
| Constructor Summary | |
|---|---|
AutoCompleteModel()
|
|
| Method Summary | |
|---|---|
void |
addElement(String str)
Add the element to the set of possibilities and if the element would be shown, add it to the current set and fire an event. |
void |
addListDataListener(ListDataListener l)
|
int |
compare(String o1,
String o2)
|
boolean |
equals(Object obj)
|
boolean |
filter(String prefix)
Filter the current list model so that only those items that start with prefix are shown. |
protected void |
filterCurrent(String prefix)
|
protected void |
fireIntervalAdded(int start,
int end)
|
protected void |
fireIntervalChanged(int start,
int end)
|
protected void |
fireIntervalRemove(int start,
int end)
|
Object |
getElementAt(int index)
|
static AutoCompleteModel |
getModelForDomain(String domain)
Get the model for the given domain or create a new one. |
int |
getSize()
|
int |
hashCode()
|
void |
removeListDataListener(ListDataListener l)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AutoCompleteModel()
| Method Detail |
|---|
public static AutoCompleteModel getModelForDomain(String domain)
domain -
IllegalArgumentException - if domain is null or "" or it starts with a digit.public int getSize()
getSize in interface ListModelpublic Object getElementAt(int index)
getElementAt in interface ListModelpublic void addListDataListener(ListDataListener l)
addListDataListener in interface ListModelpublic void removeListDataListener(ListDataListener l)
removeListDataListener in interface ListModelpublic void addElement(String str)
str -
protected void fireIntervalAdded(int start,
int end)
protected void fireIntervalChanged(int start,
int end)
protected void fireIntervalRemove(int start,
int end)
public boolean filter(String prefix)
prefix -
protected void filterCurrent(String prefix)
public int compare(String o1,
String o2)
compare in interface Comparator<String>public boolean equals(Object obj)
equals in interface Comparator<String>equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||