本文整理汇总了Java中org.controlsfx.control.textfield.AutoCompletionBinding.ISuggestionRequest方法的典型用法代码示例。如果您正苦于以下问题:Java AutoCompletionBinding.ISuggestionRequest方法的具体用法?Java AutoCompletionBinding.ISuggestionRequest怎么用?Java AutoCompletionBinding.ISuggestionRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.controlsfx.control.textfield.AutoCompletionBinding
的用法示例。
在下文中一共展示了AutoCompletionBinding.ISuggestionRequest方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isMatch
import org.controlsfx.control.textfield.AutoCompletionBinding; //导入方法依赖的package包/类
@Override
protected boolean isMatch(SecurityData suggestion, AutoCompletionBinding.ISuggestionRequest request) {
String userTextLower = request.getUserText().toLowerCase();
String suggestionStr = suggestion.getSymbol().toLowerCase();
return suggestionStr.contains(userTextLower)
&& !suggestionStr.equals(userTextLower);
}
示例2: complete
import org.controlsfx.control.textfield.AutoCompletionBinding; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public Collection<ParsedEntryLink> complete(AutoCompletionBinding.ISuggestionRequest request) {
//We have to cast the BibEntries from the BibEntrySuggestionProvider to ParsedEntryLink
Collection<BibEntry> bibEntries = (Collection<BibEntry>) super.complete(request);
return bibEntries.stream().map(ParsedEntryLink::new).collect(Collectors.toList());
}
示例3: isMatch
import org.controlsfx.control.textfield.AutoCompletionBinding; //导入方法依赖的package包/类
@Override
protected boolean isMatch(BibEntry suggestion, AutoCompletionBinding.ISuggestionRequest request) {
String userTextLower = request.getUserText().toLowerCase();
return suggestion.getCiteKeyOptional()
.map(key -> key.toLowerCase().contains(userTextLower))
.orElse(false);
}
示例4: call
import org.controlsfx.control.textfield.AutoCompletionBinding; //导入方法依赖的package包/类
@Override
public Collection<String> call(AutoCompletionBinding.ISuggestionRequest request) {
List<String> suggestions = new ArrayList<>();
if (suggestionProvider != null) {
suggestions.addAll(suggestionProvider.call(request));
}
suggestions.addAll(contentSelectorValues);
return suggestions;
}
示例5: getRequest
import org.controlsfx.control.textfield.AutoCompletionBinding; //导入方法依赖的package包/类
public static AutoCompletionBinding.ISuggestionRequest getRequest(String text) {
return new AutoCompletionBinding.ISuggestionRequest() {
@Override
public boolean isCancelled() {
return false;
}
@Override
public String getUserText() {
return text;
}
};
}
示例6: complete
import org.controlsfx.control.textfield.AutoCompletionBinding; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public Collection<Author> complete(AutoCompletionBinding.ISuggestionRequest request) {
return (Collection<Author>) super.complete(request);
}
示例7: complete
import org.controlsfx.control.textfield.AutoCompletionBinding; //导入方法依赖的package包/类
public Collection<?> complete(AutoCompletionBinding.ISuggestionRequest request) {
return suggestionProvider.call(request);
}
示例8: isMatch
import org.controlsfx.control.textfield.AutoCompletionBinding; //导入方法依赖的package包/类
@Override
protected boolean isMatch(Author suggestion, AutoCompletionBinding.ISuggestionRequest request) {
String userTextLower = request.getUserText().toLowerCase();
String suggestionStr = suggestion.getLastFirst(false).toLowerCase();
return suggestionStr.contains(userTextLower);
}
示例9: isMatch
import org.controlsfx.control.textfield.AutoCompletionBinding; //导入方法依赖的package包/类
@Override
protected boolean isMatch(String suggestion, AutoCompletionBinding.ISuggestionRequest request) {
String userTextLower = request.getUserText().toLowerCase();
String suggestionStr = suggestion.toLowerCase();
return suggestionStr.contains(userTextLower);
}