|
java-gnome version 4.0.15 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface EntryCompletion.Match
The callback invoked when a EntryCompletion wants to ask if a given row
in the TreeModel should be in the completion list.
Generally, when you will receive the callback you will reach into the
source's model
and query a column by which you will
determine whether or not to include this row. It allows you to a create
a more complex completion behavior into the
EntryCompletion.Match
callback. The behavior of a default
EntryCompletion can be written like that:
final DataColumnString column; final EntryCompletion completion; ... completion.setMatchCallback(new EntryCompletion.Match() { public boolean onMatch(EntryCompletion source, String key, TreeIter iter) { final TreeModel model; final String text; model = source.getModel(); text = model.getValue(iter, column); return text.startsWith(key); } });
If you are researching the GTK API documentation, see
(*GtkEntryCompletionMatchFunc)
. Creating and invoking this
"match" signal is how java-gnome has implemented the function pointer
expected by gtk_entry_completion_set_match_func()
.
Method Summary | |
---|---|
boolean |
onMatch(EntryCompletion source,
String key,
TreeIter iter)
Tell if a row should be in the completion list or not. |
Method Detail |
---|
boolean onMatch(EntryCompletion source, String key, TreeIter iter)
true
for the row to be included in the list, or
false
for the row to be excluded.
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |