ij
Class Prefs

java.lang.Object
  extended by ij.Prefs

public class Prefs
extends java.lang.Object

This class contains the ImageJ preferences, which are loaded from the "IJ_Props.txt" and "IJ_Prefs.txt" files.

See Also:
ImageJ

Field Summary
static java.lang.String BCOLOR
           
static java.lang.String DIR_IMAGE
           
static java.lang.String FCOLOR
           
static java.lang.String JPEG
           
static java.lang.String PREFS_NAME
           
static java.lang.String PROPS_NAME
           
static java.lang.String ROICOLOR
           
static java.lang.String SCALE_CONVERSIONS
           
static java.lang.String USE_POINTER
           
 
Constructor Summary
Prefs()
           
 
Method Summary
static boolean getBoolean(java.lang.String key, boolean defaultValue)
          Finds a boolean in IJ_Props or IJ_Prefs.txt.
static java.awt.Color getColor(java.lang.String key, java.awt.Color defaultColor)
          Finds a color in IJ_Props or IJ_Prefs.txt.
static double getDouble(java.lang.String key, double defaultValue)
          Looks up a real number in IJ_Props or IJ_Prefs.txt.
static java.lang.String getFileSeparator()
          Returns the file.separator system property.
static java.lang.String getHomeDir()
          Returns the path to the directory containing IJ_Props.txt.
static java.lang.String getImagesURL()
          Returns the URL for the ImageJ sample images.
static int getInt(java.lang.String key, int defaultValue)
          Finds an int in IJ_Props or IJ_Prefs.txt.
static java.lang.String getString(java.lang.String key)
          Finds an string in IJ_Props or IJ_Prefs.txt.
static java.lang.String load(ImageJ ij, java.applet.Applet applet)
          Finds and loads the ImageJ configuration file, "IJ_Props.txt".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPS_NAME

public static final java.lang.String PROPS_NAME
See Also:
Constant Field Values

PREFS_NAME

public static final java.lang.String PREFS_NAME
See Also:
Constant Field Values

DIR_IMAGE

public static final java.lang.String DIR_IMAGE
See Also:
Constant Field Values

FCOLOR

public static final java.lang.String FCOLOR
See Also:
Constant Field Values

BCOLOR

public static final java.lang.String BCOLOR
See Also:
Constant Field Values

ROICOLOR

public static final java.lang.String ROICOLOR
See Also:
Constant Field Values

JPEG

public static final java.lang.String JPEG
See Also:
Constant Field Values

USE_POINTER

public static final java.lang.String USE_POINTER
See Also:
Constant Field Values

SCALE_CONVERSIONS

public static final java.lang.String SCALE_CONVERSIONS
See Also:
Constant Field Values
Constructor Detail

Prefs

public Prefs()
Method Detail

load

public static java.lang.String load(ImageJ ij,
                                    java.applet.Applet applet)
Finds and loads the ImageJ configuration file, "IJ_Props.txt".

Returns:
an error message if "IJ_Props.txt" not found.

getImagesURL

public static java.lang.String getImagesURL()
Returns the URL for the ImageJ sample images.


getHomeDir

public static java.lang.String getHomeDir()
Returns the path to the directory containing IJ_Props.txt.


getString

public static java.lang.String getString(java.lang.String key)
Finds an string in IJ_Props or IJ_Prefs.txt.


getBoolean

public static boolean getBoolean(java.lang.String key,
                                 boolean defaultValue)
Finds a boolean in IJ_Props or IJ_Prefs.txt.


getInt

public static int getInt(java.lang.String key,
                         int defaultValue)
Finds an int in IJ_Props or IJ_Prefs.txt.


getDouble

public static double getDouble(java.lang.String key,
                               double defaultValue)
Looks up a real number in IJ_Props or IJ_Prefs.txt.


getColor

public static java.awt.Color getColor(java.lang.String key,
                                      java.awt.Color defaultColor)
Finds a color in IJ_Props or IJ_Prefs.txt.


getFileSeparator

public static java.lang.String getFileSeparator()
Returns the file.separator system property.