ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/java/ProgramSettings/src/net/oni2/SettingsManager.java
(Generate patch)

Comparing java/ProgramSettings/src/net/oni2/SettingsManager.java (file contents):
Revision 776 by alloc, Tue Apr 2 00:16:52 2013 UTC vs.
Revision 852 by alloc, Fri May 3 12:25:21 2013 UTC

# Line 22 | Line 22 | public class SettingsManager implements
22  
23          private static SettingsManager instance = new SettingsManager();
24  
25        private static boolean debugRun = false;
26        private static boolean useWorkingDir = false;
27
25          private HashMap<String, Object> prefs = new HashMap<String, Object>();
26  
27          private boolean printNamesNotInMap = false;
28  
29 <        private boolean offlineMode = false;
30 <        private boolean noCacheUpdate = false;
29 >        @SuppressWarnings("unused")
30 >        private transient boolean offlineMode = false;
31 >        @SuppressWarnings("unused")
32 >        private transient boolean noCacheUpdate = false;
33  
34          /**
35           * Get the singleton instance
# Line 41 | Line 40 | public class SettingsManager implements
40                  return instance;
41          }
42  
44        /**
45         * @param debug
46         *            Debug mode
47         */
48        public static void setDebug(boolean debug) {
49                debugRun = debug;
50        }
51
52        /**
53         * @return Is debug run
54         */
55        public static boolean isDebug() {
56                return debugRun;
57        }
58
59        /**
60         * @param useWd
61         *            Use working directory instead of jar path
62         */
63        public static void setUseWorkingDir(boolean useWd) {
64                useWorkingDir = useWd;
65        }
66
67        /**
68         * @return Do we want to use working directory
69         */
70        public static boolean getUseWorkingDir() {
71                return useWorkingDir;
72        }
73
74        /**
75         * @return Is offline?
76         */
77        public boolean isOfflineMode() {
78                return offlineMode;
79        }
80
81        /**
82         * @param offline
83         *            Is offline?
84         */
85        public void setOfflineMode(boolean offline) {
86                this.offlineMode = offline;
87        }
88
89        /**
90         * @return Is in noCacheUpdate mode?
91         */
92        public boolean isNoCacheUpdateMode() {
93                return noCacheUpdate;
94        }
95
96        /**
97         * @param noCacheUpdate
98         *            Is in noCacheUpdate mode?
99         */
100        public void setNoCacheUpdateMode(boolean noCacheUpdate) {
101                this.noCacheUpdate = noCacheUpdate;
102        }
103
43          private static XStream getXStream() {
44                  XStream xs = new XStream(new StaxDriver());
45                  xs.alias("Settings", SettingsManager.class);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)