edu.princeton.swing.text
Class IndentingAutoCompleter

java.lang.Object
  extended by edu.princeton.swing.text.IndentingAutoCompleter
All Implemented Interfaces:
AutoCompleter
Direct Known Subclasses:
TUncommentingAutoCompleter

public class IndentingAutoCompleter
extends Object
implements AutoCompleter

IndentingAutoCompleter is an implementation of AutoCompleter which will intercept tab keystrokes when more than one line is selected and indent the block (if shift is held down, the block will be unindented).


Constructor Summary
IndentingAutoCompleter()
           
 
Method Summary
 boolean interceptKeyEvent(PHighlightedTextArea comp, KeyEvent e)
          The PHighlightedTextArea will pass all key events to its auto-completer before processing the event for itself.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndentingAutoCompleter

public IndentingAutoCompleter()
Method Detail

interceptKeyEvent

public boolean interceptKeyEvent(PHighlightedTextArea comp,
                                 KeyEvent e)
The PHighlightedTextArea will pass all key events to its auto-completer before processing the event for itself.

Specified by:
interceptKeyEvent in interface AutoCompleter
Parameters:
comp - The component which recieved the KeyEvent.
e - The event which occurred.
Returns:
True if the component should ignore the KeyEvent (because this method already performed a special action associated with it). In either case, KeyListeners of the component will still be informed of the event.