Package com.sun.javatest.tool
Class FileHistory.Listener
java.lang.Object
com.sun.javatest.tool.FileHistory.Listener
- All Implemented Interfaces:
EventListener
,MenuListener
- Enclosing class:
FileHistory
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 Summary
ConstructorsConstructorDescriptionListener
(int o, ActionListener l) Create a Listener that can be used to dynamically add the latest entries from a FileHistory onto a menu.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.Create a Listener that can be used to dynamically add the latest entries from a FileHistory onto a menu. -
Method Summary
Modifier and TypeMethodDescriptionGet the FileHistory object from which to obtain the dynamic menu entries.void
void
void
void
Specify the FileHistory object from which to obtain the dynamic menu entries.
-
Constructor Details
-
Listener
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
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
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
-
getFileHistory
Get the FileHistory object from which to obtain the dynamic menu entries.- Returns:
- the FileHistory object from which to obtain the dynamic menu entries
- See Also:
-
setFileHistory
Specify the FileHistory object from which to obtain the dynamic menu entries.- Parameters:
h
- the FileHistory object from which to obtain the dynamic menu entries- See Also:
-