ij.io
Class OpenDialog

java.lang.Object
  extended by ij.io.OpenDialog

public class OpenDialog
extends java.lang.Object

This class displays a dialog window from which the user can select an input file.


Constructor Summary
OpenDialog(java.lang.String title, java.lang.String path)
          Displays a file open dialog with 'title' as the title.
OpenDialog(java.lang.String title, java.lang.String defaultDir, java.lang.String defaultName)
          Displays a file open dialog, using the specified default directory and file name.
 
Method Summary
static java.lang.String getDefaultDirectory()
          Returns the current working directory, which may be null.
 java.lang.String getDirectory()
          Returns the selected directory.
 java.lang.String getFileName()
          Returns the selected file name.
static void setDefaultDirectory(java.lang.String defaultDir)
          Sets the current working directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenDialog

public OpenDialog(java.lang.String title,
                  java.lang.String path)
Displays a file open dialog with 'title' as the title. If 'path' is non-blank, it is used and the dialog is not displayed. Uses and updates the ImageJ default directory.


OpenDialog

public OpenDialog(java.lang.String title,
                  java.lang.String defaultDir,
                  java.lang.String defaultName)
Displays a file open dialog, using the specified default directory and file name.

Method Detail

getDirectory

public java.lang.String getDirectory()
Returns the selected directory.


getFileName

public java.lang.String getFileName()
Returns the selected file name.


getDefaultDirectory

public static java.lang.String getDefaultDirectory()
Returns the current working directory, which may be null. The returned string always ends with the separator character ("/" or "\").


setDefaultDirectory

public static void setDefaultDirectory(java.lang.String defaultDir)
Sets the current working directory.