IntelliHints
public class ListDataIntelliHints<T> extends AbstractListIntelliHints
ListDataIntelliHints
is a concrete implementation of IntelliHints
. It
provides hints from a known list of data. It is similar to auto complete text field except the list will be filtered
depending on what user types in so far._keyStrokes
CLIENT_PROPERTY_INTELLI_HINTS
Constructor | Description |
---|---|
ListDataIntelliHints(JTextComponent comp,
List<T> completionList) |
|
ListDataIntelliHints(JTextComponent comp,
T[] completionList) |
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
compare(Object context,
T o) |
Compares the context with the object in the completion list.
|
List<T> |
getCompletionList() |
Gets the list of hints.
|
boolean |
isCaseSensitive() |
Checks if it used case sensitive search.
|
void |
setCaseSensitive(boolean caseSensitive) |
Sets the case sensitive flag.
|
void |
setCompletionList(List<T> completionList) |
Sets a new list of hints.
|
void |
setCompletionList(T[] completionList) |
Sets a new list of hints.
|
boolean |
updateHints(Object context) |
Update hints depending on the context.
|
acceptHint, addShowHintsKeyStroke, createPopup, getAllShowHintsKeyStrokes, getCaretPositionForPopup, getCaretRectangleForPopup, getContext, getIntelliHints, getShowHintsDelay, getShowHintsKeyStroke, getTextComponent, hideHintsPopup, isAutoPopup, isFollowCaret, isHintsPopupVisible, isMultilineTextComponent, removeShowHintsKeyStroke, setAutoPopup, setFollowCaret, setHintsEnabled, setShowHintsDelay, showHints, showHintsPopup, updateHints
createHintsComponent, createList, getDelegateComponent, getDelegateKeyStrokes, getList, getSelectedHint, setListData, setListData
public ListDataIntelliHints(JTextComponent comp, List<T> completionList)
public ListDataIntelliHints(JTextComponent comp, T[] completionList)
public List<T> getCompletionList()
public void setCompletionList(List<T> completionList)
completionList
- a new list of hints.public void setCompletionList(T[] completionList)
completionList
- a new array of hints.public boolean updateHints(Object context)
IntelliHints
updateHints
in interface IntelliHints
updateHints
in class AbstractIntelliHints
context
- the current contextprotected boolean compare(Object context, T o)
context
- the context returned from AbstractIntelliHints.getContext()
method.o
- the object in the completion list.public boolean isCaseSensitive()
public void setCaseSensitive(boolean caseSensitive)
caseSensitive
- true or false.