eventCounter = null;
}
public void guiTestConstructors() {
JTextField textComponent = new JTextField();
AbstractDocument document = (AbstractDocument) textComponent.getDocument();
int initialDocumentListenerCount = document.getDocumentListeners().length;
TextFilterator<String> textFilterator = GlazedLists.toStringTextFilterator();
TextComponentMatcherEditor<String> tcme;
tcme = new TextComponentMatcherEditor<String>(textComponent, textFilterator);
assertEquals(0, textComponent.getActionListeners().length);
assertEquals(initialDocumentListenerCount+1, document.getDocumentListeners().length);
assertSame(textFilterator, tcme.getFilterator());
assertTrue(tcme.isLive());
tcme.dispose();
tcme = new TextComponentMatcherEditor<String>(textComponent, textFilterator, true);
assertEquals(0, textComponent.getActionListeners().length);
assertEquals(initialDocumentListenerCount+1, document.getDocumentListeners().length);
assertSame(textFilterator, tcme.getFilterator());
assertTrue(tcme.isLive());
tcme.dispose();
tcme = new TextComponentMatcherEditor<String>(textComponent, textFilterator, false);
assertEquals(1, textComponent.getActionListeners().length);
assertEquals(initialDocumentListenerCount, document.getDocumentListeners().length);
assertSame(textFilterator, tcme.getFilterator());
assertFalse(tcme.isLive());
tcme.dispose();
tcme = new TextComponentMatcherEditor<String>(document, textFilterator);
assertEquals(0, textComponent.getActionListeners().length);
assertEquals(initialDocumentListenerCount+1, document.getDocumentListeners().length);
assertSame(textFilterator, tcme.getFilterator());
assertTrue(tcme.isLive());
tcme.dispose();
assertEquals(0, textComponent.getActionListeners().length);
assertEquals(initialDocumentListenerCount, document.getDocumentListeners().length);
}