001: package net.sourceforge.squirrel_sql.client.preferences;
002:
003: /*
004: * Copyright (C) 2001-2004 Colin Bell
005: * colbell@users.sourceforge.net
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation; either
010: * version 2.1 of the License, or (at your option) any later version.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this library; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020: */
021:
022: import java.beans.IndexedPropertyDescriptor;
023: import java.beans.IntrospectionException;
024: import java.beans.PropertyDescriptor;
025: import java.beans.SimpleBeanInfo;
026:
027: /**
028: * This is the <CODE>BeanInfo</CODE> class for <CODE>SquirrelPreferences</CODE>.
029: *
030: * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
031: */
032: public class SquirrelPreferencesBeanInfo extends SimpleBeanInfo
033: implements SquirrelPreferences.IPropertyNames {
034: private static PropertyDescriptor[] s_dscrs;
035:
036: @SuppressWarnings("unchecked")
037: private static Class CLS = SquirrelPreferences.class;
038:
039: public SquirrelPreferencesBeanInfo() throws IntrospectionException {
040: super ();
041: if (s_dscrs == null) {
042: s_dscrs = new PropertyDescriptor[] {
043: new PropertyDescriptor(SESSION_PROPERTIES, CLS,
044: "getSessionProperties",
045: "setSessionProperties"),
046: new PropertyDescriptor(MAIN_FRAME_STATE, CLS,
047: "getMainFrameWindowState",
048: "setMainFrameWindowState"),
049: new PropertyDescriptor(SHOW_CONTENTS_WHEN_DRAGGING,
050: CLS, "getShowContentsWhenDragging",
051: "setShowContentsWhenDragging"),
052: new PropertyDescriptor(LOGIN_TIMEOUT, CLS,
053: "getLoginTimeout", "setLoginTimeout"),
054: new PropertyDescriptor(LARGE_SCRIPT_STMT_COUNT,
055: CLS, "getLargeScriptStmtCount",
056: "setLargeScriptStmtCount"),
057: new PropertyDescriptor(JDBC_DEBUG_TYPE, CLS,
058: "getJdbcDebugType", "setJdbcDebugType"),
059: new PropertyDescriptor(SHOW_MAIN_STATUS_BAR, CLS,
060: "getShowMainStatusBar",
061: "setShowMainStatusBar"),
062: new PropertyDescriptor(SHOW_MAIN_TOOL_BAR, CLS,
063: "getShowMainToolBar", "setShowMainToolBar"),
064: new PropertyDescriptor(SHOW_ALIASES_TOOL_BAR, CLS,
065: "getShowAliasesToolBar",
066: "setShowAliasesToolBar"),
067: new PropertyDescriptor(SHOW_DRIVERS_TOOL_BAR, CLS,
068: "getShowDriversToolBar",
069: "setShowDriversToolBar"),
070: new PropertyDescriptor(SHOW_TOOLTIPS, CLS,
071: "getShowToolTips", "setShowToolTips"),
072: new PropertyDescriptor(SCROLLABLE_TABBED_PANES,
073: CLS, "getUseScrollableTabbedPanes",
074: "setUseScrollableTabbedPanes"),
075: new IndexedPropertyDescriptor(ACTION_KEYS, CLS,
076: "getActionKeys", "setActionKeys",
077: "getActionKeys", "setActionKeys"),
078: new PropertyDescriptor(PROXY, CLS,
079: "getProxySettings", "setProxySettings"),
080: new PropertyDescriptor(ALIASES_SELECTED_INDEX, CLS,
081: "getAliasesSelectedIndex",
082: "setAliasesSelectedIndex"),
083: new PropertyDescriptor(DRIVERS_SELECTED_INDEX, CLS,
084: "getDriversSelectedIndex",
085: "setDriversSelectedIndex"),
086: new PropertyDescriptor(SHOW_LOADED_DRIVERS_ONLY,
087: CLS, "getShowLoadedDriversOnly",
088: "setShowLoadedDriversOnly"),
089: new PropertyDescriptor(
090: MAXIMIMIZE_SESSION_SHEET_ON_OPEN, CLS,
091: "getMaximizeSessionSheetOnOpen",
092: "setMaximizeSessionSheetOnOpen"),
093: new PropertyDescriptor(SHOW_COLOR_ICONS_IN_TOOLBAR,
094: CLS, "getShowColoriconsInToolbar",
095: "setShowColoriconsInToolbar"),
096: new PropertyDescriptor(FIRST_RUN, CLS,
097: "isFirstRun", "setFirstRun"),
098: new PropertyDescriptor(CONFIRM_SESSION_CLOSE, CLS,
099: "getConfirmSessionClose",
100: "setConfirmSessionClose"),
101: new IndexedPropertyDescriptor(PLUGIN_STATUSES, CLS,
102: "getPluginStatuses", "setPluginStatuses",
103: "getPluginStatus", "setPluginStatus"),
104: new PropertyDescriptor(NEW_SESSION_VIEW, CLS,
105: "getNewSessionView", "setNewSessionView"),
106: new PropertyDescriptor(FILE_OPEN_IN_PREVIOUS_DIR,
107: CLS, "isFileOpenInPreviousDir",
108: "setFileOpenInPreviousDir"),
109: new PropertyDescriptor(FILE_OPEN_IN_SPECIFIED_DIR,
110: CLS, "isFileOpenInSpecifiedDir",
111: "setFileOpenInSpecifiedDir"),
112: new PropertyDescriptor(FILE_SPECIFIED_DIR, CLS,
113: "getFileSpecifiedDir",
114: "setFileSpecifiedDir"),
115: new PropertyDescriptor(FILE_PREVIOUS_DIR, CLS,
116: "getFilePreviousDir", "setFilePreviousDir"),
117: new PropertyDescriptor(
118: SHOW_PLUGIN_FILES_IN_SPLASH_SCREEN, CLS,
119: "getShowPluginFilesInSplashScreen",
120: "setShowPluginFilesInSplashScreen"),
121: new PropertyDescriptor(WARN_JRE_JDBC_MISMATCH, CLS,
122: "getWarnJreJdbcMismatch",
123: "setWarnJreJdbcMismatch"),
124: new PropertyDescriptor(WARN_FOR_UNSAVED_FILE_EDITS,
125: CLS, "getWarnForUnsavedFileEdits",
126: "setWarnForUnsavedFileEdits"),
127: new PropertyDescriptor(
128: WARN_FOR_UNSAVED_BUFFER_EDITS, CLS,
129: "getWarnForUnsavedBufferEdits",
130: "setWarnForUnsavedBufferEdits"),
131: new PropertyDescriptor(
132: SHOW_SESSION_STARTUP_TIME_HINT, CLS,
133: "getShowSessionStartupTimeHint",
134: "setShowSessionStartupTimeHint"),
135: new PropertyDescriptor(SHOW_DEBUG_LOG_MESSAGES,
136: CLS, "getShowDebugLogMessages",
137: "setShowDebugLogMessages"),
138: new PropertyDescriptor(SHOW_INFO_LOG_MESSAGES, CLS,
139: "getShowInfoLogMessages",
140: "setShowInfoLogMessages"),
141: new PropertyDescriptor(SHOW_ERROR_LOG_MESSAGES,
142: CLS, "getShowErrorLogMessages",
143: "setShowErrorLogMessages"),
144: new PropertyDescriptor(
145: SAVE_PREFERENCES_IMMEDIATELY, CLS,
146: "getSavePreferencesImmediately",
147: "setSavePreferencesImmediately"), };
148: }
149: }
150:
151: public PropertyDescriptor[] getPropertyDescriptors() {
152: return s_dscrs;
153: }
154: }
|