/** * Set the {@link Matcher} which specifies which elements shall be filtered. * * <p>This will remove the current {@link Matcher} or {@link MatcherEditor} * and refilter the entire list. */ public void setMatcher(Matcher<? super E> matcher) { // cancel the previous editor if(currentEditor != null) { currentEditor.removeMatcherEditorListener(listener); currentEditor = null; } if (matcher != null) changeMatcherWithLocks(currentEditor, matcher, MatcherEditor.Event.CHANGED); else changeMatcherWithLocks(currentEditor, null, MatcherEditor.Event.MATCH_ALL); }
/** * Set the {@link Matcher} which specifies which elements shall be filtered. * * <p>This will remove the current {@link Matcher} or {@link MatcherEditor} * and refilter the entire list. */ public void setMatcher(Matcher<? super E> matcher) { // cancel the previous editor if(currentEditor != null) { currentEditor.removeMatcherEditorListener(listener); currentEditor = null; } if (matcher != null) changeMatcherWithLocks(currentEditor, matcher, MatcherEditor.Event.CHANGED); else changeMatcherWithLocks(currentEditor, null, MatcherEditor.Event.MATCH_ALL); }
/** * Set the {@link Matcher} which specifies which elements shall be filtered. * * <p>This will remove the current {@link Matcher} or {@link MatcherEditor} * and refilter the entire list. */ public void setMatcher(Matcher<? super E> matcher) { // cancel the previous editor if(currentEditor != null) { currentEditor.removeMatcherEditorListener(listener); currentEditor = null; } if (matcher != null) changeMatcherWithLocks(currentEditor, matcher, MatcherEditor.Event.CHANGED); else changeMatcherWithLocks(currentEditor, null, MatcherEditor.Event.MATCH_ALL); }
/** * Set the {@link MatcherEditor} which provides a dynamic {@link Matcher} * to determine which elements shall be filtered. * * <p>This will remove the current {@link Matcher} or {@link MatcherEditor} * and refilter the entire list. */ public void setMatcherEditor(MatcherEditor<? super E> editor) { // cancel the previous editor if (currentEditor != null) currentEditor.removeMatcherEditorListener(listener); // use the new editor currentEditor = editor; if (currentEditor != null) { currentEditor.addMatcherEditorListener(listener); changeMatcherWithLocks(currentEditor, currentEditor.getMatcher(), MatcherEditor.Event.CHANGED); } else { changeMatcherWithLocks(currentEditor, null, MatcherEditor.Event.MATCH_ALL); } }
/** * Set the {@link MatcherEditor} which provides a dynamic {@link Matcher} * to determine which elements shall be filtered. * * <p>This will remove the current {@link Matcher} or {@link MatcherEditor} * and refilter the entire list. */ public void setMatcherEditor(MatcherEditor<? super E> editor) { // cancel the previous editor if (currentEditor != null) currentEditor.removeMatcherEditorListener(listener); // use the new editor currentEditor = editor; if (currentEditor != null) { currentEditor.addMatcherEditorListener(listener); changeMatcherWithLocks(currentEditor, currentEditor.getMatcher(), MatcherEditor.Event.CHANGED); } else { changeMatcherWithLocks(currentEditor, null, MatcherEditor.Event.MATCH_ALL); } }
/** * Set the {@link MatcherEditor} which provides a dynamic {@link Matcher} * to determine which elements shall be filtered. * * <p>This will remove the current {@link Matcher} or {@link MatcherEditor} * and refilter the entire list. */ public void setMatcherEditor(MatcherEditor<? super E> editor) { // cancel the previous editor if (currentEditor != null) currentEditor.removeMatcherEditorListener(listener); // use the new editor currentEditor = editor; if (currentEditor != null) { currentEditor.addMatcherEditorListener(listener); changeMatcherWithLocks(currentEditor, currentEditor.getMatcher(), MatcherEditor.Event.CHANGED); } else { changeMatcherWithLocks(currentEditor, null, MatcherEditor.Event.MATCH_ALL); } }