Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

oracle.javatools.editor
Interface CharacterTypedListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
AbstractEditingPlugin, AbstractInsight

public interface CharacterTypedListener
extends java.util.EventListener

The CharacterTypedListener interface should be implemented by observers interested in receiving notifications of characters typed into the editor pane. This is useful for plugins, such as code insight, that are specifically interested in the characters that are typed into the editor in order to trigger certain events or actions.

For example, to support code insight for Java, we may listen for a typed event of a period "." or left parenthesis "(" character to determine whether the user needs insight information displayed.

These notifications are delivered by the mutating thread (which caused the change to the document) after the modification is complete and document change notification is delivered. Since the modification is complete, no document locks are automatically acquired while characterTyped() is called. If listeners intend to access the document while being notified, it is responsible for acquiring the document lock itself.

As with notifications in the swing text package, there is no guarantee about the order of delivery notifications to the character typed listeners (though it is guaranteed to occur after all document change listeners have been notified.)

Note, instead of defining a CharacterTypedEvent, the details about the event are passed as parameters to the listener to avoid an explicit object creation.


Method Summary
 void characterTyped(BasicEditorPane editorPane, int offset, char typedChar)
          Providers notification that a character was typed by the user and inserted into the editor pane.
 

Method Detail

characterTyped

void characterTyped(BasicEditorPane editorPane,
                    int offset,
                    char typedChar)
Providers notification that a character was typed by the user and inserted into the editor pane.

Parameters:
editorPane - the editor pane where the character was typed
offset - the offset where the character was inserted
typedChar - the character that was typed

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

Copyright © 1997, 2013, Oracle. All rights reserved.