## org.gnu.gtk
Class FileSelection

    java.lang.Object
      org.gnu.glib.Struct
          org.gnu.glib.GObject
              org.gnu.gtk.GtkObject
                  org.gnu.gtk.Widget
                      org.gnu.gtk.Container
                          org.gnu.gtk.Bin
                              org.gnu.gtk.Window
                                  org.gnu.gtk.Dialog
                                      org.gnu.gtk.FileSelection

public class FileSelection
extends Dialog

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.

Constructor Summary
`FileSelection(org.gnu.glib.Handle handle)` Construct a FileSelection using a handle to a native resource.
`FileSelection(java.lang.String title)` construct a new FileSelection dialog.

Method Summary
`void` `complete(java.lang.String pattern)` Will attempt to match `pattern` to a valid filename or subdirectory in the current directory.
`Button` `getCancelButton()` Return the Cancel Button widget for this dialog.
`Widget` `getDirList()` Return the directory list for this widget
`Widget` `getFileList()` Returns the the file list for this widget
`java.lang.String` `getFilename()` Returns the selected filename.
`static FileSelection` `getFileSelection(org.gnu.glib.Handle handle)` Internal static factory method to be used by Java-Gnome only.
`Button` `getHelpButton()` Return the Help Button widget for this dialog.
`Button` `getOKButton()` Return the OK Button widget for this Dialog.
`Widget` `getSelectionEntry()` Returns the selection entry
`java.lang.String[]` `getSelections()` Retrieves the list of file selections the user has made in the dialog box.
`boolean` `getSelectMultiple()` Determines whether or not the user is allowed to select multiple files in the file list.
`static Type` `getType()` Retrieve the runtime type used by the GLib library.
`void` `hideFileopButtons()` Hides the file operation buttons that normally appear at the top of the dialog.
`void` `setFilename(java.lang.String filename)` Sets the default path for the file requestor.
`void` `setSelectMultiple(boolean selectMultiple)` Sets whether the user is allowed to select multiple files in the file list.
`void` `showFileopButtons()` Shows the file operation buttons, if they have previously been hidden.

Methods inherited from class org.gnu.gtk.Dialog
`addButton, addButton, addListener, addWidget, getActionArea, getDialog, getDialogLayout, getEventListenerClass, getEventType, getHasSeparator, getResponseForWidget, removeListener, run, setDefaultResponse, setHasSeparator`

Methods inherited from class org.gnu.gtk.Window

`addAccelGroup, deiconify, destroy, fullscreen, getAcceptFocus, getDefaultIconList, getFocusOnMap, getFocusWidget, getGravity, getIcon, getIconList, getIconName, getPosition, getScreen, getSize, getSkipPagerHint, getSkipTaskbarHint, getTitle, getTransientParent, getWindow, hasToplevelFocus, iconify, isActive, isDestroyed, listToplevelWindows, maximize, move, present, removeAccelGroup, resize, setAcceptFocus, setAutoStartupNotification, setDecorated, setDefaultIcon, setDefaultIconFromFile, setDefaultIconList, setDefaultIconName, setDefaultSize, setDefaultWidget, setFocusOnMap, setFocusWidget, setGeometryHints, setGravity, setIcon, setIconFromFile, setIconList, setIconName, setKeepAbove, setKeepBelow, setModal, setPosition, setResizable, setScreen, setSkipPagerHint, setSkipTaskbarHint, setTitle, setTransientParent, stick, unfullscreen, unmaximize, unstick`

Methods inherited from class org.gnu.gtk.Bin
`getChild`

Methods inherited from class org.gnu.gtk.Container
`add, addListener, getBorderWidth, getChildren, getResizeMode, remove, removeListener, resizeChildren, setBorderWidth, setResizeMode`

Methods inherited from class org.gnu.gtk.Widget

`activate, addAccelerator, addEvents, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, addListener, canActivateAccel, createContext, createLayout, draw, drawArea, drawArea, finish, getAccessible, getColormap, getContext, getData, getDisplay, getDragData, getExtensionEvents, getModifierStyle, getName, getParent, getParentWindow, getPointer, getRootWindow, getSensitive, getStyle, getToplevel, getWidget, getWindow, grabDefault, grabFocus, hasFocus, hasScreen, hide, hideAll, highlight, highlight, intersect, isAncestor, makeWidget, modifyStyle, popColormap, pushColormap, realize, removeAccelerator, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, reparent, setBackgroundColor, setBaseColor, setColormap, setDoubleBuffered, setDragDestination, setDragIcon, setDragIconPixbuf, setDragIconStock, setDragSource, setEvents, setExtensionEvents, setFont, setForegroundColor, setMinimumSize, setName, setNoDragDestination, setNoDragSource, setSensitive, setTextColor, shapeCombineMask, show, showAll, unHighlight, unHighlight`

Methods inherited from class org.gnu.gtk.GtkObject
`sink`

Methods inherited from class org.gnu.glib.GObject

`addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify`

Methods inherited from class org.gnu.glib.Struct
`equals, getHandle, getNullHandle, hashCode`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FileSelection

    public FileSelection(java.lang.String title)

  construct a new FileSelection dialog.

Parameters:
  `title` - The string that is displayed in the title bar of the dialog.

### FileSelection

    public FileSelection(org.gnu.glib.Handle handle)

  Construct a FileSelection using a handle to a native resource.

Method Detail

### getFileSelection

    public static FileSelection getFileSelection(org.gnu.glib.Handle handle)

  Internal static factory method to be used by Java-Gnome only.

### setFilename

    public void setFilename(java.lang.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.

  Parameters:
    `filename` - The default path for the widget.

### getFilename

    public java.lang.String getFilename()

  Returns the selected filename.

  Returns:
    The file that is selected in the dialog.

### complete

    public void complete(java.lang.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.

  Parameters:
    `pattern` - The pattern to use for matching.

### 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.

### hideFileopButtons

    public void hideFileopButtons()

  Hides the file operation buttons that normally appear at the top of the dialog.

### getOKButton

    public Button getOKButton()

  Return the OK Button widget for this Dialog.

  Returns:
    The OK Button.

### getCancelButton

    public Button getCancelButton()

  Return the Cancel Button widget for this dialog.

  Returns:
    The Cancel Button.

### getHelpButton

    public Button getHelpButton()

  Return the Help Button widget for this dialog.

  Returns:
    The Help Button.

### getDirList

    public Widget getDirList()

  Return the directory list for this widget

  Returns:
    The Directory List

### getFileList

    public Widget getFileList()

  Returns the the file list for this widget

  Returns:
    The File List

### getSelectionEntry

    public Widget getSelectionEntry()

  Returns the selection entry

  Returns:
    selection entry

### getSelections

    public java.lang.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.

### 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.

### getSelectMultiple

    public boolean getSelectMultiple()

  Determines whether or not the user is allowed to select multiple files in the file list.

  See Also:
    `setSelectMultiple(boolean)`

### getType

    public static Type getType()

  Retrieve the runtime type used by the GLib library.