/** Opens the specified file and adds it to the File/Open Recent menu. Returns true if the file was opened successfully. */ public boolean openAndAddToRecent(String path) { open(path); if (!error) Menus.addOpenRecentItem(path); return error; }
/** Opens the specified file and adds it to the File/Open Recent menu. Returns true if the file was opened successfully. */ public boolean openAndAddToRecent(String path) { open(path); if (!error) Menus.addOpenRecentItem(path); return error; }
/** * Displays a file open dialog box and then opens the tiff, dicom, * fits, pgm, jpeg, bmp, gif, lut, roi, or text file selected by * the user. Displays an error message if the selected file is not * in a supported format. This is the method that * ImageJ's File/Open command uses to open files. * @see ij.IJ#open() * @see ij.IJ#open(String) * @see ij.IJ#openImage() * @see ij.IJ#openImage(String) */ public void open() { OpenDialog od = new OpenDialog("Open", ""); String directory = od.getDirectory(); String name = od.getFileName(); if (name!=null) { String path = directory+name; error = false; open(path); if (!error) Menus.addOpenRecentItem(path); } }
/** * Displays a file open dialog box and then opens the tiff, dicom, * fits, pgm, jpeg, bmp, gif, lut, roi, or text file selected by * the user. Displays an error message if the selected file is not * in a supported format. This is the method that * ImageJ's File/Open command uses to open files. * @see ij.IJ#open() * @see ij.IJ#open(String) * @see ij.IJ#openImage() * @see ij.IJ#openImage(String) */ public void open() { OpenDialog od = new OpenDialog("Open", ""); String directory = od.getDirectory(); String name = od.getFileName(); if (name!=null) { String path = directory+name; error = false; open(path); if (!error) Menus.addOpenRecentItem(path); } }
Recorder.recordPath("open", path); if (i==0 && !error) Menus.addOpenRecentItem(path);
Recorder.recordPath("open", path); if (i==0 && !error) Menus.addOpenRecentItem(path);