| Modifier and Type | Field and Description |
|---|---|
| private ObjectProperty | categoryMatch
Represents the category which is matched by the search and should ultimately be displayed. |
| private int | |
| private List | |
| private List | |
| private List | |
| private TreeItemPredicate | filterPredicate
Decides whether a |
| private List | |
| private List | |
| private List | |
| private HashMap | |
| private int | |
| private static final Logger | |
| private PreferencesFxModel | |
| private StringProperty | |
| private HashMap | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | bindFilterPredicate(ObjectProperty<TreeItemPredicate<Category>>
of the rootItem of a predicateProperty)FilterableTreeItemBinds the predicateProperty to ensure filtering according to the searchText. |
| private void | bindSearchText(StringProperty
textProperty of a TextField where the search string is being input searchText)Makes sure this class is aware of the current text which is being searched for. |
| public ReadOnlyObjectProperty | |
| public Category | Returns: the category with the least amount of matches, taking into account the prioritycategory to return, if settingsMatch is chosen setting, Category category to return, if groupMatch is chosen group, Category category to return, if categoryMatch is chosen category, int amount of settings which match settingMatch, int amount of groups which match groupMatch, int amount of categories which match categoryMatch)Compares three categories with decreasing priority from the first to the last category. |
| public Category | |
| private Category | |
| public void | init(PreferencesFxModel
the model of PreferencesFx model, StringProperty textProperty of a TextField where the search string is being input searchText, ObjectProperty<TreeItemPredicate<Category>> of the rootItem of a predicateProperty)FilterableTreeItemInitializes the SearchHandler by initially creating all necessary lists for filtering and setting up the bindings. |
| private void | |
| public void | initializeSearchText(StringProperty
the property of the search text UI element searchText)Initializes the search text by binding it and then adding a listener to react to changes. |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | updateSearch(String
the new text to be searched for searchText)Updates the search based on a new |
| categoryMatch | back to summary |
|---|---|
| private ObjectProperty<Category> categoryMatch Represents the category which is matched by the search and should ultimately be displayed. | |
| categoryMatches | back to summary |
|---|---|
| private int categoryMatches | |
| filteredCategoriesLst | back to summary |
|---|---|
| private List<Category> filteredCategoriesLst | |
| filteredGroupsLst | back to summary |
|---|---|
| private List<Group> filteredGroupsLst | |
| filteredSettingsLst | back to summary |
|---|---|
| private List<Setting<E extends Element<E extends Element<E>>, P extends Property<T>>> filteredSettingsLst | |
| filterPredicate | back to summary |
|---|---|
| private TreeItemPredicate<Category> filterPredicate Decides whether a | |
| flatCategoriesLst | back to summary |
|---|---|
| private List<Category> flatCategoriesLst | |
| flatGroupsLst | back to summary |
|---|---|
| private List<Group> flatGroupsLst | |
| flatSettingsLst | back to summary |
|---|---|
| private List<Setting<E extends Element<E extends Element<E>>, P extends Property<T>>> flatSettingsLst | |
| groupCategoryMap | back to summary |
|---|---|
| private HashMap<Group, Category> groupCategoryMap | |
| groupMatches | back to summary |
|---|---|
| private int groupMatches | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| model | back to summary |
|---|---|
| private PreferencesFxModel model | |
| searchText | back to summary |
|---|---|
| private StringProperty searchText | |
| settingCategoryMap | back to summary |
|---|---|
| private HashMap<Setting<E extends Element<E extends Element<E>>, P extends Property<T>>, Category> settingCategoryMap | |
| settingMatches | back to summary |
|---|---|
| private int settingMatches | |
| SearchHandler | back to summary |
|---|---|
| public SearchHandler() | |
| bindFilterPredicate | back to summary |
|---|---|
| public void bindFilterPredicate(ObjectProperty<TreeItemPredicate<Category>> predicateProperty) Binds the predicateProperty to ensure filtering according to the searchText.
| |
| bindSearchText | back to summary |
|---|---|
| private void bindSearchText(StringProperty searchText) Makes sure this class is aware of the current text which is being searched for.
| |
| categoryMatchProperty | back to summary |
|---|---|
| public ReadOnlyObjectProperty | |
| compareMatches | back to summary |
|---|---|
| public Category compareMatches(Category setting, Category group, Category category, int settingMatch, int groupMatch, int categoryMatch) Compares three categories with decreasing priority from the first to the last category. See developer reference for further information.
| |
| getCategoryMatch | back to summary |
|---|---|
| public Category getCategoryMatch() | |
| getSelectedCategoryByMatch | back to summary |
|---|---|
| private Category getSelectedCategoryByMatch() | |
| init | back to summary |
|---|---|
| public void init(PreferencesFxModel model, StringProperty searchText, ObjectProperty<TreeItemPredicate<Category>> predicateProperty) Initializes the SearchHandler by initially creating all necessary lists for filtering and setting up the bindings. API Note Must be called to make the filtering work.
| |
| initializeSearch | back to summary |
|---|---|
| private void initializeSearch() | |
| initializeSearchText | back to summary |
|---|---|
| public void initializeSearchText(StringProperty searchText) Initializes the search text by binding it and then adding a listener to react to changes.
| |
| initializeSearchTextListener | back to summary |
|---|---|
| private void initializeSearchTextListener() Reacts upon changes in the search text. If the search text is empty, everything will be unmarked, else the search will be updated. | |
| markMatches | back to summary |
|---|---|
| private void markMatches() | |
| resetSearch | back to summary |
|---|---|
| private void resetSearch() | |
| setCategoryMatch | back to summary |
|---|---|
| private void setCategoryMatch(Category categoryMatch) | |
| unmarkEverything | back to summary |
|---|---|
| private void unmarkEverything() | |
| updateFilteredLists | back to summary |
|---|---|
| private void updateFilteredLists(String searchText) | |
| updateSearch | back to summary |
|---|---|
| public void updateSearch(String searchText) Updates the search based on a new Implementation Note Filters the lists, sets the category match, unmarks everything and marks all matches.
| |