tcl.lang
Class IdleHandler

java.lang.Object
  extended by tcl.lang.IdleHandler

public abstract class IdleHandler
extends Object

This abstract class is used to define idle handlers.


Constructor Summary
IdleHandler()
          Create an idle handler.
IdleHandler(Notifier n)
          Create a idle handler to be fired when the notifier is idle.
 
Method Summary
 void cancel()
          Mark this idle handler as cancelled so that it won't be invoked.
abstract  void processIdleEvent()
          This method is called when the idle is expired.
 void register(Notifier n)
          Register Idle handler in the list of handlers for the given Notifier
 String toString()
          This method prints a text description of the event for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdleHandler

public IdleHandler()
Create an idle handler. Must call register(Notifier) before the handler will be called.


IdleHandler

public IdleHandler(Notifier n)
Create a idle handler to be fired when the notifier is idle. Side effects: The idle is registered in the list of idle handlers in the given notifier. When the notifier is idle, the processIdleEvent() method will be invoked exactly once inside the primary thread of the notifier.

Parameters:
n - the notifier to fire the event
Method Detail

register

public void register(Notifier n)
Register Idle handler in the list of handlers for the given Notifier

Parameters:
n - the notifier to fire the events

cancel

public void cancel()
Mark this idle handler as cancelled so that it won't be invoked. Side effects: The idle handler is marked as cancelled so that its processIdleEvent() method will not be called. If the idle event has already fired, then nothing this call has no effect.


processIdleEvent

public abstract void processIdleEvent()
This method is called when the idle is expired. Override This method to implement your own idle handlers.


toString

public String toString()
This method prints a text description of the event for debugging.

Overrides:
toString in class Object


Copyright © 2015. All rights reserved.