Quaqua 7.4.2 2011-07-05

ch.randelshofer.quaqua
Class QuaquaTextCursorHandler

java.lang.Object
  extended by ch.randelshofer.quaqua.QuaquaTextCursorHandler
All Implemented Interfaces:
java.awt.event.KeyListener, java.awt.event.MouseMotionListener, java.util.EventListener

public class QuaquaTextCursorHandler
extends java.lang.Object
implements java.awt.event.MouseMotionListener, java.awt.event.KeyListener

QuaquaTextCursorHandler hides the cursor when a key is pressed in a JTextComponent and shows it again when the cursor is moved.

Version:
$Id: QuaquaTextCursorHandler.java 377 2011-02-15 09:28:33Z wrandelshofer $
Author:
Werner Randelshofer

Constructor Summary
QuaquaTextCursorHandler()
           
 
Method Summary
static QuaquaTextCursorHandler getInstance()
          Returns the shared instance of the handler.
 void installListeners(javax.swing.text.JTextComponent c)
           
 void keyPressed(java.awt.event.KeyEvent e)
           
 void keyReleased(java.awt.event.KeyEvent e)
           
 void keyTyped(java.awt.event.KeyEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void uninstallListeners(javax.swing.text.JTextComponent c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuaquaTextCursorHandler

public QuaquaTextCursorHandler()
Method Detail

getInstance

public static QuaquaTextCursorHandler getInstance()
Returns the shared instance of the handler.


installListeners

public void installListeners(javax.swing.text.JTextComponent c)

uninstallListeners

public void uninstallListeners(javax.swing.text.JTextComponent c)

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

keyTyped

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

keyPressed

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

keyReleased

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

Copyright 2003-2007 (c) Werner Randelshofer.
All rights reserved.