Source Code Cross Referenced for ConnectionPanel.java in  » Database-Client » PKLite-SQL-Client » com » pk » script » 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 » PKLite SQL Client » com.pk.script.ui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Created on Sep 29, 2004
003:         *
004:         * @author ctaylor
005:         * 
006:         */
007:        package com.pk.script.ui;
008:
009:        import java.awt.Color;
010:        import java.awt.GridBagConstraints;
011:        import java.awt.GridBagLayout;
012:        import java.awt.Insets;
013:        import java.awt.event.ActionListener;
014:
015:        import javax.swing.BorderFactory;
016:        import javax.swing.JButton;
017:        import javax.swing.JLabel;
018:        import javax.swing.JPanel;
019:        import javax.swing.JTextField;
020:
021:        /**
022:         * @author ctaylor
023:         *
024:         */
025:        public class ConnectionPanel extends JPanel {
026:            /**
027:             * 
028:             */
029:            private static final long serialVersionUID = 4254774480356323583L;
030:            private JTextField connNameLabel;
031:            private JTextField userNameLabel;
032:            private JButton newConnectionButton;
033:            private JButton loadButton;
034:            private JButton pasteButton;
035:            private JButton saveButton;
036:            private JButton runButton;
037:            private JButton closeButton;
038:            private JButton commitButton;
039:            private JButton rollbackButton;
040:
041:            private ActionListener actionListener;
042:
043:            public ConnectionPanel(ActionListener argActionListener) {
044:                actionListener = argActionListener;
045:                this .setLayout(new GridBagLayout());
046:                GridBagConstraints gbc = new GridBagConstraints();
047:                gbc.anchor = GridBagConstraints.NORTH;
048:                gbc.insets = new Insets(6, 5, 6, 5);
049:
050:                JLabel label = null;
051:                gbc.gridx = 0;
052:                gbc.gridy = 0;
053:                label = new JLabel("Connection Name:", JLabel.LEFT);
054:                this .add(label, gbc);
055:
056:                gbc.gridy++;
057:                label = new JLabel("User Name:", JLabel.LEFT);
058:                this .add(label, gbc);
059:
060:                gbc.gridx = 1;
061:                gbc.gridy = 0;
062:
063:                connNameLabel = new JTextField(10);
064:                connNameLabel.setEditable(false);
065:                connNameLabel.setBorder(BorderFactory
066:                        .createLineBorder(Color.black));
067:                this .add(connNameLabel, gbc);
068:
069:                gbc.gridy++;
070:                userNameLabel = new JTextField(10);
071:                userNameLabel.setEditable(false);
072:                userNameLabel.setBorder(BorderFactory
073:                        .createLineBorder(Color.black));
074:                this .add(userNameLabel, gbc);
075:
076:                GridBagConstraints gbc2 = new GridBagConstraints();
077:                gbc2.anchor = GridBagConstraints.CENTER;
078:                gbc2.insets = new Insets(6, 5, 6, 5);
079:                gbc2.gridx = 2;
080:                gbc2.gridy = 0;
081:
082:                this .setBorder(BorderFactory.createLineBorder(Color.black));
083:                newConnectionButton = new JButton("New Connection");
084:                newConnectionButton.addActionListener(actionListener);
085:                this .add(newConnectionButton, gbc2);
086:
087:                gbc2.gridx++;
088:                loadButton = new JButton("Load Script");
089:                loadButton
090:                        .setToolTipText("Load a script file into the script runner");
091:                loadButton.addActionListener(actionListener);
092:                this .add(loadButton, gbc2);
093:
094:                gbc2.gridx++;
095:                saveButton = new JButton("Save Script");
096:                saveButton.setToolTipText("Save current script to a file");
097:                saveButton.addActionListener(actionListener);
098:                this .add(saveButton, gbc2);
099:
100:                gbc2.gridx++;
101:                pasteButton = new JButton("Paste Script");
102:                pasteButton
103:                        .setToolTipText("Paste a script or command from the clipboard");
104:                pasteButton.addActionListener(actionListener);
105:                this .add(pasteButton, gbc2);
106:
107:                gbc2.gridx = 2;
108:                gbc2.gridy = 1;
109:
110:                runButton = new JButton("Run");
111:                runButton.setToolTipText("Run current script");
112:                runButton.addActionListener(actionListener);
113:                this .add(runButton, gbc2);
114:
115:                gbc2.gridx++;
116:
117:                commitButton = new JButton("Commit");
118:                commitButton.setToolTipText("Commit current transaction");
119:                commitButton.addActionListener(actionListener);
120:                this .add(commitButton, gbc2);
121:
122:                gbc2.gridx++;
123:                rollbackButton = new JButton("Rollback");
124:                rollbackButton.setToolTipText("Rollback current transaction");
125:                rollbackButton.addActionListener(actionListener);
126:                this .add(rollbackButton, gbc2);
127:
128:                gbc2.gridx++;
129:                closeButton = new JButton("Close");
130:                closeButton.setToolTipText("Close script runner");
131:                closeButton.addActionListener(actionListener);
132:                this .add(closeButton, gbc2);
133:
134:            }
135:
136:            /**
137:             * @return Returns the connNameLabel.
138:             */
139:            public JTextField getConnNameLabel() {
140:                return connNameLabel;
141:            }
142:
143:            /**
144:             * @return Returns the newConnectionButton.
145:             */
146:            public JButton getNewConnectionButton() {
147:                return newConnectionButton;
148:            }
149:
150:            /**
151:             * @return Returns the userNameLabel.
152:             */
153:            public JTextField getUserNameLabel() {
154:                return userNameLabel;
155:            }
156:
157:            /**
158:             * @param actionListener The actionListener to set.
159:             */
160:            public void setActionListener(ActionListener actionListener) {
161:                this .actionListener = actionListener;
162:            }
163:
164:            /**
165:             * @return Returns the loadButton.
166:             */
167:            public JButton getLoadButton() {
168:                return loadButton;
169:            }
170:
171:            /**
172:             * @return Returns the pasteButton.
173:             */
174:            public JButton getPasteButton() {
175:                return pasteButton;
176:            }
177:
178:            /**
179:             * @return Returns the saveButton.
180:             */
181:            public JButton getSaveButton() {
182:                return saveButton;
183:            }
184:
185:            /**
186:             * @return Returns the runButton.
187:             */
188:            public JButton getRunButton() {
189:                return runButton;
190:            }
191:
192:            /**
193:             * @return Returns the closeButton.
194:             */
195:            public JButton getCloseButton() {
196:                return closeButton;
197:            }
198:
199:            /**
200:             * @param closeButton The closeButton to set.
201:             */
202:            public void setCloseButton(JButton closeButton) {
203:                this .closeButton = closeButton;
204:            }
205:
206:            /**
207:             * @return Returns the commitButton.
208:             */
209:            public JButton getCommitButton() {
210:                return commitButton;
211:            }
212:
213:            /**
214:             * @return Returns the rollbackButton.
215:             */
216:            public JButton getRollbackButton() {
217:                return rollbackButton;
218:            }
219:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.