org.biojava.spice.gui
Class StructureCommandListener

java.lang.Object
  extended byjava.awt.event.KeyAdapter
      extended byorg.biojava.spice.gui.StructureCommandListener
All Implemented Interfaces:
ActionListener, EventListener, KeyListener, MouseListener

public class StructureCommandListener
extends KeyAdapter
implements ActionListener, MouseListener

A class that listens to various events on the StructureCommand line ( where it is possible to enter RASMOL like commands) and takes care of

  • clearing the selection upon startup
  • tracking the history of entered commands
  • sending the command to the structure panel, once Enter is being pressed.
  • Author:
    Andreas Prlic

    Constructor Summary
    StructureCommandListener(JmolCommander spl, JTextField textfield_)
               
     
    Method Summary
     void actionPerformed(ActionEvent event)
               
     void keyReleased(KeyEvent e)
              takes care of the cursur up/down keys.
     void mouseClicked(MouseEvent e)
               
     void mouseEntered(MouseEvent e)
               
     void mouseExited(MouseEvent e)
               
     void mousePressed(MouseEvent e)
               
     void mouseReleased(MouseEvent e)
               
     
    Methods inherited from class java.awt.event.KeyAdapter
    keyPressed, keyTyped
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    StructureCommandListener

    public StructureCommandListener(JmolCommander spl,
                                    JTextField textfield_)
    Method Detail

    actionPerformed

    public void actionPerformed(ActionEvent event)
    Specified by:
    actionPerformed in interface ActionListener

    mouseClicked

    public void mouseClicked(MouseEvent e)
    Specified by:
    mouseClicked in interface MouseListener

    mouseExited

    public void mouseExited(MouseEvent e)
    Specified by:
    mouseExited in interface MouseListener

    mouseReleased

    public void mouseReleased(MouseEvent e)
    Specified by:
    mouseReleased in interface MouseListener

    mousePressed

    public void mousePressed(MouseEvent e)
    Specified by:
    mousePressed in interface MouseListener

    mouseEntered

    public void mouseEntered(MouseEvent e)
    Specified by:
    mouseEntered in interface MouseListener

    keyReleased

    public void keyReleased(KeyEvent e)
    takes care of the cursur up/down keys. triggers copying of stored commands into the current textfield

    Specified by:
    keyReleased in interface KeyListener