de.esprit.common.gui.comp

## Class FileInput

- java.lang.Object
- - de.esprit.common.gui.comp.AbstractFileIO
  - - de.esprit.common.gui.comp.FileInput

-     public class FileInput
      extends AbstractFileIO

  This class manages a current working directory as well as a current filename. It pops up a JFileChooser for file browsing. The default current working directory is the home directory of the user.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileInput(java.awt.Component hook, CurrentFileHolder fileHolder)`
    `FileInput(java.awt.Component hook, java.io.File startDir, javax.swing.filechooser.FileFilter fileFilt)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.io.File` | `getInputFile()` Pops up the FileChooser for selecting an input file
    `java.io.File` | `getInputFile(javax.swing.filechooser.FileFilter filter)`
    `java.io.File` | `requestInputFile()` Pops up the FileChooser only if SHIFT or CTRL key is pressed or if the current file is not set

    - ### Methods inherited from class de.esprit.common.gui.comp.AbstractFileIO

      `addDefaultFileFilters, addFileFilter, addFileFilters, clearFileFilters, getCurrentFileFilter, getDirectory, getFile, getFileChooser, getFileFilters, getHomeDir, getStartDir, hasFileFilter, setCurrentFileFilter, setDirectory, setDirectory, setFile, setFileFilter, setFileName, showOpenDialog, showSaveDialog, toString, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FileInput

          public FileInput(java.awt.Component hook,
                   CurrentFileHolder fileHolder)

    - #### FileInput

          public FileInput(java.awt.Component hook,
                   java.io.File startDir,
                   javax.swing.filechooser.FileFilter fileFilt)

  - ### Method Detail

    - #### requestInputFile

          public java.io.File requestInputFile()
                                        throws java.lang.Exception

      Pops up the FileChooser only if SHIFT or CTRL key is pressed or if the current file is not set
      Throws:
        `java.lang.Exception`

    - #### getInputFile

          public java.io.File getInputFile()
                                    throws java.lang.Exception

      Pops up the FileChooser for selecting an input file
      Throws:
        `java.lang.Exception`

    - #### getInputFile

          public java.io.File getInputFile(javax.swing.filechooser.FileFilter filter)
                                    throws java.lang.Exception

      Throws:
        `java.lang.Exception`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.