public class OpenRecentMenu extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
OpenRecentMenu.FileSelectedListener
Notification of the selection of an item from the
OpenRecentMenu . |
Constructor and Description |
---|
OpenRecentMenu(int size)
Create a new open recent menu.
|
Modifier and Type | Method and Description |
---|---|
void |
addDocument(File doc)
Adds a document to all open recent menus managed by this instance.
|
JMenu |
createMenu(OpenRecentMenu.FileSelectedListener listener)
Creates a new open recent menu which takes the specified action if an entry is selected.
|
void |
removeMenu(JMenu menu)
Removes a menu generated by
createMenu from the list of managed menus. |
public OpenRecentMenu(int size)
listener
- The listener is notified if the user selects an entry from the open recent menu.size
- Maximum number of entries the menu will show.public JMenu createMenu(OpenRecentMenu.FileSelectedListener listener)
addDocument
will be
reflected in the menu.listener
- Will be notified when an entry from the menu is selected.public void removeMenu(JMenu menu)
createMenu
from the list of managed menus.menu
- The menu to removed.public void addDocument(File doc)
doc
- Document to add.Copyright © 2001-2013 the JGloss developers. All Rights Reserved.