org.kaiwitte.workbench.ui.controller
Class ReturnKeyRemapper

java.lang.Object
  extended by org.kaiwitte.workbench.ui.controller.ReturnKeyRemapper

public final class ReturnKeyRemapper
extends java.lang.Object

Remaps the enter-key. For any JComponent it makes the enter-key focus on the next registered JComponent. For any JButton it calls its Action in addition.


Constructor Summary
ReturnKeyRemapper()
          Creates a new instance.
 
Method Summary
 void remap(javax.swing.JComponent component)
          Remaps the enter-key for component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReturnKeyRemapper

public ReturnKeyRemapper()
Creates a new instance.

Method Detail

remap

public void remap(javax.swing.JComponent component)
Remaps the enter-key for component. Pressing enter on it results in the next component (registered with the following call of this method) to be focused if there is such a component.

Parameters:
component - the component
Throws:
java.lang.NullPointerException - iff component == null