Preferences and customisation

The kcl-waterloo-base.jar file defines a set of default values that determine the appearance of Waterloo objects.

Changing the defaults

The preferences are user-settable by:
  1. Double-clicking a graph and selecting the Preference Editor from the Graph Editor. This will Create or edit a waterloo.preferences XML file in your ($java.home)/waterlooSettings folder.
  2. Creating or editing the waterloo.preferences XML file in your ($java.home)/waterlooSettings folder by hand.
  3. Editing the kcl.waterloo.defaults.GJDefaults class code and recompiling the project - not recommended.

Use in constructors

Constructors for Waterloo classes refer to the contents of the maps stored in the GJDefaults class (which is a singleton instance class) to set their properties via the default constructor. If the maps contains invalid entries, the constructors will fail. It is therefore recommended that values are edited using the Preference Editor.

Custom code

As the GJDefaults singleton instance is used in constructors and during serialization/deserialization of XML files (see right), existing default properties should not be removed.

It is also recommended not to add features to support user-written code to this class. Create a custom-class instead and refer to that in your code leaving GJDefaults alone.