001: package net.sourceforge.squirrel_sql.client.session.properties;
002:
003: /*
004: * Copyright (C) 2001-2003 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.IntrospectionException;
023: import java.beans.PropertyDescriptor;
024: import java.beans.SimpleBeanInfo;
025:
026: /**
027: * This is the <CODE>BeanInfo</CODE> class for <CODE>SessionProperties</CODE>.
028: *
029: * @author <A HREF="mailto:colbell@users.sourceforge.net">Colin Bell</A>
030: */
031: public class SessionPropertiesBeanInfo extends SimpleBeanInfo {
032: private static PropertyDescriptor[] s_dscrs;
033: private static Class<SessionProperties> CLAZZ = SessionProperties.class;
034:
035: private interface IPropNames extends
036: SessionProperties.IPropertyNames {
037: // Empty body.
038: }
039:
040: public SessionPropertiesBeanInfo() throws IntrospectionException {
041: super ();
042: if (s_dscrs == null) {
043: s_dscrs = new PropertyDescriptor[] {
044: new PropertyDescriptor(IPropNames.AUTO_COMMIT,
045: CLAZZ, "getAutoCommit", "setAutoCommit"),
046: new PropertyDescriptor(
047: IPropNames.COMMIT_ON_CLOSING_CONNECTION,
048: CLAZZ, "getCommitOnClosingConnection",
049: "setCommitOnClosingConnection"),
050: new PropertyDescriptor(
051: IPropNames.CONTENTS_LIMIT_ROWS, CLAZZ,
052: "getContentsLimitRows",
053: "setContentsLimitRows"),
054: new PropertyDescriptor(
055: IPropNames.CONTENTS_NBR_ROWS_TO_SHOW,
056: CLAZZ, "getContentsNbrRowsToShow",
057: "setContentsNbrRowsToShow"),
058: new PropertyDescriptor(IPropNames.FONT_INFO, CLAZZ,
059: "getFontInfo", "setFontInfo"),
060: new PropertyDescriptor(
061: IPropNames.META_DATA_OUTPUT_CLASS_NAME,
062: CLAZZ, "getMetaDataOutputClassName",
063: "setMetaDataOutputClassName"),
064: new PropertyDescriptor(IPropNames.SHOW_ROW_COUNT,
065: CLAZZ, "getShowRowCount", "setShowRowCount"),
066: new PropertyDescriptor(IPropNames.SHOW_TOOL_BAR,
067: CLAZZ, "getShowToolBar", "setShowToolBar"),
068: new PropertyDescriptor(IPropNames.SQL_LIMIT_ROWS,
069: CLAZZ, "getSQLLimitRows", "setSQLLimitRows"),
070: new PropertyDescriptor(
071: IPropNames.SQL_NBR_ROWS_TO_SHOW, CLAZZ,
072: "getSQLNbrRowsToShow",
073: "setSQLNbrRowsToShow"),
074: new PropertyDescriptor(
075: IPropNames.SQL_STATEMENT_SEPARATOR_STRING,
076: CLAZZ, "getSQLStatementSeparator",
077: "setSQLStatementSeparator"),
078: new PropertyDescriptor(
079: IPropNames.SQL_RESULTS_OUTPUT_CLASS_NAME,
080: CLAZZ, "getSQLResultsOutputClassName",
081: "setSQLResultsOutputClassName"),
082: new PropertyDescriptor(
083: IPropNames.SQL_START_OF_LINE_COMMENT,
084: CLAZZ, "getStartOfLineComment",
085: "setStartOfLineComment"),
086: new PropertyDescriptor(
087: IPropNames.REMOVE_MULTI_LINE_COMMENT,
088: CLAZZ, "getRemoveMultiLineComment",
089: "setRemoveMultiLineComment"),
090: new PropertyDescriptor(
091: IPropNames.LIMIT_SQL_ENTRY_HISTORY_SIZE,
092: CLAZZ, "getLimitSQLEntryHistorySize",
093: "setLimitSQLEntryHistorySize"),
094: new PropertyDescriptor(
095: IPropNames.SQL_ENTRY_HISTORY_SIZE, CLAZZ,
096: "getSQLEntryHistorySize",
097: "setSQLEntryHistorySize"),
098: new PropertyDescriptor(
099: IPropNames.SQL_SHARE_HISTORY, CLAZZ,
100: "getSQLShareHistory", "setSQLShareHistory"),
101: new PropertyDescriptor(
102: IPropNames.MAIN_TAB_PLACEMENT, CLAZZ,
103: "getMainTabPlacement",
104: "setMainTabPlacement"),
105: new PropertyDescriptor(
106: IPropNames.OBJECT_TAB_PLACEMENT, CLAZZ,
107: "getObjectTabPlacement",
108: "setObjectTabPlacement"),
109: new PropertyDescriptor(
110: IPropNames.SQL_EXECUTION_TAB_PLACEMENT,
111: CLAZZ, "getSQLExecutionTabPlacement",
112: "setSQLExecutionTabPlacement"),
113: new PropertyDescriptor(
114: IPropNames.SQL_RESULTS_TAB_PLACEMENT,
115: CLAZZ, "getSQLResultsTabPlacement",
116: "setSQLResultsTabPlacement"),
117: new PropertyDescriptor(
118: IPropNames.TABLE_CONTENTS_OUTPUT_CLASS_NAME,
119: CLAZZ, "getTableContentsOutputClassName",
120: "setTableContentsOutputClassName"),
121: new PropertyDescriptor(IPropNames.ABORT_ON_ERROR,
122: CLAZZ, "getAbortOnError", "setAbortOnError"),
123: new PropertyDescriptor(
124: IPropNames.SQL_RESULT_TAB_LIMIT, CLAZZ,
125: "getSqlResultTabLimit",
126: "setSqlResultTabLimit"),
127: new PropertyDescriptor(
128: IPropNames.LIMIT_SQL_RESULT_TABS, CLAZZ,
129: "getLimitSqlResultTabs",
130: "setLimitSqlResultTabs"),
131: new PropertyDescriptor(
132: IPropNames.SCHEMA_PREFIX_LIST, CLAZZ,
133: "getSchemaPrefixList",
134: "setSchemaPrefixList"),
135: new PropertyDescriptor(
136: IPropNames.LOAD_SCHEMAS_CATALOGS, CLAZZ,
137: "getLoadSchemasCatalogs",
138: "setLoadSchemasCatalogs"),
139: new PropertyDescriptor(
140: IPropNames.SHOW_RESULTS_META_DATA, CLAZZ,
141: "getShowResultsMetaData",
142: "setShowResultsMetaData"),
143: new PropertyDescriptor(IPropNames.OBJECT_FILTER,
144: CLAZZ, "getObjectFilter", "setObjectFilter") };
145: }
146: }
147:
148: public PropertyDescriptor[] getPropertyDescriptors() {
149: return s_dscrs;
150: }
151: }
|