Class FileSelector

    • Constructor Detail

      • FileSelector

        public FileSelector​(String initialValue,
                            String fileChooserTitle,
                            int selectionMode)
        Creates a new FileSelector.
        Parameters:
        initialValue - filename initially displayed in the text field
        fileChooserTitle - title of the JFileChooser launched when the user clicks Browse
        selectionMode - Can be either JFileChooser.FILES_ONLY, JFileChooser.DIRECTORIES_ONLY or JFileChooser.FILES_AND_DIRECTORIES
      • FileSelector

        public FileSelector​(String initialValue,
                            String fileChooserTitle,
                            int selectionMode,
                            File currentDir)
        Creates a new FileSelector.
        Parameters:
        initialValue - filename initially displayed in the text field
        fileChooserTitle - title of the JFileChooser launched when the user clicks Browse
        selectionMode - Can be either JFileChooser.FILES_ONLY, JFileChooser.DIRECTORIES_ONLY or JFileChooser.FILES_AND_DIRECTORIES
        currentDir - default directory for the file chooser
      • FileSelector

        public FileSelector​(String initialValue,
                            String fileChooserTitle,
                            int selectionMode,
                            File currentDir,
                            FileFilter filter)
        Creates a new FileSelector.
        Parameters:
        initialValue - filename initially displayed in the text field
        fileChooserTitle - title of the JFileChooser launched when the user clicks Browse
        selectionMode - Can be either JFileChooser.FILES_ONLY, JFileChooser.DIRECTORIES_ONLY or JFileChooser.FILES_AND_DIRECTORIES
        currentDir - default directory for the file chooser
        filter - file filter used by the file chooser
    • Method Detail

      • getSelected

        public String getSelected()
      • setSelected

        public void setSelected​(String s)
      • setEnabled

        public void setEnabled​(boolean onOff)
        Overrides:
        setEnabled in class JComponent
      • clear

        public void clear()
      • getFileChooser

        protected JFileChooser getFileChooser()
        Get the File Chooser user when the Browse button is clicked. This is lazily created when needed, because of issue UIMA-231.
        Returns:
        the file chooser