edu.princeton.toy
Class TUncommentingAutoCompleter
java.lang.Object
edu.princeton.swing.text.IndentingAutoCompleter
edu.princeton.toy.TUncommentingAutoCompleter
- All Implemented Interfaces:
- AutoCompleter
- Direct Known Subclasses:
- TCommentingAutoCompleter
public class TUncommentingAutoCompleter
- extends IndentingAutoCompleter
TUncommentingAutoCompleter is an subclass of IndentingAutoCompleter which will also automatically
remove an entire autocomment when the user deletes the first or last character of it via the
delete key or backspace key, respectively.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TUncommentingAutoCompleter
public TUncommentingAutoCompleter()
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
- Overrides:
interceptKeyEvent
in class IndentingAutoCompleter
- 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.