T
- Type of result of file content matching.public abstract class SearchResultsDisplayer<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SearchResultsDisplayer.NodeDisplayer<T>
Helper class for transforming matching objects to nodes.
|
Modifier | Constructor and Description |
---|---|
protected |
SearchResultsDisplayer()
Constructor for subclasses.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
addMatchingObject(T object)
This method is called when a new matching object is
found.
|
void |
closed()
Called right after the displayer is closed.
|
static <U> DefaultSearchResultsDisplayer<U> |
createDefault(SearchResultsDisplayer.NodeDisplayer<U> helper,
SearchComposition<U> searchComposition,
SearchProvider.Presenter presenter,
String title)
Get default displayer that shows results as a tree of nodes.
|
abstract String |
getTitle()
Return title of this displayer.
|
abstract JComponent |
getVisualComponent()
Get component that will be shown in the Search Results window.
|
void |
searchFinished()
Called right after the search was finished.
|
void |
searchStarted()
Called right after the search was started.
|
void |
setInfoNode(Node infoNode)
Set node that display information from the search listener.
|
protected SearchResultsDisplayer()
@NonNull public abstract JComponent getVisualComponent()
public abstract void addMatchingObject(@NonNull T object)
public void searchStarted()
public void searchFinished()
public static <U> DefaultSearchResultsDisplayer<U> createDefault(@NonNull SearchResultsDisplayer.NodeDisplayer<U> helper, @NonNull SearchComposition<U> searchComposition, @NullAllowed SearchProvider.Presenter presenter, @NonNull String title)
helper
- Helper that returns nodes for matching objects.searchComposition
- Search composition of the displayer is created
for.presenter
- Presenter that can be shown to modify search criteria.title
- Title that will be shown in the tab of search results
window.@NonNull public abstract String getTitle()
public void setInfoNode(Node infoNode)
SearchResultsDisplayer.getVisualComponent()
.
The default implementation does nothing. Override it if you want to add
the info node to your UI.public void closed()