javax.swing.plaf.basic

Class BasicTreeUI.KeyHandler

public class BasicTreeUI.KeyHandler extends KeyAdapter

This is used to get multiple key down events to appropriately genereate events.
Field Summary
protected booleanisKeyDown
Set to true while keyPressed is active
protected ActionrepeatKeyAction
Key code that is being generated for.
Constructor Summary
KeyHandler()
Constructor
Method Summary
voidkeyPressed(KeyEvent e)
Invoked when a key has been pressed.
voidkeyReleased(KeyEvent e)
Invoked when a key has been released
voidkeyTyped(KeyEvent e)
Invoked when a key has been typed.

Field Detail

isKeyDown

protected boolean isKeyDown
Set to true while keyPressed is active

repeatKeyAction

protected Action repeatKeyAction
Key code that is being generated for.

Constructor Detail

KeyHandler

public KeyHandler()
Constructor

Method Detail

keyPressed

public void keyPressed(KeyEvent e)
Invoked when a key has been pressed.

Parameters: e the key pressed

keyReleased

public void keyReleased(KeyEvent e)
Invoked when a key has been released

Parameters: e the key released

keyTyped

public void keyTyped(KeyEvent e)
Invoked when a key has been typed. Moves the keyboard focus to the first element whose first letter matches the alphanumeric key pressed by the user. Subsequent same key presses move the keyboard focus to the next object that starts with the same letter.

Parameters: e the key typed