001: /*
002: This file is part of BORG.
003:
004: BORG is free software; you can redistribute it and/or modify
005: it under the terms of the GNU General Public License as published by
006: the Free Software Foundation; either version 2 of the License, or
007: (at your option) any later version.
008:
009: BORG is distributed in the hope that it will be useful,
010: but WITHOUT ANY WARRANTY; without even the implied warranty of
011: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012: GNU General Public License for more details.
013:
014: You should have received a copy of the GNU General Public License
015: along with BORG; if not, write to the Free Software
016: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
017:
018: Copyright 2003 by Mike Berger
019: */
020: package net.sf.borg.common;
021:
022: import java.util.Calendar;
023:
024: public class PrefName {
025:
026: private String name_;
027: private Object default_;
028:
029: private PrefName(String name, Object def) {
030: setName(name);
031: setDefault(def);
032: }
033:
034: void setName(String name_) {
035: this .name_ = name_;
036: }
037:
038: String getName() {
039: return name_;
040: }
041:
042: void setDefault(Object default_) {
043: this .default_ = default_;
044: }
045:
046: Object getDefault() {
047: return default_;
048: }
049:
050: // database
051: static public PrefName DBTYPE = new PrefName("dbtype", "hsqldb");
052: static public PrefName DBDIR = new PrefName("dbdir", "not-set");
053: static public PrefName DBHOST = new PrefName("dbhost", "localhost");
054: static public PrefName DBPORT = new PrefName("dbport", "3306");
055: static public PrefName DBNAME = new PrefName("dbname", "borg");
056: static public PrefName DBUSER = new PrefName("dbuser", "borg");
057: static public PrefName DBPASS = new PrefName("dbpass", "borg");
058: static public PrefName DBURL = new PrefName("dburl", "");
059: static public PrefName JDBCURL = new PrefName("jdbcurl", "");
060: static public PrefName SHARED = new PrefName("shared", "false");
061: static public PrefName SYNCMINS = new PrefName("sync_mins",
062: new Integer(0));
063: static public PrefName HSQLDBDIR = new PrefName("hsqldbdir",
064: "not-set");
065:
066: // misc
067: static public PrefName STACKTRACE = new PrefName("stacktrace",
068: "false");
069: static public PrefName BACKGSTART = new PrefName("backgstart",
070: "false");
071: static public PrefName SPLASH = new PrefName("splash", "true");
072: static public PrefName VERCHKLAST = new PrefName("ver_chk_last",
073: new Integer(-1));
074: static public PrefName ICALTODOEV = new PrefName("ical_todo_ev",
075: "false");
076: static public PrefName ICALUTC = new PrefName("icalutc", "true");
077: static public PrefName LASTEXPURL = new PrefName("lastExpUrl", "");
078: static public PrefName LASTIMPURL = new PrefName("lastImpUrl", "");
079: static public PrefName LASTIMPURLDAT = new PrefName(
080: "lastImpUrlDat", "");
081: static public PrefName SHOWMEMFILES = new PrefName("showMemFiles",
082: "false");
083: static public PrefName SOCKETPORT = new PrefName("socketport",
084: new Integer(2929));
085: static public PrefName USESYSTRAY = new PrefName("useSysTray",
086: "true");
087: static public PrefName BACKUPDIR = new PrefName("backupDir", "");
088:
089: // have to explain this one - reverse the way that the appt editor and day view
090: // windows are summoned for people who can't adjust
091: //static public PrefName REVERSEDAYEDIT = new PrefName("reverseDayEdit", "false");
092:
093: // printing
094: static public PrefName LOGO = new PrefName("logo", "");
095: static public PrefName COLORPRINT = new PrefName("colorprint",
096: "false");
097: static public PrefName WRAP = new PrefName("wrap", "false");
098:
099: // what to show
100: static public PrefName SHOWPUBLIC = new PrefName("showpublic",
101: "true");
102: static public PrefName SHOWPRIVATE = new PrefName("showprivate",
103: "false");
104: static public PrefName SHOWUSHOLIDAYS = new PrefName(
105: "show_us_holidays", "true");
106: static public PrefName SHOWCANHOLIDAYS = new PrefName(
107: "show_can_holidays", "false");
108: static public PrefName COLORSORT = new PrefName("color_sort",
109: "false");
110: static public PrefName FIRSTDOW = new PrefName("first_dow",
111: new Integer(Calendar.SUNDAY));
112: static public PrefName MILTIME = new PrefName("miltime", "false");
113: static public PrefName WKSTARTHOUR = new PrefName("wkStartHour",
114: "7");
115: static public PrefName WKENDHOUR = new PrefName("wkEndHour", "22");
116: static public PrefName DEFAULT_APPT = new PrefName("defaultAppt",
117: "");
118: static public PrefName DAYOFYEAR = new PrefName("showDayOfYear",
119: "false");
120: static public PrefName LINESPACING = new PrefName("line_spacing",
121: "0.0");
122: static public PrefName TRUNCAPPT = new PrefName("truncate_appt",
123: "true");
124: static public PrefName ISOWKNUMBER = new PrefName("isowknumber",
125: "true");
126: //static public PrefName SHOWEXTRADAYS = new PrefName("show_extra_days", "true");
127: static public PrefName DOCKPANELS = new PrefName("dock_panels",
128: "true");
129: static public PrefName OLDMONTHVIEW = new PrefName(
130: "old_month_view", "false");
131:
132: // reminders/popups
133: static public PrefName REMINDERS = new PrefName("reminders", "true");
134: static public PrefName BEEPINGREMINDERS = new PrefName(
135: "beeping_reminders", "true");
136: static public PrefName USESYSTEMBEEP = new PrefName("system_beep",
137: "true");
138: static public PrefName REMINDERCHECKMINS = new PrefName(
139: "reminder_check_mins", new Integer(1));
140: static public PrefName EMAILENABLED = new PrefName("email_enabled",
141: "false");
142: static public PrefName EMAILSERVER = new PrefName("email_server",
143: "");
144: static public PrefName EMAILADDR = new PrefName("email_addr", "");
145: static public PrefName EMAILLAST = new PrefName("email_last",
146: new Integer(0));
147: static public PrefName EMAILDEBUG = new PrefName("email_debug", "0");
148: static public PrefName EMAILTIME = new PrefName("email_time",
149: new Integer(0));
150: static public PrefName EMAILUSER = new PrefName("email_user", "");
151: static public PrefName EMAILPASS = new PrefName("email_pass", "");
152: //static public int[] REMMINUTES = new int[] { -10, -5, 0, 1, 2, 3, 4, 5, 10, 15, 20, 30, 45, 60, 90, 120, 180, 240, 300, 360};
153: static public PrefName REMMINS = new PrefName("remmins",
154: "-10,-5,0,1,2,3,4,5,10,15,20,30,45,60,90,120,180,240,300,360");
155: static public PrefName INDIVEMAILENABLED = new PrefName(
156: "indiv_email_enabled", "false");
157: static public PrefName INDIVEMAILMINS = new PrefName(
158: "indiv_email_mins", new Integer(15));
159: // font-LNF-locale
160: static public PrefName DEFFONT = new PrefName("defaultfont", "");
161: static public PrefName APPTFONT = new PrefName("apptfont",
162: "SansSerif-10");
163: static public PrefName PREVIEWFONT = new PrefName("previewfont",
164: "SansSerif-10");
165: static public PrefName DAYVIEWFONT = new PrefName("dayviewfont",
166: "SansSerif-10");
167: static public PrefName WEEKVIEWFONT = new PrefName("weekviewfont",
168: "SansSerif-10");
169: static public PrefName MONTHVIEWFONT = new PrefName(
170: "monthviewfont", "SansSerif-6");
171: static public PrefName LNF = new PrefName("lnf",
172: "com.jgoodies.looks.plastic.PlasticXPLookAndFeel");
173: static public PrefName NOLOCALE = new PrefName("nolocale", "0");
174: static public PrefName COUNTRY = new PrefName("country", "");
175: static public PrefName LANGUAGE = new PrefName("language", "");
176:
177: // window sizes
178: static public PrefName CALVIEWSIZE = new PrefName("calviewsize",
179: "-1,-1,-1,-1,N");
180: static public PrefName ADDRVIEWSIZE = new PrefName("addrviewsize",
181: "-1,-1,-1,-1,N");
182: static public PrefName ADDRLISTVIEWSIZE = new PrefName(
183: "addrlistviewsize", "-1,-1,-1,-1,N");
184: static public PrefName APPTLISTVIEWSIZE = new PrefName(
185: "apptlistviewsize", "-1,-1,-1,-1,N");
186: static public PrefName DAYVIEWSIZE = new PrefName("dayviewsize",
187: "-1,-1,-1,-1,Y");
188: static public PrefName MONTHPREVIEWSIZE = new PrefName(
189: "monthpreviewsize", "-1,-1,-1,-1,N");
190: static public PrefName OPTVIEWSIZE = new PrefName("optviewsize",
191: "-1,-1,-1,-1,N");
192: static public PrefName SRCHVIEWSIZE = new PrefName("srchviewsize",
193: "-1,-1,-1,-1,N");
194: static public PrefName TASKCONFVIEWSIZE = new PrefName(
195: "taskconfviewsize", "-1,-1,-1,-1,N");
196: static public PrefName TASKLISTVIEWSIZE = new PrefName(
197: "tasklistviewsize", "-1,-1,-1,-1,N");
198: static public PrefName TASKVIEWSIZE = new PrefName("taskviewsize",
199: "-1,-1,-1,-1,N");
200: static public PrefName TODOVIEWSIZE = new PrefName("todoviewsize",
201: "-1,-1,-1,-1,N");
202: static public PrefName WEEKVIEWSIZE = new PrefName("weekviewsize",
203: "-1,-1,-1,-1,N");
204: static public PrefName HELPVIEWSIZE = new PrefName("helpviewsize",
205: "-1,-1,-1,-1,N");
206: static public PrefName PROJVIEWSIZE = new PrefName("projviewsize",
207: "-1,-1,-1,-1,N");
208: static public PrefName GANTTSIZE = new PrefName("ganttsize",
209: "-1,-1,-1,-1,N");
210:
211: // user color scheme
212: static public PrefName UCS_ONTODO = new PrefName("ucs_ontodo",
213: "false");
214: static public PrefName UCS_MARKTODO = new PrefName("ucs_marktodo",
215: "true");
216: static public PrefName UCS_MARKER = new PrefName("ucs_marker",
217: "redball.gif");
218: static public PrefName UCS_MARKERCOLOR = new PrefName(
219: "ucs_markercolor", "16250609");
220: // appts categories
221: static public PrefName UCS_RED = new PrefName("ucs_red",
222: new Integer(13369395));
223: static public PrefName UCS_BLUE = new PrefName("ucs_blue",
224: new Integer(6684876));
225: static public PrefName UCS_GREEN = new PrefName("ucs_green",
226: new Integer(39168));
227: static public PrefName UCS_BLACK = new PrefName("ucs_black",
228: new Integer(13107));
229: static public PrefName UCS_WHITE = new PrefName("ucs_white",
230: new Integer(16250609));
231: // use if for task tracker items
232: static public PrefName UCS_NAVY = new PrefName("ucs_navy",
233: new Integer(13158));
234: // use it for system generated holidays
235: static public PrefName UCS_PURPLE = new PrefName("ucs_purple",
236: new Integer(10027212));
237: // use it for system generated birthdays
238: static public PrefName UCS_BRICK = new PrefName("ucs_brick",
239: new Integer(10027008));
240: // Calendar view day background colors
241:
242: static public PrefName UCS_DEFAULT = new PrefName("ucs_default",
243: new Integer(16777164));
244: static public PrefName UCS_TODAY = new PrefName("ucs_today",
245: new Integer(16751001));
246: static public PrefName UCS_HOLIDAY = new PrefName("ucs_holiday",
247: new Integer(16764108));
248: static public PrefName UCS_VACATION = new PrefName("ucs_vacation",
249: new Integer(13434828));
250: static public PrefName UCS_HALFDAY = new PrefName("ucs_halfday",
251: new Integer(13421823));
252: static public PrefName UCS_WEEKEND = new PrefName("ucs_weekend",
253: new Integer(16764057));
254: static public PrefName UCS_WEEKDAY = new PrefName("ucs_weekday",
255: new Integer(16777164));
256: static public PrefName UCS_STRIPE = new PrefName("ucs_stripe",
257: new Integer(15792890));
258:
259: // synchronization
260: static public PrefName PALM_SYNC = new PrefName("palm_sync",
261: "false");
262:
263: // tasks
264: static public PrefName TASK_SHOW_ABBREV = new PrefName(
265: "task_show_abbrev", "false");
266: static public PrefName CAL_SHOW_TASKS = new PrefName(
267: "cal_show_tasks", "true");
268: static public PrefName CAL_SHOW_SUBTASKS = new PrefName(
269: "cal_show_subtasks", "true");
270: static public PrefName GANTT_SHOW_SUBTASKS = new PrefName(
271: "gantt_show_subtasks", "true");
272:
273: }
|