nu.zoom.swing.desktop.component.filechooser.impl
Class FileChooserImpl

java.lang.Object
  extended by nu.zoom.swing.desktop.component.filechooser.impl.FileChooserImpl
All Implemented Interfaces:
FileChooser

public class FileChooserImpl
extends Object
implements FileChooser

Author:
Johan Maasing

Constructor Summary
FileChooserImpl(Workbench workbench, Preferences preferences, String preferencesKey, String filterDescription, List<String> fileNamePatterns)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileChooserImpl

public FileChooserImpl(Workbench workbench,
                       Preferences preferences,
                       String preferencesKey,
                       String filterDescription,
                       List<String> fileNamePatterns)
Method Detail

setMenu

public void setMenu(StringMenu<File> menu)
Description copied from interface: FileChooser
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.

Specified by:
setMenu in interface FileChooser
Parameters:
menu - The menu to update. May be null.
See Also:
StringMenuItem

openFile

public File openFile()
Description copied from interface: FileChooser
Pops up the FileChooser in open mode.

Specified by:
openFile in interface FileChooser
Returns:
The selected file, null if the user aborted or there was an error.

saveFile

public File saveFile()
Description copied from interface: FileChooser
Pops up the FileChooser in save mode.

Specified by:
saveFile in interface FileChooser
Returns:
The selected file, null if the user aborted or there was an error.


Copyright © 2011. All Rights Reserved.