Ignore:
Timestamp:
12/04/13 17:52:41 (11 years ago)
Author:
jts21
Message:

Add settings package which uses reflection to allow changing settings without hard coding the code to change every setting.

  • Currently only works for String/Int/Boolean/Double values
  • Supports default values by looking for fields with the prefix 'default', and will reset unset values to their default if a default exists.
  • For more complex settings (e.g. proxy settings), there is a "onParsed()" callback which can be used to run additional code, and (in the case of the password widget) parse abnormal items.
  • Some of the settings code in FrameUtils.ParseProfile has already been commented out since it's handled by default with the new Settings package. The rest could be moved over to UserSettings.onParsed(). Given the number of settings that remain to be moved, it may be a good idea to add the possibility for setting-specific onParsed() callbacks (could be done quite easily, similarly to how default values are handled).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/agents/SearchTree.java

    r376 r570  
    1414import org.expeditee.gui.Frame;
    1515import org.expeditee.gui.FrameIO;
    16 import org.expeditee.gui.UserSettings;
    1716import org.expeditee.io.Conversion;
     17import org.expeditee.settings.UserSettings;
    1818
    1919public class SearchTree extends SearchAgent {
Note: See TracChangeset for help on using the changeset viewer.