Class ROIFileChooser

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class ROIFileChooser extends JFileChooser
A JFileChooser for choosing region of interest files (files with extension ".roi", or ".zip" for ImageJ ROI files).
See Also:
  • Constructor Details

    • ROIFileChooser

      public ROIFileChooser(boolean save, String fileOrURLName)
      Creates an ROIFileChooser suitable for selecting an roi file either for saving or loading ROIs, with the directory set to the supplied directory (if a directory) or the parent directory containing the file (if a regular file).
      Parameters:
      save - if true then an ROIFileChooser for saving ROI files will be instantiated; otherwise an ROIFileChooser for loading ROI files will be instantiated.
      fileOrURLName - the file, directory or File URL that will be seen on showing the TextFileChooser.
  • Method Details

    • setSelectedFile

      public void setSelectedFile(String fileOrURLName) throws NullPointerException
      Sets the selected file. If the file's parent directory is not the current directory, changes the current directory to be the file's parent directory.
      Parameters:
      fileOrURLName - the selected file (or File URL) name.
      Throws:
      NullPointerException - if fileOrURLName is null.