Class FileHistory.Listener

java.lang.Object
com.sun.javatest.tool.FileHistory.Listener
All Implemented Interfaces:
EventListener, MenuListener
Enclosing class:
FileHistory

public static class FileHistory.Listener extends Object implements MenuListener
A class that will dynamically add the latest entries for a FileHistory onto a menu. To do this, an instance of this class should be added to the menu with addMenuListener.
  • Constructor Details

    • Listener

      public Listener(ActionListener l)
      Create a Listener that can be used to dynamically add the latest entries from a FileHistory onto a menu. The dynamic entries will be added to the end of the menu when it is selected. Any previous values added by this listener will automatically be removed.
      Parameters:
      l - An ActionListener that will be notified when any of the dynamic menu entries are invoked. When this action listener is notified, the action command will be the path of the file. The corresponding File object will be registered on the source as a client property named FILE.
    • Listener

      public Listener(int o, ActionListener l)
      Create a Listener that can be used to dynamically add the latest entries from a FileHistory onto a menu. Any previous values added by this listener will automatically be removed.
      Parameters:
      o - The position in the menu at which to insert the dynamic entries.
      l - An ActionListener that will be notified when any of the dynamic menu entries are invoked. When this action listener is notified, the action command will be the path of the file. The corresponding File object will be registered on the source as a client property named FILE.
    • Listener

      public Listener(FileHistory h, int o, ActionListener l)
      Create a Listener that can be used to dynamically add the latest entries from a FileHistory onto a menu. Any previous values added by this listener will automatically be removed.
      Parameters:
      h - The FileHistory from which to determine the entries to be added.
      o - The position in the menu at which to insert the dynamic entries.
      l - An ActionListener that will be notified when any of the dynamic menu entries are invoked. When this action listener is notified, the action command will be the path of the file. The corresponding File object will be registered on the source as a client property named FILE.
  • Method Details