Package picasso.util

Class FileCommand<T>

  • All Implemented Interfaces:
    Command<T>
    Direct Known Subclasses:
    Reader, Writer

    public abstract class FileCommand<T>
    extends Object
    implements Command<T>
    An abstract command that allows access to the file system through a JFileChooser dialog box. Child classes determine what to do with the file once it is chosen.
    • Constructor Detail

      • FileCommand

        public FileCommand​(int dialogType)
        Create command that will pop-up the given type of JFileChooser dialog
        Parameters:
        dialogType - the type of dialog (see JFileChooser constants)
    • Method Detail

      • getFileName

        protected String getFileName()
        Pops up the appropriate file dialog box. Returns the name of the file chosen by the user or null if no file chosen.
        Returns:
        the name of the file chosen by the user or null if no file chosen.