nu.zoom.swing.desktop.component.filechooser
Interface FileChooser

All Known Implementing Classes:
FileChooserImpl

public interface FileChooser

A JFileChooser wrapper that rememebers the last location the user opened a file from. The next time open or save is called the filechooser will start in the same directory. Keeps a list of last opened/saved files. This list can be used to for example build a quick-open menu.

Version:
$Revision: $
Author:
$Author: $

Method Summary
 File openFile()
          Pops up the FileChooser in open mode.
 File saveFile()
          Pops up the FileChooser in save mode.
 void setMenu(StringMenu<File> menu)
          The filechooser will update this menu when a file is selected.
 

Method Detail

setMenu

void setMenu(StringMenu<File> menu)
The filechooser will update this menu when a file is selected. The menu will have an item with the file name (truncated to 20 characters) and a File object as the value.

Parameters:
menu - The menu to update. May be null.
See Also:
StringMenuItem

openFile

File openFile()
Pops up the FileChooser in open mode.

Returns:
The selected file, null if the user aborted or there was an error.

saveFile

File saveFile()
Pops up the FileChooser in save mode.

Returns:
The selected file, null if the user aborted or there was an error.


Copyright © 2011. All Rights Reserved.