Class DatasetFileChooserPanel

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.io.AbsolutePathSupporter, ImageObserver, MenuContainer, Serializable, Accessible

    public class DatasetFileChooserPanel
    extends adams.gui.chooser.FileChooserPanel
    A panel that contains a text field with the current file and a button for bringing up a ConverterFileChooser.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    ConverterFileChooser, Serialized Form
    • Field Detail

      • m_FileChooser

        protected WekaFileChooser m_FileChooser
        the filechooser for selecting the dataset.
      • m_Loader

        protected weka.core.converters.AbstractFileLoader m_Loader
        the current loader.
      • m_Saver

        protected weka.core.converters.AbstractFileSaver m_Saver
        the current saver.
    • Constructor Detail

      • DatasetFileChooserPanel

        public DatasetFileChooserPanel()
        Initializes the panel with no file.
      • DatasetFileChooserPanel

        public DatasetFileChooserPanel​(String path)
        Initializes the panel with the given filename/directory.
        Parameters:
        path - the filename/directory to use
      • DatasetFileChooserPanel

        public DatasetFileChooserPanel​(File path)
        Initializes the panel with the given filename/directory.
        Parameters:
        path - the filename/directory to use
    • Method Detail

      • initializeConverters

        protected void initializeConverters​(File path)
        Initializes the converters.
        Parameters:
        path - the path/filename to use
      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class adams.gui.chooser.FileChooserPanel
      • doChoose

        protected File doChoose()
        Performs the actual choosing of an object.
        Overrides:
        doChoose in class adams.gui.chooser.FileChooserPanel
        Returns:
        the chosen object or null if none chosen
      • getLoader

        public weka.core.converters.AbstractFileLoader getLoader()
        Returns the current loader. Only initialized after the user selected a file with the filechooser.
        Returns:
        the loader
      • getSaver

        public weka.core.converters.AbstractFileSaver getSaver()
        Returns the current saver. Only initialized after the user selected a file with the filechooser.
        Returns:
        the saver
      • setCurrentDirectory

        public void setCurrentDirectory​(File value)
        Sets the current directory to use for the file chooser.
        Overrides:
        setCurrentDirectory in class adams.gui.chooser.FileChooserPanel
        Parameters:
        value - the current directory
      • getCurrentDirectory

        public File getCurrentDirectory()
        Returns the current directory in use by the file chooser.
        Overrides:
        getCurrentDirectory in class adams.gui.chooser.FileChooserPanel
        Returns:
        the current directory
      • setCurrent

        public boolean setCurrent​(File value)
        Sets the current value.
        Overrides:
        setCurrent in class adams.gui.chooser.FileChooserPanel
        Parameters:
        value - the value to use, can be null