Package ptolemy.plot

Class EditablePlot.UndoListener

  • All Implemented Interfaces:
    java.awt.event.KeyListener, java.util.EventListener
    Enclosing class:
    EditablePlot

    public class EditablePlot.UndoListener
    extends java.lang.Object
    implements java.awt.event.KeyListener
    Control-Z is undo and Control-Y is redo.
    • Constructor Summary

      Constructors 
      Constructor Description
      UndoListener()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void keyPressed​(java.awt.event.KeyEvent e)
      Handle Control, Z or Y being pressed with by calling undo() or redo().
      void keyReleased​(java.awt.event.KeyEvent e)
      Handle Control being released.
      void keyTyped​(java.awt.event.KeyEvent e)
      Ignored by this class.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UndoListener

        public UndoListener()
    • Method Detail

      • keyPressed

        public void keyPressed​(java.awt.event.KeyEvent e)
        Handle Control, Z or Y being pressed with by calling undo() or redo().
        Specified by:
        keyPressed in interface java.awt.event.KeyListener
        Parameters:
        e - The KeyEvent.
      • keyReleased

        public void keyReleased​(java.awt.event.KeyEvent e)
        Handle Control being released.
        Specified by:
        keyReleased in interface java.awt.event.KeyListener
        Parameters:
        e - The KeyEvent.
      • keyTyped

        public void keyTyped​(java.awt.event.KeyEvent e)
        Ignored by this class. The keyTyped method is broken in jdk 1.1.4. It always gets "unknown key code".
        Specified by:
        keyTyped in interface java.awt.event.KeyListener
        Parameters:
        e - Ignored by this method.