Source Code Cross Referenced for ConnectionProfileEditor.java in  » Database-Client » iSQL-Viewer » org » isqlviewer » ui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database Client » iSQL Viewer » org.isqlviewer.ui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * The contents of this file are subject to the Mozilla Public License
003:         * Version 1.1 (the "License"); you may not use this file except in
004:         * compliance with the License. You may obtain a copy of the License at
005:         * http://www.mozilla.org/MPL/
006:         *
007:         * Software distributed under the License is distributed on an "AS IS"
008:         * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
009:         * License for the specific language governing rights and limitations
010:         * under the License.
011:         * 
012:         * The Original Code is iSQL-Viewer, A Mutli-Platform Database Tool.
013:         *
014:         * The Initial Developer of the Original Code is iSQL-Viewer, A Mutli-Platform Database Tool.
015:         * Portions created by Mark A. Kobold are Copyright (C) 2000-2007. All Rights Reserved.
016:         *
017:         * Contributor(s): 
018:         *  Mark A. Kobold [mkobold <at> isqlviewer <dot> com].
019:         *  
020:         * If you didn't download this code from the following link, you should check
021:         * if you aren't using an obsolete version: http://www.isqlviewer.com
022:         */
023:        package org.isqlviewer.ui;
024:
025:        import java.awt.GridBagConstraints;
026:        import java.awt.GridBagLayout;
027:        import java.util.prefs.Preferences;
028:
029:        import javax.swing.BorderFactory;
030:        import javax.swing.Box;
031:        import javax.swing.BoxLayout;
032:        import javax.swing.JCheckBox;
033:        import javax.swing.JComponent;
034:        import javax.swing.JLabel;
035:        import javax.swing.JMenuBar;
036:        import javax.swing.JPanel;
037:        import javax.swing.JSpinner;
038:        import javax.swing.SpinnerNumberModel;
039:
040:        import org.isqlviewer.sql.ConnectionProfile;
041:        import org.isqlviewer.swing.action.SwingEventManager;
042:        import org.isqlviewer.util.LocalMessages;
043:
044:        /**
045:         * @author Mark A. Kobold &lt;mkobold at isqlviewer dot com&gt;
046:         * @version 1.0
047:         */
048:        public class ConnectionProfileEditor extends AbstractApplicationView {
049:
050:            private LocalMessages messages = new LocalMessages(
051:                    "org.isqlviewer.ui.ResourceBundle");
052:            private JComponent componentOwner = null;
053:
054:            public void configureMenubar(JMenuBar menuBar) {
055:
056:            }
057:
058:            public void disposeView(Preferences preferences) {
059:
060:                componentOwner.removeAll();
061:                componentOwner = null;
062:            }
063:
064:            public void doLayout(JComponent parentComponent,
065:                    Preferences preferences, SwingEventManager eventManager) {
066:
067:                this .componentOwner = parentComponent;
068:                parentComponent.setLayout(new BoxLayout(parentComponent,
069:                        BoxLayout.Y_AXIS));
070:
071:                JPanel panel = new JPanel();
072:                panel.setLayout(new GridBagLayout());
073:                GridBagConstraints constraint = null;
074:                String title = messages
075:                        .format("connection_profile.jdbc_options");
076:                String tip = null;
077:                JLabel label = null;
078:                panel.setBorder(BorderFactory.createTitledBorder(BorderFactory
079:                        .createLoweredBevelBorder(), title));
080:
081:                title = messages.format("connection_profile.maximum_rows");
082:                tip = messages.format("connection_profile.maximum_rows.tip");
083:                JComponent component = new JSpinner();
084:                ((JSpinner) component).setModel(new SpinnerNumberModel(0, 0,
085:                        Integer.MAX_VALUE, 1));
086:                ((JSpinner) component).setEditor(new JSpinner.NumberEditor(
087:                        (JSpinner) component));
088:                component.setName(ConnectionProfile.JDBC_MAX_ROWS);
089:                component.setToolTipText(tip);
090:                constraint = constrain(0, 0, 1, 1, 0.0, 0.0,
091:                        GridBagConstraints.WEST, GridBagConstraints.NONE);
092:                label = new JLabel(title);
093:                label.setLabelFor(component);
094:                panel.add(label, constraint);
095:                constraint = constrain(1, 0, 1, 1, 1.0, 0.0,
096:                        GridBagConstraints.CENTER,
097:                        GridBagConstraints.HORIZONTAL);
098:                panel.add(component, constraint);
099:
100:                title = messages
101:                        .format("connection_profile.maximum_field_size");
102:                tip = messages
103:                        .format("connection_profile.maximum_field_size.tip");
104:                component = new JSpinner();
105:                ((JSpinner) component).setModel(new SpinnerNumberModel(0, 0,
106:                        Integer.MAX_VALUE, 1));
107:                ((JSpinner) component).setEditor(new JSpinner.NumberEditor(
108:                        (JSpinner) component));
109:
110:                component.setName(ConnectionProfile.JDBC_MAX_FIELD_SIZE);
111:                component.setToolTipText(tip);
112:                constraint = constrain(0, 1, 1, 1, 0.0, 0.0,
113:                        GridBagConstraints.WEST, GridBagConstraints.NONE);
114:                label = new JLabel(title);
115:                label.setLabelFor(component);
116:                panel.add(label, constraint);
117:                constraint = constrain(1, 1, 1, 1, 1.0, 0.0,
118:                        GridBagConstraints.CENTER,
119:                        GridBagConstraints.HORIZONTAL);
120:                panel.add(component, constraint);
121:
122:                title = messages
123:                        .format("connection_profile.is_escape_processing");
124:                tip = messages
125:                        .format("connection_profile.is_escape_processing.tip");
126:                component = new JCheckBox(title);
127:                component.setName(ConnectionProfile.JDBC_ESCAPE_PROC);
128:                component.setToolTipText(tip);
129:                constraint = constrain(0, 2, 2, 1, 1.0, 0.0,
130:                        GridBagConstraints.CENTER,
131:                        GridBagConstraints.HORIZONTAL);
132:                panel.add(component, constraint);
133:
134:                title = messages.format("connection_profile.tracing_enabled");
135:                tip = messages.format("connection_profile.tracing_enabled.tip");
136:                component = new JCheckBox(title);
137:                component.setName(ConnectionProfile.JDBC_TRACE_ENABLED);
138:                component.setToolTipText(tip);
139:                constraint = constrain(0, 3, 2, 1, 1.0, 0.0,
140:                        GridBagConstraints.CENTER,
141:                        GridBagConstraints.HORIZONTAL);
142:                panel.add(component, constraint);
143:
144:                title = messages
145:                        .format("connection_profile.use_reverse_fetching");
146:                tip = messages
147:                        .format("connection_profile.use_reverse_fetching.tip");
148:                component = new JCheckBox(title);
149:                component.setName(ConnectionProfile.JDBC_REVERSE_FETCHING);
150:                component.setToolTipText(tip);
151:                constraint = constrain(0, 4, 2, 1, 1.0, 0.0,
152:                        GridBagConstraints.CENTER,
153:                        GridBagConstraints.HORIZONTAL);
154:                panel.add(component, constraint);
155:
156:                title = messages
157:                        .format("connection_profile.generate_resultset_keys");
158:                tip = messages
159:                        .format("connection_profile.generate_resultset_keys.tip");
160:                component = new JCheckBox(title);
161:                component.setName(ConnectionProfile.JDBC_GENERATE_KEYS);
162:                component.setToolTipText(tip);
163:                constraint = constrain(0, 5, 2, 1, 1.0, 0.0,
164:                        GridBagConstraints.CENTER,
165:                        GridBagConstraints.HORIZONTAL);
166:                panel.add(component, constraint);
167:
168:                component = (JComponent) Box.createVerticalGlue();
169:                component.setName("GLUE");
170:                component.setToolTipText(tip);
171:                constraint = constrain(0, 6, 2, 1, 0.0, 1.0,
172:                        GridBagConstraints.CENTER, GridBagConstraints.VERTICAL);
173:                panel.add(component, constraint);
174:
175:                parentComponent.add(panel);
176:            }
177:
178:            public void initializeView() {
179:
180:            }
181:
182:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.