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).
Location:
trunk/src/org/expeditee/reflection
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/reflection/JavaFX.java

    r569 r570  
    1010
    1111public class JavaFX {
    12         public static Class JFXPanel;
     12    public static Class<?> JFXPanel;
    1313
    14         public static Class Platform;
     14        public static Class<?> Platform;
    1515        public static Method PlatformRunLater;
    1616
    17         public static Class Group;
     17        public static Class<?> Group;
    1818        public static Method GroupGetChildren;
    1919
    20         public static Class Scene;
    21         public static Constructor SceneConstructor;
     20        public static Class<?> Scene;
     21        public static Constructor<?> SceneConstructor;
    2222
    23         public static Class WebView;
     23        public static Class<?> WebView;
    2424        public static Method JFXPanelSetScene;
    2525        public static Method WebViewSetPrefSize;
     
    2727        public static Method WebViewSetContextMenuEnabled;
    2828
    29         public static Class WebEngine;
     29        public static Class<?> WebEngine;
    3030        public static Method WebEngineLoad;
    3131        public static Method WebEngineGetLocation;
     
    3535        public static Method WebEngineExecuteScript;
    3636
    37         public static Class WebHistory;
     37        public static Class<?> WebHistory;
    3838        public static Method WebHistoryGo;
    3939
    40         public static Class Worker;
     40        public static Class<?> Worker;
    4141        public static Method WorkerStateProperty;
    4242
    43         public static Class ReadOnlyObjectProperty;
     43        public static Class<?> ReadOnlyObjectProperty;
    4444        public static Method ReadOnlyObjectPropertyAddListener;
    4545
    46         public static Class ChangeListener;
     46        public static Class<?> ChangeListener;
    4747
    48         public static Class ObservableValue;
     48        public static Class<?> ObservableValue;
    4949
    50         public static Class State;
    51         public static List<Object> StateConstants;
     50        public static Class<?> State;
     51        public static List<?> StateConstants;
    5252       
    5353        public static Class EventHandler;
     
    6161        public static Class MouseButton;
    6262
    63         public static Class JSObject;
     63        public static Class<?> JSObject;
    6464        public static Method JSObjectEval;
    6565        public static Method JSObjectCall;
Note: See TracChangeset for help on using the changeset viewer.