Source Code Cross Referenced for JRCustomDataSourceConnectionEditor.java in  » Report » iReport-2.0.5 » it » businesslogic » ireport » connection » gui » 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 » Report » iReport 2.0.5 » it.businesslogic.ireport.connection.gui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * EJBQLConnectionEditor.java
003:         *
004:         * Created on March 27, 2007, 1:18 PM
005:         */
006:
007:        package it.businesslogic.ireport.connection.gui;
008:
009:        import it.businesslogic.ireport.IReportConnection;
010:        import it.businesslogic.ireport.IReportConnectionEditor;
011:        import it.businesslogic.ireport.connection.JRCustomDataSourceConnection;
012:        import it.businesslogic.ireport.util.I18n;
013:
014:        /**
015:         *
016:         * @author  gtoffoli
017:         */
018:        public class JRCustomDataSourceConnectionEditor extends
019:                javax.swing.JPanel implements  IReportConnectionEditor {
020:
021:            private IReportConnection iReportConnection = null;
022:            private boolean init = false;
023:
024:            /** Creates new form EJBQLConnectionEditor */
025:            public JRCustomDataSourceConnectionEditor() {
026:                initComponents();
027:                applyI18n();
028:            }
029:
030:            /** This method is called from within the constructor to
031:             * initialize the form.
032:             * WARNING: Do NOT modify this code. The content of this method is
033:             * always regenerated by the Form Editor.
034:             */
035:            // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
036:            private void initComponents() {
037:                java.awt.GridBagConstraints gridBagConstraints;
038:
039:                jPanelCustomDataSourceFactory = new javax.swing.JPanel();
040:                jLabel10 = new javax.swing.JLabel();
041:                jTextFieldJRCustomDataSourceFactoryClass = new javax.swing.JTextField();
042:                jLabel11 = new javax.swing.JLabel();
043:                jTextFieldJRCustomDataSourceMethod = new javax.swing.JTextField();
044:
045:                setLayout(new java.awt.BorderLayout());
046:
047:                jPanelCustomDataSourceFactory
048:                        .setLayout(new java.awt.GridBagLayout());
049:
050:                jLabel10.setText("Factory class");
051:                gridBagConstraints = new java.awt.GridBagConstraints();
052:                gridBagConstraints.gridx = 0;
053:                gridBagConstraints.gridy = 0;
054:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
055:                gridBagConstraints.insets = new java.awt.Insets(3, 5, 3, 3);
056:                jPanelCustomDataSourceFactory.add(jLabel10, gridBagConstraints);
057:
058:                jTextFieldJRCustomDataSourceFactoryClass
059:                        .setText("it.businesslogic.ireport.connection.SampleJRDataSourceFactory");
060:                gridBagConstraints = new java.awt.GridBagConstraints();
061:                gridBagConstraints.gridx = 0;
062:                gridBagConstraints.gridy = 1;
063:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
064:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
065:                gridBagConstraints.insets = new java.awt.Insets(3, 5, 3, 3);
066:                jPanelCustomDataSourceFactory.add(
067:                        jTextFieldJRCustomDataSourceFactoryClass,
068:                        gridBagConstraints);
069:
070:                jLabel11
071:                        .setText("The static method to call to retrive the JRDataSource");
072:                gridBagConstraints = new java.awt.GridBagConstraints();
073:                gridBagConstraints.gridx = 0;
074:                gridBagConstraints.gridy = 2;
075:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
076:                gridBagConstraints.insets = new java.awt.Insets(3, 5, 3, 3);
077:                jPanelCustomDataSourceFactory.add(jLabel11, gridBagConstraints);
078:
079:                jTextFieldJRCustomDataSourceMethod.setText("createDatasource");
080:                jTextFieldJRCustomDataSourceMethod
081:                        .setPreferredSize(new java.awt.Dimension(314, 21));
082:                gridBagConstraints = new java.awt.GridBagConstraints();
083:                gridBagConstraints.gridx = 0;
084:                gridBagConstraints.gridy = 3;
085:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
086:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
087:                gridBagConstraints.weightx = 1.0;
088:                gridBagConstraints.weighty = 1.0;
089:                gridBagConstraints.insets = new java.awt.Insets(3, 5, 3, 3);
090:                jPanelCustomDataSourceFactory.add(
091:                        jTextFieldJRCustomDataSourceMethod, gridBagConstraints);
092:
093:                add(jPanelCustomDataSourceFactory, java.awt.BorderLayout.CENTER);
094:
095:            }// </editor-fold>//GEN-END:initComponents
096:
097:            // Variables declaration - do not modify//GEN-BEGIN:variables
098:            private javax.swing.JLabel jLabel10;
099:            private javax.swing.JLabel jLabel11;
100:            private javax.swing.JPanel jPanelCustomDataSourceFactory;
101:            private javax.swing.JTextField jTextFieldJRCustomDataSourceFactoryClass;
102:            private javax.swing.JTextField jTextFieldJRCustomDataSourceMethod;
103:
104:            // End of variables declaration//GEN-END:variables
105:
106:            public void setIReportConnection(IReportConnection c) {
107:
108:                this .iReportConnection = c;
109:                if (iReportConnection instanceof  JRCustomDataSourceConnection) {
110:                    JRCustomDataSourceConnection con = (JRCustomDataSourceConnection) iReportConnection;
111:                    this .jTextFieldJRCustomDataSourceFactoryClass.setText(con
112:                            .getFactoryClass());
113:                    this .jTextFieldJRCustomDataSourceMethod.setText(con
114:                            .getMethodToCall());
115:                }
116:            }
117:
118:            public IReportConnection getIReportConnection() {
119:
120:                IReportConnection irConn = new JRCustomDataSourceConnection();
121:                ((JRCustomDataSourceConnection) irConn)
122:                        .setFactoryClass(this .jTextFieldJRCustomDataSourceFactoryClass
123:                                .getText().trim());
124:                ((JRCustomDataSourceConnection) irConn)
125:                        .setMethodToCall(this .jTextFieldJRCustomDataSourceMethod
126:                                .getText().trim());
127:                iReportConnection = irConn;
128:                return iReportConnection;
129:            }
130:
131:            public void applyI18n() {
132:                // Start autogenerated code ----------------------
133:                jLabel10.setText(I18n.getString("connectionDialog.label10",
134:                        "Factory class"));
135:                jLabel11
136:                        .setText(I18n
137:                                .getString("connectionDialog.label11",
138:                                        "The static method to call to retrive the JRDataSource"));
139:
140:            }
141:
142:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.