Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » question about how Listeners work
question about how Listeners work [message #913022] Fri, 14 September 2012 16:02
ben agai is currently offline ben agaiFriend
Messages: 36
Registered: July 2012
Member
hi, i want to ask about how the listeners in java work.
if a class that i created, in this case DocInfo, implements IDocumentListener interface, and a DocumentEvent has occoured, could it be that before the current DocumentEvent has finished the documentChanged(DocumentEvent event) function another DocumentEvent will occour and activate the documentChanged(DocumentEvent event) function simultaneously?

here is the code below, thanks.

package handlevent.handlers;

import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocumentListener;

public class DocInfo implements IDocumentListener{

@Override
public void documentAboutToBeChanged(DocumentEvent event) {
// TODO Auto-generated method stub

}

@Override
public void documentChanged(DocumentEvent event) {
// TODO Auto-generated method stub
System.out.println("document has been changed:");
System.out.println(event.getText());
}

}
Previous Topic:Eclipse keyboard shortcuts load/save
Next Topic:Question about Breakpoint Tabs when looking at breakpoint properties
Goto Forum:
  


Current Time: Fri Mar 29 08:01:30 GMT 2024

Powered by FUDForum. Page generated in 0.02911 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top