@Test public void testListeners() { final JTextField textField = new JTextField(); final AbstractDocument document = (AbstractDocument) textField.getDocument(); final int originalPropertyChangeListenerCount = textField.getPropertyChangeListeners().length; final int originalActionListenerCount = textField.getActionListeners().length; final int originalDocumentListenerCount = document.getDocumentListeners().length; TextComponentMatcherEditor<String> textMatcherEditor = new TextComponentMatcherEditor<>(textField, GlazedLists.toStringTextFilterator(), true); assertEquals(originalPropertyChangeListenerCount+1, textField.getPropertyChangeListeners().length); assertEquals(originalActionListenerCount, textField.getActionListeners().length); assertEquals(originalDocumentListenerCount+1, document.getDocumentListeners().length); textMatcherEditor.dispose(); assertEquals(originalPropertyChangeListenerCount, textField.getPropertyChangeListeners().length); assertEquals(originalActionListenerCount, textField.getActionListeners().length); assertEquals(originalDocumentListenerCount, document.getDocumentListeners().length); textMatcherEditor = new TextComponentMatcherEditor<>(textField, GlazedLists.toStringTextFilterator(), false); assertEquals(originalPropertyChangeListenerCount+1, textField.getPropertyChangeListeners().length); assertEquals(originalActionListenerCount+1, textField.getActionListeners().length); assertEquals(originalDocumentListenerCount, document.getDocumentListeners().length); textMatcherEditor.dispose(); assertEquals(originalPropertyChangeListenerCount, textField.getPropertyChangeListeners().length); assertEquals(originalActionListenerCount, textField.getActionListeners().length); assertEquals(originalDocumentListenerCount, document.getDocumentListeners().length); }
public void dispose() { deregisterListeners(live); }
TextComponentMatcherEditor extends TextMatcherEditor<E> { public void dispose() { deregisterListeners(live); } }
TextComponentMatcherEditor extends TextMatcherEditor<E> { public void dispose() { deregisterListeners(live); } TextComponentMatcherEditor(JTextComponent textComponent, TextFilterator<? super E> textFilterator);  TextComponentMatcherEditor(JTextComponent textComponent, TextFilterator<? super E> textFilterator, boolean live);  TextComponentMatcherEditor(Document document, TextFilterator<? super E> textFilterator); private  TextComponentMatcherEditor(JTextComponent textComponent, Document document, TextFilterator<? super E> textFilterator, boolean live); }
TextComponentMatcherEditor extends TextMatcherEditor<E> { public void dispose() { deregisterListeners(live); } TextComponentMatcherEditor(JTextComponent textComponent, TextFilterator<? super E> textFilterator);  TextComponentMatcherEditor(JTextComponent textComponent, TextFilterator<? super E> textFilterator, boolean live);  TextComponentMatcherEditor(Document document, TextFilterator<? super E> textFilterator); private  TextComponentMatcherEditor(JTextComponent textComponent, Document document, TextFilterator<? super E> textFilterator, boolean live); boolean isLive(); void setLive(boolean live); void dispose(); }
TextComponentMatcherEditor extends TextMatcherEditor<E> { public void dispose() { deregisterListeners(live); } TextComponentMatcherEditor(JTextComponent textComponent, TextFilterator<? super E> textFilterator);  TextComponentMatcherEditor(JTextComponent textComponent, TextFilterator<? super E> textFilterator, boolean live);  TextComponentMatcherEditor(Document document, TextFilterator<? super E> textFilterator); private  TextComponentMatcherEditor(JTextComponent textComponent, Document document, TextFilterator<? super E> textFilterator, boolean live); boolean isLive(); void setLive(boolean live); void dispose();  }