The FileSelection widget lists all the files and directories in
the current working directory and enables the user to select one of
the file names. There are a number of navigation controls that
enable the user to browse through the entire file system. There also
are buttons that create directories, delete files, and rename files.
complete
public void complete(String pattern)
Will attempt to match pattern
to a valid filename or subdirectory
in the current directory. If a match can be made the matched filename will appear
in the text entry field in the file selection dialog. If a partial match can be made the
"Files" list will contain those file names which have been partially matched and the
"Directories" list will list those directories which have been partially matched.
pattern
- The pattern to use for matching.
getButtonArea
protected static final Handle getButtonArea(Handle cptr)
getCancelButton
public Button getCancelButton()
Return the Cancel Button widget for this dialog.
- The Cancel Button.
getCancelButton
protected static final Handle getCancelButton(Handle cptr)
getDirList
public Widget getDirList()
Return the directory list for this widget
- The Directory List
getDirList
protected static final Handle getDirList(Handle cptr)
getFileList
public Widget getFileList()
Returns the the file list for this widget
- The File List
getFileList
protected static final Handle getFileList(Handle cptr)
getFilename
public String getFilename()
Returns the selected filename.
- The file that is selected in the dialog.
getHelpButton
public Button getHelpButton()
Return the Help Button widget for this dialog.
- The Help Button.
getHelpButton
protected static final Handle getHelpButton(Handle cptr)
getHistoryMenu
protected static final Handle getHistoryMenu(Handle cptr)
getHistoryPulldown
protected static final Handle getHistoryPulldown(Handle cptr)
getMainVbox
protected static final Handle getMainVbox(Handle cptr)
getOKButton
public Button getOKButton()
Return the OK Button widget for this Dialog.
- The OK Button.
getOkButton
protected static final Handle getOkButton(Handle cptr)
getSelectMultiple
public boolean getSelectMultiple()
Determines whether or not the user is allowed to select
multiple files in the file list.
setSelectMultiple(boolean)
getSelectionEntry
public Widget getSelectionEntry()
Returns the selection entry
- selection entry
getSelectionEntry
protected static final Handle getSelectionEntry(Handle cptr)
getSelectionText
protected static final Handle getSelectionText(Handle cptr)
getSelections
public String[] getSelections()
Retrieves the list of file selections the user has made in the
dialog box. This function is intended for use when the user can
select multiple files in the file list.
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface Dialog
gtk_file_selection_complete
protected static final void gtk_file_selection_complete(Handle filesel,
String pattern)
gtk_file_selection_get_filename
protected static final String gtk_file_selection_get_filename(Handle filesel)
gtk_file_selection_get_type
protected static final int gtk_file_selection_get_type()
gtk_file_selection_hide_fileop_buttons
protected static final void gtk_file_selection_hide_fileop_buttons(Handle filesel)
gtk_file_selection_new
protected static final Handle gtk_file_selection_new(String title)
gtk_file_selection_set_filename
protected static final void gtk_file_selection_set_filename(Handle filesel,
String filename)
gtk_file_selection_show_fileop_buttons
protected static final void gtk_file_selection_show_fileop_buttons(Handle filesel)
hideFileopButtons
public void hideFileopButtons()
Hides the file operation buttons that normally appear at the top of the dialog.
setFilename
public void setFilename(String filename)
Sets the default path for the file requestor. If filename includes a
directory path the requestor will open with that path set as its
current working directory.
filename
- The default path for the widget.
setSelectMultiple
public void setSelectMultiple(boolean selectMultiple)
Sets whether the user is allowed to select multiple files in
the file list. Use
getSelections()
to get
the list of selected files.
showFileopButtons
public void showFileopButtons()
Shows the file operation buttons, if they have previously been hidden. The rest
of the widgets in the dialog will be resized accordingly.