org.osm2world.viewer.view
public class RecentFilesUpdater extends Object implements PreferenceChangeListener
Constructor and Description |
---|
RecentFilesUpdater(JMenu recentFilesMenu,
Function<File,ActionListener> actionForFile)
creates the updater, registers it as a listener
and builds the initial content of the menu
|
Modifier and Type | Method and Description |
---|---|
static void |
addRecentFile(File newFile)
adds a file to the persistently stored list of recent files.
|
void |
preferenceChange(PreferenceChangeEvent e) |
public RecentFilesUpdater(JMenu recentFilesMenu, Function<File,ActionListener> actionForFile)
actionForFile
- function creating the listener for opening a particular filepublic void preferenceChange(PreferenceChangeEvent e)
preferenceChange
in interface PreferenceChangeListener
public static void addRecentFile(File newFile)