Class NTACaretListener

  extended by net.sourceforge.nite.gui.textviewer.NTACaretListener
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener, javax.swing.event.CaretListener

public class NTACaretListener
extends java.lang.Object
implements javax.swing.event.CaretListener, java.awt.event.KeyListener

do we want to include the timecaret behaviour HERE? why? why not? document: ctrl effect select update also if replay? NO do we extend the CARET span, or do we just update our private selecte3d-highlights, leaving the caret span to be incomplete? if last, we should make the 'updated seelction' properly available from outside. (Myrosia seems to ask for the 'real selection' somewhere) why do we track ctrl state here? because in caretchanges you never hear about ctrl states :-)

Dennis Reidsma

Constructor Summary
NTACaretListener(NTextArea t)
          Creates a new listener.
Method Summary
 void caretUpdate(javax.swing.event.CaretEvent e)
 void keyPressed(java.awt.event.KeyEvent e)
          Handle the key pressed event from the text field.
 void keyReleased(java.awt.event.KeyEvent e)
          Handle the key released event from the text field.
 void keyTyped(java.awt.event.KeyEvent e)
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public NTACaretListener(NTextArea t)
Creates a new listener. This constructor also takes care of registering as a CaretListener and keylistener to the NTA, etc.

Method Detail


public void keyTyped(java.awt.event.KeyEvent e)
Specified by:
keyTyped in interface java.awt.event.KeyListener


public void keyPressed(java.awt.event.KeyEvent e)
Handle the key pressed event from the text field. As soon as you get a control key press, store the fact that ctrl is down

Specified by:
keyPressed in interface java.awt.event.KeyListener


public void keyReleased(java.awt.event.KeyEvent e)
Handle the key released event from the text field. As soon as the control key is released store that fact

Specified by:
keyReleased in interface java.awt.event.KeyListener


public void caretUpdate(javax.swing.event.CaretEvent e)
Specified by:
caretUpdate in interface javax.swing.event.CaretListener