public interface SearchableContainer
The SearchableContainer must be capable of iterating its own subcomponents either forward or backward. A SearchableContainer is also expected to remember the property label matched by a previous call to findText so that if the search is repeated, it can continue from the previous match.
It is recommended that a custom component within PropertyInspector use PropertyLabel rather than JLabel as the label for a property because PropertyLabel has methods to support searching and highlighting the matching label text.
There is a default implementation of findText for SearchableContainers. To make use of it, embed an instance of ContainerSearch in the class implementing SearchableContainer, and delegate the findText call to it.
|Modifier and Type||Method and Description|
Find the specified searchText by searching forward or backward through the property labels of the Searchable component.
boolean findText(java.lang.String searchText, boolean searchForward, boolean searchRepeat)
An implementation of this method should perform the following steps:
false. If there was a previously found label, its highlight should be cleared before returning.
false, start looking for a match at this point. If searchRepeat is
true, start looking for a match on the next iteration.
searchText- the text to be found.
searchForward- the direction of the search.
searchRepeat- repeat the search starting beyond the last match location (if any)