Back to index

wims  3.65+svn20090927
MyList.java
Go to the documentation of this file.
00001 package rene.gui;
00002 
00003 import java.awt.event.ActionEvent;
00004 import java.awt.event.KeyEvent;
00005 import java.awt.event.KeyListener;
00006 
00007 public class MyList extends java.awt.List
00008        implements KeyListener
00009 {      public MyList (int n)
00010        {      super(n);
00011               if (Global.NormalFont!=null) setFont(Global.NormalFont);
00012               if (Global.Background!=null) setBackground(Global.Background);
00013               addKeyListener(this);
00014        }
00015        public void keyPressed (KeyEvent e) {}
00016        public void keyReleased (KeyEvent e)
00017        {      if (e.getKeyCode()==KeyEvent.VK_SPACE)
00018               {      processActionEvent(new ActionEvent(this,
00019                             ActionEvent.ACTION_PERFORMED,""));
00020               }
00021        }
00022        public void keyTyped (KeyEvent e) {}
00023 }