Class TrailFileChooser

  • All Implemented Interfaces:
    adams.gui.chooser.FileChooser, ImageObserver, MenuContainer, Serializable, Accessible

    public class TrailFileChooser
    extends adams.gui.chooser.AbstractDataContainerFileChooser<Trail,​adams.data.io.input.AbstractDataContainerReader<Trail>,​adams.data.io.output.AbstractDataContainerWriter<Trail>>
    A specialized JFileChooser that lists all available file Readers and Writers for trails.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • TrailFileChooser

        public TrailFileChooser()
        Constructs a FileChooser pointing to the user's default directory.
      • TrailFileChooser

        public TrailFileChooser​(File currentDirectory)
        Constructs a FileChooser using the given File as the path.
        Parameters:
        currentDirectory - the path to start in
      • TrailFileChooser

        public TrailFileChooser​(String currentDirectory)
        Constructs a FileChooser using the given path.
        Parameters:
        currentDirectory - the path to start in
    • Method Detail

      • getDefaultReader

        protected adams.data.io.input.AbstractDataContainerReader<Trail> getDefaultReader()
        Returns the default reader.
        Specified by:
        getDefaultReader in class adams.gui.chooser.AbstractConfigurableExtensionFileFilterFileChooser<adams.data.io.input.AbstractDataContainerReader<Trail>,​adams.data.io.output.AbstractDataContainerWriter<Trail>>
        Returns:
        the default reader
      • getDefaultWriter

        protected adams.data.io.output.AbstractDataContainerWriter<Trail> getDefaultWriter()
        Returns the default writer.
        Specified by:
        getDefaultWriter in class adams.gui.chooser.AbstractConfigurableExtensionFileFilterFileChooser<adams.data.io.input.AbstractDataContainerReader<Trail>,​adams.data.io.output.AbstractDataContainerWriter<Trail>>
        Returns:
        the default writer
      • getReaderClass

        protected Class getReaderClass()
        Returns the reader superclass for the GOE.
        Specified by:
        getReaderClass in class adams.gui.chooser.AbstractConfigurableExtensionFileFilterFileChooser<adams.data.io.input.AbstractDataContainerReader<Trail>,​adams.data.io.output.AbstractDataContainerWriter<Trail>>
        Returns:
        the reader class
      • getWriterClass

        protected Class getWriterClass()
        Returns the writer superclass for the GOE.
        Specified by:
        getWriterClass in class adams.gui.chooser.AbstractConfigurableExtensionFileFilterFileChooser<adams.data.io.input.AbstractDataContainerReader<Trail>,​adams.data.io.output.AbstractDataContainerWriter<Trail>>
        Returns:
        the writer class
      • doInitializeFilters

        protected void doInitializeFilters()
        Performs the actual initialization of the filters.
        Specified by:
        doInitializeFilters in class adams.gui.chooser.AbstractConfigurableExtensionFileFilterFileChooser<adams.data.io.input.AbstractDataContainerReader<Trail>,​adams.data.io.output.AbstractDataContainerWriter<Trail>>
      • getReaderForFile

        public adams.data.io.input.AbstractDataContainerReader<Trail> getReaderForFile​(File file)
        Returns the reader for the specified file.
        Parameters:
        file - the file to determine a reader for
        Returns:
        the reader, null if none found
      • getWriterForFile

        public adams.data.io.output.AbstractDataContainerWriter<Trail> getWriterForFile​(File file)
        Returns the writer for the specified file.
        Parameters:
        file - the file to determine a reader for
        Returns:
        the writer, null if none found