BioLegato 0.6.2

org.biolegato.core.properties
Class BLProperties

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 org.biolegato.core.properties.BLProperties
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class BLProperties
extends java.util.Properties

Stores the properties for BioLegato. The current properties registered are:

Property Used internally Description
debug Yes determines whether or not to display debug information
plugins Yes sets the plugin directory
temp Yes sets the temporary files directory
font.size Yes determines the default font size for objects in BioLegato
font.type Yes determines the default font type for objects in BioLegato
shell.name Yes determines the shell to execute
shell.parameter Yes determines the parameter for directing the shell to execute a command
user.properties Yes determines whether or not to read the user's propery files (located in the user's home directory
user.properties Yes determines whether or not to read the user's plugin files (located in the user's home directory
default.canvas Yes determines the default canvas to show on startup
default.fileformat Yes determines the default file format for open/save dialogs
GDE.menu No determines whether or not to read the GDE menu files (backwards compatibility mode)
GDE.help.viewer No determines which file to feed the help file to
GDE.help.path No the location to search for the help files
undo No whether or not to enable undo support
undo.size No whether or not to enable undo support

Author:
Graham Alvare, Brian Fristensky
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
BLProperties()
          Create a new BLProperties instance
 
Method Summary
 void addExtension(PropertiesExtension extension)
          Adds a properties extension to the properties registry.
 void addPropertiesListener(java.lang.String key, PropertiesListener listener)
          Adds a listener for property changes NOTE: this method allows filtering based on which property changed
 java.lang.String getProperty(java.lang.String key)
          Obtains a property from the BLProperties object.
 java.lang.Object setProperty(java.lang.String key, java.lang.String value)
          Changes a property within the BLProperties object
 void showPropertiesWindow(javax.swing.JFrame window)
          Displays the properties window for this instance of BioLegato
 
Methods inherited from class java.util.Properties
getProperty, list, list, load, loadFromXML, propertyNames, save, store, storeToXML, storeToXML
 
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
 

Constructor Detail

BLProperties

public BLProperties()
Create a new BLProperties instance

Method Detail

setProperty

public java.lang.Object setProperty(java.lang.String key,
                                    java.lang.String value)
Changes a property within the BLProperties object

Overrides:
setProperty in class java.util.Properties
Parameters:
key - the key of the property to alter.
value - the new value of the property.
Returns:
the old value of the property changed (null if no previous value).

getProperty

public java.lang.String getProperty(java.lang.String key)
Obtains a property from the BLProperties object.

Overrides:
getProperty in class java.util.Properties
Parameters:
key - the key of the property.
Returns:
the current value of the property (returns "" if not set).

addPropertiesListener

public void addPropertiesListener(java.lang.String key,
                                  PropertiesListener listener)
Adds a listener for property changes NOTE: this method allows filtering based on which property changed

Parameters:
key - the property key to listen for.
listener - the listener to register.

showPropertiesWindow

public void showPropertiesWindow(javax.swing.JFrame window)
Displays the properties window for this instance of BioLegato

Parameters:
window - the main program window to display the properties.

addExtension

public void addExtension(PropertiesExtension extension)
Adds a properties extension to the properties registry.

Parameters:
extension - the properties extension to add.

BioLegato 0.6.2

Copyright © 2008-2009 University of Manitoba.