public static class FileHistory.Listener
extends java.lang.Object
implements javax.swing.event.MenuListener
addMenuListener
.Constructor and Description |
---|
Listener(java.awt.event.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,
java.awt.event.ActionListener l)
Create a Listener that can be used to dynamically add the
latest entries from a FileHistory onto a menu.
|
Listener(int o,
java.awt.event.ActionListener l)
Create a Listener that can be used to dynamically add the
latest entries from a FileHistory onto a menu.
|
Modifier and Type | Method and Description |
---|---|
FileHistory |
getFileHistory()
Get the FileHistory object from which to obtain the dynamic menu
entries.
|
void |
menuCanceled(javax.swing.event.MenuEvent e) |
void |
menuDeselected(javax.swing.event.MenuEvent e) |
void |
menuSelected(javax.swing.event.MenuEvent e) |
void |
setFileHistory(FileHistory h)
Specify the FileHistory object from which to obtain the dynamic menu
entries.
|
public Listener(java.awt.event.ActionListener l)
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.public Listener(int o, java.awt.event.ActionListener l)
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.public Listener(FileHistory h, int o, java.awt.event.ActionListener l)
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.public FileHistory getFileHistory()
setFileHistory(com.sun.javatest.tool.FileHistory)
public void setFileHistory(FileHistory h)
h
- the FileHistory object from which to obtain the dynamic menu
entriesgetFileHistory()
public void menuSelected(javax.swing.event.MenuEvent e)
menuSelected
in interface javax.swing.event.MenuListener
public void menuDeselected(javax.swing.event.MenuEvent e)
menuDeselected
in interface javax.swing.event.MenuListener
public void menuCanceled(javax.swing.event.MenuEvent e)
menuCanceled
in interface javax.swing.event.MenuListener
Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.