Package picasso.util

Class FileCommand<T>

java.lang.Object
picasso.util.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.
Author:
Robert C Duvall
  • Field Details

    • ourChooser

      private static final JFileChooser ourChooser
    • myDialogType

      private int myDialogType
  • Constructor Details

    • 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 Details

    • 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.