com.togethersoft.openapi.ide.window
Interface IdeFileChooser


public interface IdeFileChooser
extends IdePathChooser

IdeFileChooser provides a simple mechanism for the user to choose a file.

As of Together 5.0 IdeFileChooser is separated into two interfaces:
IdePathChooser and extending it IdeFileChooser. Many of this
interface methods have been transferred to the superinterface.

Author:
TogetherSoft
Since: Together 3.0
See Also: IdePathChooser

Method Summary
 voidaddChoosableFileFilter(FileFilter filter)
          Adds a filter to the list of user choosable file filters.
 FileFiltergetAcceptAllFileFilter()
          Returns the AcceptAll file filter.
 FileFilter[]getChoosableFileFilters()
          Gets the list of the file filters that can be chosen by the user.
 intgetDialogType()
          Returns the type of this dialog.
 booleanremoveChoosableFileFilter(FileFilter f)
          Removes specified filter from the list of user choosable file filters.
 voidresetChoosableFileFilters()
          Resets the choosable file filter list to it's initial state.
 voidsetDialogType(int dialogType)
          Sets the type of this dialog.

Methods inherited from interface com.togethersoft.openapi.ide.window.IdePathChooser
getApproveButtonText, getCurrentDirectory, getDialogTitle, getFileFilter, getFileSelectionMode, getSelectedFile, getSelectedFiles, isFileHidingEnabled, isMultiSelectionEnabled, setApproveButtonText, setCurrentDirectory, setDialogTitle, setFileFilter, setFileHidingEnabled, setFileSelectionMode, setMultiSelectionEnabled, setSelectedFile, setSelectedFiles, showDialog

Method Detail

addChoosableFileFilter

public void addChoosableFileFilter(FileFilter filter)
Adds a filter to the list of user choosable file filters.
Parameters:
filter FileFilter to be added to the choosable file filter list
See Also:
getChoosableFileFilters(), removeChoosableFileFilter(javax.swing.filechooser.FileFilter), resetChoosableFileFilters()

getAcceptAllFileFilter

public FileFilter getAcceptAllFileFilter()
Returns the AcceptAll file filter. (For example, (All Files *.*) on windows).
Returns: FileFilter AcceptAll

getChoosableFileFilters

public FileFilter[] getChoosableFileFilters()
Gets the list of the file filters that can be chosen by the user.
Returns: FileFilter[] array containing the all choosable file filters
See Also:
addChoosableFileFilter(javax.swing.filechooser.FileFilter), removeChoosableFileFilter(javax.swing.filechooser.FileFilter), resetChoosableFileFilters()

getDialogType

public int getDialogType()
Returns the type of this dialog.
Returns: int identifier of the dialog type: OPEN_DIALOG, SAVE_DIALOG, CUSTOM_DIALOG
See Also:
setDialogType(int), IdeFileChooserConstant

removeChoosableFileFilter

public boolean removeChoosableFileFilter(FileFilter f)
Removes specified filter from the list of user choosable file filters. Returns
true if the file filter was successfully deleted.
Parameters:
f FileFilter to be deleted
Returns: true if this filter is successfully deleted
See Also:
addChoosableFileFilter(javax.swing.filechooser.FileFilter), getChoosableFileFilters(), resetChoosableFileFilters()

resetChoosableFileFilters

public void resetChoosableFileFilters()
Resets the choosable file filter list to it's initial state. Normally,
this removes all added file filters while leaving the AcceptAll file filter.
See Also:
addChoosableFileFilter(javax.swing.filechooser.FileFilter), getChoosableFileFilters(), removeChoosableFileFilter(javax.swing.filechooser.FileFilter)

setDialogType

public void setDialogType(int dialogType)
Sets the type of this dialog. Use OPEN_DIALOG when you want to
bring up a filechooser that the user can use to open a file. Likewise,
use SAVE_DIALOG for letting the user choose a file for saving.
Use CUSTOM_DIALOG when you want to use the filechooser in a context
other than "Open" or "Save". For instance, you might want to bring up
a filechooser that allows the user to choose a file to execute.
Parameters:
dialogType int type of the dialog to be displayed: OPEN_DIALOG, SAVE_DIALOG, CUSTOM_DIALOG
See Also:
getDialogType(), IdePathChooser.setApproveButtonText(java.lang.String), IdeFileChooserConstant