borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.util
java.lang.Object +----borland.jbcl.util.KeyMulticaster
Properties Methods
Implements KeyListener, EventListener
A class that dispatches focus events to multiple listeners. KeyMulticaster maintains an array of listeners. The add(), remove(), and find() methods maintain this list.
The hasListeners() method determines whether any objects are listening for key events. The dispatch() method sends a key event to all listeners.
See also: Standard Java events, Events in JBCL
public final synchronized void add(java.awt.event.KeyListener listener)Adds an object to the array of listeners.
Parameters:
public final void dispatch(java.awt.event.KeyEvent e)Sends a key event to all listeners. Which method is called in the listener depends on the type of key event. For example, a KeyEvent.KEY_PRESSED event results in a call to the keyPressed event in the listening object. This method is a high-speed dispatcher that does not need to be synchronized.
Parameters:
public int find(java.awt.event.KeyListener listener)Searches for the specified listener among the array of listening objects.
Parameters:
public final boolean hasListeners()Determines if there are any listeners for key events. If the method returns true, one or more listeners are present.
public final synchronized void remove(java.awt.event.KeyListener listener)Removes the specified listening object from the array of listeners for key events.
Parameters: