Extension SDK 10.1.2

oracle.ide.controls
Class KeyNavigationManager

java.lang.Object
  extended byoracle.ide.controls.KeyNavigationManager
All Implemented Interfaces:
java.awt.event.ComponentListener, java.util.EventListener, java.awt.event.FocusListener, java.awt.event.MouseListener

public class KeyNavigationManager
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.ComponentListener, java.awt.event.FocusListener

Handles the incremental search and the tooltip on a component.

To use this class on a JTree for example, you must create a TreeKeyAdapter and extend JTree to override processKeyEvent().

 public class MyTree extends JTree
 {
   protected KeyNavigationManager _knm;
 
   public MyTree()
   {
     _knm = new KeyNavigationManager(
                new KeyNavigationManager.TreeKeyAdapter( this ) );
   }
 
   protected void processKeyEvent( KeyEvent e )
   {
     if (_knm != null)
     {
       _knm.preProcessKeyEvent( e );
     }
     
     super.processKeyEvent( e );
     
     if (_knm != null)
     {
       _knm.postProcessKeyEvent( e );
     }
   }
 
 }


Nested Class Summary
static interface KeyNavigationManager.KeyComponentAdapter
           
static class KeyNavigationManager.ListKeyAdapter
           
static class KeyNavigationManager.TableKeyAdapter
           
static class KeyNavigationManager.TreeKeyAdapter
           
 
Constructor Summary
KeyNavigationManager()
           
KeyNavigationManager(KeyNavigationManager.KeyComponentAdapter kca)
           
 
Method Summary
 void componentHidden(java.awt.event.ComponentEvent e)
           
 void componentMoved(java.awt.event.ComponentEvent e)
           
 void componentResized(java.awt.event.ComponentEvent e)
           
 void componentShown(java.awt.event.ComponentEvent e)
           
static javax.swing.JTree createNavigableTree()
           
 void focusGained(java.awt.event.FocusEvent e)
           
 void focusLost(java.awt.event.FocusEvent e)
           
 KeyNavigationManager.KeyComponentAdapter getKeyComponentAdapter()
           
 void mouseClicked(java.awt.event.MouseEvent e)
          Invoked when the mouse has been clicked on a component.
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void postKeyPressed(java.awt.event.KeyEvent e)
          Invoked when a key has been pressed after the listeners and key bindings
 void postKeyReleased(java.awt.event.KeyEvent e)
          Invoked when a key has been released after the listeners and key bindings
 void postKeyTyped(java.awt.event.KeyEvent e)
          Invoked when a key has been typed after the listeners and key bindings
 void postProcessKeyEvent(java.awt.event.KeyEvent e)
           
 void preKeyPressed(java.awt.event.KeyEvent e)
          Invoked when a key has been pressed before the listeners and key bindings
 void preKeyReleased(java.awt.event.KeyEvent e)
          Invoked when a key has been released before the listeners and key bindings
 void preKeyTyped(java.awt.event.KeyEvent e)
          Invoked when a key has been typed before the listeners and key bindings
 void preProcessKeyEvent(java.awt.event.KeyEvent e)
           
 void setKeyComponentAdapter(KeyNavigationManager.KeyComponentAdapter kca)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyNavigationManager

public KeyNavigationManager()

KeyNavigationManager

public KeyNavigationManager(KeyNavigationManager.KeyComponentAdapter kca)
Method Detail

setKeyComponentAdapter

public void setKeyComponentAdapter(KeyNavigationManager.KeyComponentAdapter kca)

getKeyComponentAdapter

public KeyNavigationManager.KeyComponentAdapter getKeyComponentAdapter()

preProcessKeyEvent

public void preProcessKeyEvent(java.awt.event.KeyEvent e)

postProcessKeyEvent

public void postProcessKeyEvent(java.awt.event.KeyEvent e)

preKeyTyped

public void preKeyTyped(java.awt.event.KeyEvent e)
Invoked when a key has been typed before the listeners and key bindings


postKeyTyped

public void postKeyTyped(java.awt.event.KeyEvent e)
Invoked when a key has been typed after the listeners and key bindings


preKeyPressed

public void preKeyPressed(java.awt.event.KeyEvent e)
Invoked when a key has been pressed before the listeners and key bindings


postKeyPressed

public void postKeyPressed(java.awt.event.KeyEvent e)
Invoked when a key has been pressed after the listeners and key bindings


preKeyReleased

public void preKeyReleased(java.awt.event.KeyEvent e)
Invoked when a key has been released before the listeners and key bindings


postKeyReleased

public void postKeyReleased(java.awt.event.KeyEvent e)
Invoked when a key has been released after the listeners and key bindings


mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse has been clicked on a component.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Specified by:
focusLost in interface java.awt.event.FocusListener

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Specified by:
focusGained in interface java.awt.event.FocusListener

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
Specified by:
componentResized in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
Specified by:
componentShown in interface java.awt.event.ComponentListener

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
Specified by:
componentHidden in interface java.awt.event.ComponentListener

createNavigableTree

public static javax.swing.JTree createNavigableTree()

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.