Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.astro.louisville.edu/software/astroimagej/imagej/api/ij/Prefs.html
Дата изменения: Thu Dec 2 23:03:11 2010
Дата индексирования: Mon Oct 1 21:19:20 2012
Кодировка:

Поисковые слова: south pole
Prefs (ImageJ API)

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 boolean antialiasedText
          No longer used
static boolean antialiasedTools
          Draw tool icons using antialiasing.
static java.lang.String BCOLOR
           
static boolean blackBackground
          Backgound is black in binary images
static boolean blackCanvas
          Use black image border.
static boolean copyColumnHeaders
          Include column headers when copying tables to clipboard.
static java.lang.String DIR_IMAGE
           
static boolean disableUndo
          Disable Edit/Undo command.
static java.lang.String DIV_BY_ZERO_VALUE
           
static boolean doubleBuffer
          Double buffer display of selections and overlays.
static java.lang.String FCOLOR
           
static java.lang.String FPS
           
static boolean intelByteOrder
          Export Raw using little-endian byte order.
static boolean interpolateScaledImages
          Display images scaled <100% using bilinear interpolation
static java.lang.String JPEG
           
static java.lang.String KEY_PREFIX
           
static java.lang.String MENU_SIZE
           
static boolean moveToMisc
          Move isolated plugins to Miscellaneous submenu.
static boolean multiPointMode
          Use MultiPoint tool.
static boolean noBorder
          Do not draw black border around image.
static java.lang.String NOISE_SD
           
static boolean noPointLabels
          Do not label multiple points created using point tool.
static boolean noRowNumbers
          Do not include row numbers when copying tables to clipboard.
static boolean open100Percent
          Open images at 100% magnification
static java.lang.String OPTIONS
           
static boolean padEdges
          Extend the borders to foreground for binary erosions and closings.
static boolean pointAddToManager
          Add points to ROI Manager.
static boolean pointAutoMeasure
          Point tool auto-measure mode.
static boolean pointAutoNextSlice
          Point tool auto-next slice mode (not saved in IJ_Prefs).
static java.lang.String PREFS_NAME
           
static java.lang.String PROPS_NAME
           
static boolean requireControlKey
          Require control or command key for keybaord shortcuts.
static java.lang.String ROICOLOR
           
static boolean runSocketListener
          Run the SocketListener.
static java.lang.String separator
          file.separator system property
static java.lang.String SHOW_ALL_COLOR
           
static boolean showAllSliceOnly
          Only show ROIs associated with current slice in Roi Manager "Show All" mode.
static java.lang.String THREADS
           
static boolean useInvertingLut
          Open 8-bit images with inverting LUT so 0 is white and 255 is black.
static boolean useJFileChooser
          Use JFileChooser instead of FileDialog to open and save files.
static boolean usePointerCursor
          Use pointer cursor instead of cross
static java.lang.String vistaHint
           
static boolean weightedColor
          Color to grayscale conversion is weighted (0.299, 0.587, 0.114) if the variable is true.
 
Constructor Summary
Prefs()
           
 
Method Summary
static boolean get(java.lang.String key, boolean defaultValue)
          Uses the keyword key to retrieve a boolean from the preferences file.
static double get(java.lang.String key, double defaultValue)
          Uses the keyword key to retrieve a number from the preferences file.
static java.lang.String get(java.lang.String key, java.lang.String defaultValue)
          Uses the keyword key to retrieve a string from the preferences file.
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 java.lang.String getDefaultDirectory()
          Returns the default directory, if any, or null.
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 ImageJ directory.
static java.lang.String getImagesURL()
          Returns the URL of the directory that contains 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.awt.Point getLocation(java.lang.String key)
          Uses the keyword key to retrieve a location from the preferences file.
static java.lang.String getPrefsDir()
          Gets the path to the directory where the preferences file (IJPrefs.txt) is saved.
static java.lang.String getString(java.lang.String key)
          Finds an string in IJ_Props or IJ_Prefs.txt.
static java.lang.String getString(java.lang.String key, java.lang.String defaultString)
          Finds an string in IJ_Props or IJ_Prefs.txt.
static int getThreads()
          Returns the number of threads used by PlugInFilters to process stacks.
static int getTransparentIndex()
          Returns the transparent index (0-255), or -1 if transparency is disabled.
static java.lang.String load(java.lang.Object ij, java.applet.Applet applet)
          Finds and loads the ImageJ configuration file, "IJ_Props.txt".
static void saveLocation(java.lang.String key, java.awt.Point loc)
          Saves the Point loc in the preferences file as a string using the keyword key.
static void savePreferences()
          Saves user preferences in the IJ_Prefs.txt properties file.
static void savePrefs(java.util.Properties prefs, java.lang.String path)
           
static void set(java.lang.String key, boolean value)
          Saves the boolean variable value in the preferences file using the keyword key.
static void set(java.lang.String key, double value)
          Saves value in the preferences file using the keyword key.
static void set(java.lang.String key, int value)
          Saves value in the preferences file using the keyword key.
static void set(java.lang.String key, java.lang.String text)
          Saves the value of the string text in the preferences file using the keyword key.
static void setImagesURL(java.lang.String url)
          Sets the URL of the directory that contains the ImageJ sample images.
static void setThreads(int n)
          Sets the number of threads (1-32) used by PlugInFilters to process stacks.
static void setTransparentIndex(int index)
          Sets the transparent index (0-255), or set to -1 to disable transparency.
 
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

SHOW_ALL_COLOR

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

JPEG

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

FPS

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

DIV_BY_ZERO_VALUE

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

NOISE_SD

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

