From: Glen O. <gle...@us...> - 2003-03-29 16:44:47
|
Update of /cvsroot/jmri/jmri/jmrit/throttle In directory sc8-pr-cvs1:/tmp/cvs-serv2004 Modified Files: FunctionPanel.java Log Message: Started work on keyboard controls Index: FunctionPanel.java =================================================================== RCS file: /cvsroot/jmri/jmri/jmrit/throttle/FunctionPanel.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** FunctionPanel.java 25 Mar 2003 15:55:23 -0000 1.11 --- FunctionPanel.java 29 Mar 2003 16:44:44 -0000 1.12 *************** *** 3,6 **** --- 3,7 ---- import javax.swing.*; import java.awt.*; + import java.awt.event.KeyListener; import jmri.DccThrottle; import jmri.ThrottleListener; *************** *** 130,133 **** --- 131,144 ---- } + public void addExternalKeyListener(KeyListener k) + { + this.addKeyListener(k); + this.getContentPane().addKeyListener(k); + for (int i=0; i<NUM_FUNCTION_BUTTONS; i++) + { + functionButton[i].addKeyListener(k); + } + } + /** * Place and initialize all the buttons. |