Interface TextFilter
All Packages Class Hierarchy This Package Previous Next Index
Interface TextFilter
public interface netscape.application.TextFilter
{
/* Methods
*/
public abstract boolean acceptsEvent(Object, KeyEvent, Vector);
}
Interface implemented by objects interested in filtering key events
receiver by "text objects" (TextField and TextView). A text object calls
its filter's acceptsEvent() method upon receiving a key event but
before processing it. A TextFilter can leave the event unfiltered, or
replace it with whatever key event sequences it deems appropriate.
- See Also:
- setFilter, setFilter
Methods
acceptsEvent
public abstract boolean acceptsEvent(Object textObject,
KeyEvent event,
Vector events)
- Called by textObject upon receiving a KeyEvent. event is
the KeyEvent and events is the text object's key event Vector,
the Vector it uses to collect KeyEvents. Returning true
instructs the text object to place the KeyEvent in the event vector
(no filtering) and process it. A TextFilter that wants to filter the
key event should return false and add the replacement
KeyEvent(s) to events. Access to the text object's event vector
allows a TextFilter to turn a single KeyEvent into several. For
example, a TextFilter can turn the "t" key into "the" by creating
events for "h" and "e," adding all three events to events and
returning false.
The implementation of this method should be as simple as possible
since the event queue is locked during its execution. This method
should not call some IFC widget methods since a deadlock
can happen in some situations.
All Packages Class Hierarchy This Package Previous Next Index
Copyright © 1997 Netscape Communications Corporation. All rights reserved
Please send any comments or corrections to ifcfeedback@netscape.com
HTML generated on 21 Apr 1997