CLASS
tcl.lang.IdleHandler -- Subclass from this abstract base class to create idle event handlers.
METHODS
IdleHandler(Notifier notifier)
synchronized void cancel()
abstract void processIdleEvent()
ARGUMENTS
DESCRIPTION
IdleHandler
cancel
processIdleEvent
EQUIVALENT C FUNCTIONS
SEE ALSO
KEYWORDS

CLASS

tcl.lang.IdleHandler -- Subclass from this abstract base class to create idle event handlers.

METHODS

IdleHandler(Notifier notifier)

synchronized void cancel()

abstract void processIdleEvent()

ARGUMENTS

Notifier notifier ()
The Notifier in which to register the new IdleHandler.

DESCRIPTION

The IdleHandler class is used to schedule code to be executed when the specified notifier becomes idle. The notifier is considered to be idle when notifier.doOneEvent has been called, couldn't find any events to handle, and is about to go to sleep waiting for an event to occur. At this point all pending idle handlers are invoked. For each currently registered IdleHandler instance, there will be a single call to its processIdleEvent method; after that the IdleHandler instance is automatically removed. The IdleHandler class is only usable in programs that use notifier.doOneEvent to dispatch events.

IdleHandler
This constructor creates an IdleHandler instance and register it inside the given notifier.

cancel
If the processIdleEvent method has not been invoked yet, cancels this idle handler. If the processIdleEvent method has already been invoked, this call has no effect.

processIdleEvent
This method is called when the notifier is idle. You can override this method to perform the desired actions when the idle event occurs. The IdleHandler instance can be created in any thread. However, processIdleEvent is always called in the primary thread of the notifier that was specified in the IdleHandler constructor.

EQUIVALENT C FUNCTIONS

Tcl_CreateIdleHandler

SEE ALSO

Notifier, TimerHandler

KEYWORDS

idle, event, event queue
Copyright © 1998 Sun Microsystems, Inc.
Copyright © 1995-1997 Roger E. Critchlow Jr.