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


001:        /*
002:         * Copyright (C) 2005 - 2008 JasperSoft Corporation.  All rights reserved. 
003:         * http://www.jaspersoft.com.
004:         *
005:         * Unless you have purchased a commercial license agreement from JasperSoft,
006:         * the following license terms apply:
007:         *
008:         * This program is free software; you can redistribute it and/or modify
009:         * it under the terms of the GNU General Public License version 2 as published by
010:         * the Free Software Foundation.
011:         *
012:         * This program is distributed WITHOUT ANY WARRANTY; and without the
013:         * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
014:         * See the GNU General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU General Public License
017:         * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
018:         * or write to:
019:         *
020:         * Free Software Foundation, Inc.,
021:         * 59 Temple Place - Suite 330,
022:         * Boston, MA  USA  02111-1307
023:         *
024:         *
025:         *
026:         *
027:         * ImportDialog.java
028:         * 
029:         * Created on 12 novembre 2004, 0.06
030:         *
031:         */
032:
033:        package it.businesslogic.ireport.gui.style;
034:
035:        import it.businesslogic.ireport.gui.*;
036:        import it.businesslogic.ireport.util.I18n;
037:
038:        /**
039:         *
040:         * @author  Administrator
041:         */
042:        public class TemplateDataDialog extends javax.swing.JDialog {
043:
044:            private String template;
045:            private int dialogResult = javax.swing.JOptionPane.CANCEL_OPTION;
046:
047:            /** Creates new form ImportDialog */
048:            public TemplateDataDialog(java.awt.Frame parent, boolean modal) {
049:                super (parent, modal);
050:                initComponents();
051:                initFrame();
052:            }
053:
054:            public void initFrame() {
055:                this .setSize(400, 100);
056:                applyI18n();
057:                it.businesslogic.ireport.util.Misc.centerFrame(this );
058:
059:                javax.swing.KeyStroke escape = javax.swing.KeyStroke
060:                        .getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0,
061:                                false);
062:                javax.swing.Action escapeAction = new javax.swing.AbstractAction() {
063:                    public void actionPerformed(java.awt.event.ActionEvent e) {
064:                        jButtonCancelActionPerformed(e);
065:                    }
066:                };
067:
068:                getRootPane().getInputMap(
069:                        javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW).put(
070:                        escape, "ESCAPE");
071:                getRootPane().getActionMap().put("ESCAPE", escapeAction);
072:
073:                //to make the default button ...
074:                this .getRootPane().setDefaultButton(this .jButtonOK);
075:            }
076:
077:            /** This method is called from within the constructor to
078:             * initialize the form.
079:             * WARNING: Do NOT modify this code. The content of this method is
080:             * always regenerated by the Form Editor.
081:             */
082:            // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
083:            private void initComponents() {
084:                java.awt.GridBagConstraints gridBagConstraints;
085:
086:                jLabel1 = new javax.swing.JLabel();
087:                jTextField1 = new javax.swing.JTextField();
088:                jPanel1 = new javax.swing.JPanel();
089:                jPanel2 = new javax.swing.JPanel();
090:                jButtonOK = new javax.swing.JButton();
091:                jButtonCancel = new javax.swing.JButton();
092:
093:                setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
094:                setTitle("Import");
095:                setModal(true);
096:                setResizable(false);
097:                getContentPane().setLayout(new java.awt.GridBagLayout());
098:
099:                jLabel1.setText("Template");
100:                gridBagConstraints = new java.awt.GridBagConstraints();
101:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
102:                gridBagConstraints.insets = new java.awt.Insets(4, 4, 0, 4);
103:                getContentPane().add(jLabel1, gridBagConstraints);
104:                gridBagConstraints = new java.awt.GridBagConstraints();
105:                gridBagConstraints.gridx = 0;
106:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
107:                gridBagConstraints.weightx = 1.0;
108:                gridBagConstraints.insets = new java.awt.Insets(0, 4, 0, 4);
109:                getContentPane().add(jTextField1, gridBagConstraints);
110:
111:                jPanel1.setLayout(new java.awt.GridBagLayout());
112:                gridBagConstraints = new java.awt.GridBagConstraints();
113:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
114:                gridBagConstraints.weightx = 1.0;
115:                jPanel1.add(jPanel2, gridBagConstraints);
116:
117:                jButtonOK.setText("Ok");
118:                jButtonOK
119:                        .addActionListener(new java.awt.event.ActionListener() {
120:                            public void actionPerformed(
121:                                    java.awt.event.ActionEvent evt) {
122:                                jButtonOKActionPerformed(evt);
123:                            }
124:                        });
125:                gridBagConstraints = new java.awt.GridBagConstraints();
126:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
127:                gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST;
128:                jPanel1.add(jButtonOK, gridBagConstraints);
129:
130:                jButtonCancel.setText("Cancel");
131:                jButtonCancel
132:                        .addActionListener(new java.awt.event.ActionListener() {
133:                            public void actionPerformed(
134:                                    java.awt.event.ActionEvent evt) {
135:                                jButtonCancelActionPerformed(evt);
136:                            }
137:                        });
138:                gridBagConstraints = new java.awt.GridBagConstraints();
139:                gridBagConstraints.insets = new java.awt.Insets(0, 4, 0, 4);
140:                jPanel1.add(jButtonCancel, gridBagConstraints);
141:
142:                gridBagConstraints = new java.awt.GridBagConstraints();
143:                gridBagConstraints.gridx = 0;
144:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
145:                gridBagConstraints.weightx = 1.0;
146:                gridBagConstraints.weighty = 1.0;
147:                getContentPane().add(jPanel1, gridBagConstraints);
148:
149:                pack();
150:            }// </editor-fold>//GEN-END:initComponents
151:
152:            private void jButtonOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOKActionPerformed
153:                if (jTextField1.getText().trim().length() == 0) {
154:                    javax.swing.JOptionPane
155:                            .showMessageDialog(
156:                                    null,
157:                                    I18n
158:                                            .getString(
159:                                                    "messages.templateDataDialog.notValidTemplate",
160:                                                    "Please insert a valid template name"));
161:                    return;
162:                }
163:
164:                this .setTemplate(jTextField1.getText().trim());
165:                this .setDialogResult(javax.swing.JOptionPane.OK_OPTION);
166:                this .setVisible(false);
167:            }//GEN-LAST:event_jButtonOKActionPerformed
168:
169:            private void jButtonCancelActionPerformed(
170:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelActionPerformed
171:                this .setDialogResult(javax.swing.JOptionPane.CANCEL_OPTION);
172:                this .setVisible(false);
173:
174:            }//GEN-LAST:event_jButtonCancelActionPerformed
175:
176:            public String getTemplate() {
177:                return template;
178:            }
179:
180:            public void setTemplate(String template) {
181:                this .template = template;
182:                jTextField1.setText(template);
183:            }
184:
185:            public int getDialogResult() {
186:                return dialogResult;
187:            }
188:
189:            public void setDialogResult(int dialogResult) {
190:                this .dialogResult = dialogResult;
191:            }
192:
193:            // Variables declaration - do not modify//GEN-BEGIN:variables
194:            private javax.swing.JButton jButtonCancel;
195:            private javax.swing.JButton jButtonOK;
196:            private javax.swing.JLabel jLabel1;
197:            private javax.swing.JPanel jPanel1;
198:            private javax.swing.JPanel jPanel2;
199:            private javax.swing.JTextField jTextField1;
200:
201:            // End of variables declaration//GEN-END:variables
202:
203:            public void applyI18n() {
204:                // Start autogenerated code ----------------------
205:                jButtonCancel.setText(I18n.getString(
206:                        "templateDataDialog.buttonCancel", "Cancel"));
207:                jButtonOK.setText(I18n.getString("templateDataDialog.buttonOK",
208:                        "Ok"));
209:                jLabel1.setText(I18n.getString("templateDataDialog.label1",
210:                        "Template"));
211:                // End autogenerated code ----------------------
212:
213:                this .setTitle(I18n.getString("templateDataDialog.title",
214:                        "Template"));
215:                jButtonCancel.setMnemonic(I18n.getString(
216:                        "templateDataDialog.buttonCancelMnemonic", "c").charAt(
217:                        0));
218:                jButtonOK.setMnemonic(I18n.getString(
219:                        "templateDataDialog.buttonOKMnemonic", "o").charAt(0));
220:
221:            }
222:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.