private void initializeSearchTextListener ( ) { searchText . addListener ( ( observable , oldText , newText ) -> { if ( newText . equals ( "" ) ) { // empty search -> doesn't match anything! resetSearch ( ) ; } else { updateSearch ( newText ) ; } } ) ; }
Reacts upon changes in the search text . If the search text is empty everything will be unmarked else the search will be updated .