public static interface EntryCompletion.Match
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().
| Modifier and Type | Method and Description |
|---|---|
boolean |
onMatch(EntryCompletion source,
String key,
TreeIter iter)
Tell if a row should be in the completion list or not.
|
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.