Logo Search packages:      
Sourcecode: wims version File versions  Download package

MyList.java

package rene.gui;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

public class MyList extends java.awt.List
      implements KeyListener
{     public MyList (int n)
      {     super(n);
            if (Global.NormalFont!=null) setFont(Global.NormalFont);
            if (Global.Background!=null) setBackground(Global.Background);
            addKeyListener(this);
      }
      public void keyPressed (KeyEvent e) {}
      public void keyReleased (KeyEvent e)
      {     if (e.getKeyCode()==KeyEvent.VK_SPACE)
            {     processActionEvent(new ActionEvent(this,
                        ActionEvent.ACTION_PERFORMED,""));
            }
      }
      public void keyTyped (KeyEvent e) {}
}

Generated by  Doxygen 1.6.0   Back to index