prefuse.util
Class PrefuseConfig

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by prefuse.util.PrefuseConfig
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class PrefuseConfig
extends java.util.Properties

Runtime configuration settings for the prefuse framework. Maintains a set of hardwired configuration settings that can be overrriden by creating a text proeprties file containing custom values. By default, prefuse will look for the file "prefuse.conf" in the current working directory for configuration name/value pairs. The framework can be instructed to look for a different file by putting the full path to the file into the "prefuse.config" System property (for example by using a -D flag at the Java runtime command line).

Some of the supported configuration properties include:

Application creators are welcome to add their own custom properties to the configuration files and use the PrefuseConfig instance to access those properties. This class is a singleton, accessed through a static accessor method.

Author:
jeffrey heer
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Method Summary
static java.lang.String get(java.lang.String key)
          Get a prefuse configuration property.
static boolean getBoolean(java.lang.String key)
          Get a prefuse configuration property as a boolean.
static PrefuseConfig getConfig()
          Get the global PrefuseConfig instance.
static double getDouble(java.lang.String key)
          Get a prefuse configuration property as a double.
static float getFloat(java.lang.String key)
          Get a prefuse configuration property as a float.
static int getInt(java.lang.String key)
          Get a prefuse configuration property as an integer.
static long getLong(java.lang.String key)
          Get a prefuse configuration property as a long.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getConfig

public static PrefuseConfig getConfig()
Get the global PrefuseConfig instance.

Returns:
the configuration instance

get

public static java.lang.String get(java.lang.String key)
Get a prefuse configuration property.

Parameters:
key - the name of the property to lookup
Returns:
the property value, or null if the key is not found

getInt

public static int getInt(java.lang.String key)
Get a prefuse configuration property as an integer.

Parameters:
key - the name of the property to lookup
Returns:
the property value, or the minimum possible integer value if the key is not found or parsing of the number fails.

getLong

public static long getLong(java.lang.String key)
Get a prefuse configuration property as a long.

Parameters:
key - the name of the property to lookup
Returns:
the property value, or the minimum possible long value if the key is not found or parsing of the number fails.

getFloat

public static float getFloat(java.lang.String key)
Get a prefuse configuration property as a float.

Parameters:
key - the name of the property to lookup
Returns:
the property value, or a Float.NaN value if the key is not found or parsing of the number fails.

getDouble

public static double getDouble(java.lang.String key)
Get a prefuse configuration property as a double.

Parameters:
key - the name of the property to lookup
Returns:
the property value, or a Double.NaN value if the key is not found or parsing of the number fails.

getBoolean

public static boolean getBoolean(java.lang.String key)
Get a prefuse configuration property as a boolean.

Parameters:
key - the name of the property to lookup
Returns:
the property value. False is returned if the key is not found or does not parse to a true/false value.


Copyright © 2007 Regents of the University of California