net.sourceforge.wohenchan
Class TimedModifyListener
java.lang.Object
|
+--net.sourceforge.wohenchan.TimedModifyListener
- All Implemented Interfaces:
- java.util.EventListener, org.eclipse.swt.events.ModifyListener, org.eclipse.swt.internal.SWTEventListener
- public class TimedModifyListener
- extends java.lang.Object
- implements org.eclipse.swt.events.ModifyListener
This class is a ModifyListener which aggregates calls to
modifyText() and calls an ActionListener if enough time elapses
without receiving any modifyText() calls. This is useful because
it allows you to trigger an action off of someone typing into a
field, without having the action happen every keystroke, and
without forcing the user to press return or a button.
- Version:
- $Name: $ $Date: 2003/09/08 06:43:38 $
- Author:
- $Author: wtanaka $
Method Summary |
void |
modifyText(org.eclipse.swt.events.ModifyEvent evt)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_timer
TimedModifyListener.Timer m_timer
m_listener
java.awt.event.ActionListener m_listener
TimedModifyListener
public TimedModifyListener(int delay,
java.awt.event.ActionListener listener)
- Parameters:
delay
- the number of milliseconds to wait after the last
character is typed to react.
modifyText
public void modifyText(org.eclipse.swt.events.ModifyEvent evt)
- Specified by:
modifyText
in interface org.eclipse.swt.events.ModifyListener