use of org.eclipse.nebula.widgets.nattable.search.strategy.ISearchStrategy in project nebula.widgets.nattable by eclipse.
the class SearchDialog method createSearchCommand.
private SearchCommand createSearchCommand(String text, boolean isIncremental) {
this.forwardValue = this.forwardButton.getSelection();
this.allValue = this.allButton.getSelection();
this.caseSensitiveValue = this.caseSensitiveButton.getSelection();
this.wrapSearchValue = this.wrapSearchButton.getSelection();
this.wholeWordValue = this.wholeWordButton.getSelection();
this.incrementalValue = this.incrementalButton.getSelection();
this.regexValue = this.regexButton.getSelection();
// TODO
// includeCollapsedValue = includeCollapsedButton.getSelection();
this.columnFirstValue = this.columnFirstButton.getSelection();
String searchDirection = this.forwardValue ? ISearchDirection.SEARCH_FORWARD : ISearchDirection.SEARCH_BACKWARDS;
ISearchStrategy searchStrategy;
if (this.allValue) {
searchStrategy = new GridSearchStrategy(this.natTable.getConfigRegistry(), true, this.columnFirstValue);
} else {
searchStrategy = new SelectionSearchStrategy(this.natTable.getConfigRegistry(), this.columnFirstValue);
}
return new SearchCommand(text, this.natTable, searchStrategy, searchDirection, this.wrapSearchValue, this.caseSensitiveValue, !this.regexValue && this.wholeWordValue, !this.regexValue && this.allValue && isIncremental, this.regexValue, // includeCollapsedValue, comparator);
false, this.comparator);
}
Aggregations