MENU_SIZE

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

THREADS

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

KEY_PREFIX

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

OPTIONS

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

vistaHint

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

separator

public static java.lang.String separator
file.separator system property


usePointerCursor

public static boolean usePointerCursor
Use pointer cursor instead of cross


antialiasedText

public static boolean antialiasedText
No longer used


interpolateScaledImages

public static boolean interpolateScaledImages
Display images scaled <100% using bilinear interpolation


open100Percent

public static boolean open100Percent
Open images at 100% magnification


blackBackground

public static boolean blackBackground
Backgound is black in binary images


useJFileChooser

public static boolean useJFileChooser
Use JFileChooser instead of FileDialog to open and save files.


weightedColor

public static boolean weightedColor
Color to grayscale conversion is weighted (0.299, 0.587, 0.114) if the variable is true.


blackCanvas

public static boolean blackCanvas
Use black image border.


pointAutoMeasure

public static boolean pointAutoMeasure
Point tool auto-measure mode.


pointAutoNextSlice

public static boolean pointAutoNextSlice
Point tool auto-next slice mode (not saved in IJ_Prefs).


requireControlKey

public static boolean requireControlKey
Require control or command key for keybaord shortcuts.


useInvertingLut

public static boolean useInvertingLut
Open 8-bit images with inverting LUT so 0 is white and 255 is black.


antialiasedTools

public static boolean antialiasedTools
Draw tool icons using antialiasing.


intelByteOrder

public static boolean intelByteOrder
Export Raw using little-endian byte order.


doubleBuffer

public static boolean doubleBuffer
Double buffer display of selections and overlays.


noPointLabels

public static boolean noPointLabels
Do not label multiple points created using point tool.


disableUndo

public static boolean disableUndo
Disable Edit/Undo command.


noBorder

public static boolean noBorder
Do not draw black border around image.


showAllSliceOnly

public static boolean showAllSliceOnly
Only show ROIs associated with current slice in Roi Manager "Show All" mode.


copyColumnHeaders

public static boolean copyColumnHeaders
Include column headers when copying tables to clipboard.


noRowNumbers

public static boolean noRowNumbers
Do not include row numbers when copying tables to clipboard.


moveToMisc

public static boolean moveToMisc
Move isolated plugins to Miscellaneous submenu.


pointAddToManager

public static boolean pointAddToManager
Add points to ROI Manager.


padEdges

public static boolean padEdges
Extend the borders to foreground for binary erosions and closings.


runSocketListener

public static boolean runSocketListener
Run the SocketListener.


multiPointMode

public static boolean multiPointMode
Use MultiPoint tool.

Constructor Detail

Prefs

public Prefs()
Method Detail

load

public static java.lang.String load(java.lang.Object 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 of the directory that contains the ImageJ sample images.


setImagesURL

public static void setImagesURL(java.lang.String url)
Sets the URL of the directory that contains the ImageJ sample images.


getHomeDir

public static java.lang.String getHomeDir()
Returns the path to the ImageJ directory.


getPrefsDir

public static java.lang.String getPrefsDir()
Gets the path to the directory where the preferences file (IJPrefs.txt) is saved.


getDefaultDirectory

public static java.lang.String getDefaultDirectory()
Returns the default directory, if any, or null.


getString

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


getString

public static java.lang.String getString(java.lang.String key,
                                         java.lang.String defaultString)
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.


savePreferences

public static void savePreferences()
Saves user preferences in the IJ_Prefs.txt properties file.


set

public static void set(java.lang.String key,
                       java.lang.String text)
Saves the value of the string text in the preferences file using the keyword key. This string can be retrieved using the appropriate get() method.


set

public static void set(java.lang.String key,
                       int value)
Saves value in the preferences file using the keyword key. This value can be retrieved using the appropriate getPref() method.


set

public static void set(java.lang.String key,
                       double value)
Saves value in the preferences file using the keyword key. This value can be retrieved using the appropriate getPref() method.


set

public static void set(java.lang.String key,
                       boolean value)
Saves the boolean variable value in the preferences file using the keyword key. This value can be retrieved using the appropriate getPref() method.


get

public static java.lang.String get(java.lang.String key,
                                   java.lang.String defaultValue)
Uses the keyword key to retrieve a string from the preferences file. Returns defaultValue if the key is not found.


get

public static double get(java.lang.String key,
                         double defaultValue)
Uses the keyword key to retrieve a number from the preferences file. Returns defaultValue if the key is not found.


get

public static boolean get(java.lang.String key,
                          boolean defaultValue)
Uses the keyword key to retrieve a boolean from the preferences file. Returns defaultValue if the key is not found.


saveLocation

public static void saveLocation(java.lang.String key,
                                java.awt.Point loc)
Saves the Point loc in the preferences file as a string using the keyword key.


getLocation

public static java.awt.Point getLocation(java.lang.String key)
Uses the keyword key to retrieve a location from the preferences file. Returns null if the key is not found or the location is not valid (e.g., offscreen).


savePrefs

public static void savePrefs(java.util.Properties prefs,
                             java.lang.String path)
                      throws java.io.IOException
Throws:
java.io.IOException

getThreads

public static int getThreads()
Returns the number of threads used by PlugInFilters to process stacks.


setThreads

public static void setThreads(int n)
Sets the number of threads (1-32) used by PlugInFilters to process stacks.


setTransparentIndex

public static void setTransparentIndex(int index)
Sets the transparent index (0-255), or set to -1 to disable transparency.


getTransparentIndex

public static int getTransparentIndex()
Returns the transparent index (0-255), or -1 if transparency is disabled.