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


0001:        /*
0002:         * Copyright (C) 2005 - 2008 JasperSoft Corporation.  All rights reserved. 
0003:         * http://www.jaspersoft.com.
0004:         *
0005:         * Unless you have purchased a commercial license agreement from JasperSoft,
0006:         * the following license terms apply:
0007:         *
0008:         * This program is free software; you can redistribute it and/or modify
0009:         * it under the terms of the GNU General Public License version 2 as published by
0010:         * the Free Software Foundation.
0011:         *
0012:         * This program is distributed WITHOUT ANY WARRANTY; and without the
0013:         * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
0014:         * See the GNU General Public License for more details.
0015:         *
0016:         * You should have received a copy of the GNU General Public License
0017:         * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
0018:         * or write to:
0019:         *
0020:         * Free Software Foundation, Inc.,
0021:         * 59 Temple Place - Suite 330,
0022:         * Boston, MA  USA  02111-1307
0023:         *
0024:         *
0025:         *
0026:         *
0027:         * ReportPropertiesFrame.java
0028:         * 
0029:         * Created on 8 febbraio 2003, 16.25
0030:         *
0031:         */
0032:
0033:        package it.businesslogic.ireport.gui;
0034:
0035:        import it.businesslogic.ireport.gui.sheet.Tag;
0036:        import it.businesslogic.ireport.util.*;
0037:        import javax.swing.*;
0038:        import java.awt.Point;
0039:
0040:        /**
0041:         *
0042:         * @author  Administrator
0043:         */
0044:        public class ReportPropertiesFrame extends javax.swing.JDialog {
0045:
0046:            private it.businesslogic.ireport.util.Unit[] units;
0047:
0048:            /** Holds value of property dialogResult. */
0049:            private int dialogResult;
0050:
0051:            private int reportWidth;
0052:
0053:            private int reportHeight;
0054:
0055:            private int topMargin;
0056:
0057:            private int leftMargin;
0058:
0059:            private int bottomMargin;
0060:
0061:            private int rightMargin;
0062:
0063:            private String orientation;
0064:
0065:            private String scriptletClass;
0066:
0067:            private String resourceBundleBaseName;
0068:
0069:            private String reportName;
0070:
0071:            private int reportHandling = 0;
0072:
0073:            private boolean floatColumnFooter = false;
0074:
0075:            private String language = "java";
0076:
0077:            private String whenResourceMissingType = "Null";
0078:
0079:            private boolean ignorePagination = false;
0080:
0081:            private String formatFactoryClass = "";
0082:
0083:            /** Creates new form ReportPropertiesFrame */
0084:            public ReportPropertiesFrame(java.awt.Frame parent, boolean modal) {
0085:                super (parent, modal);
0086:                initComponents();
0087:
0088:                units = it.businesslogic.ireport.util.Unit.getStandardUnits();
0089:
0090:                // Setting compobox contents...
0091:                for (int i = 0; i < units.length; ++i) {
0092:                    jComboBoxWUnit.addItem(units[i]);
0093:                    jComboBoxHUnit.addItem(units[i]);
0094:                    jComboBoxTopMarginUnit.addItem(units[i]);
0095:                    jComboBoxBottomMarginUnit.addItem(units[i]);
0096:                    jComboBoxLeftMarginUnit.addItem(units[i]);
0097:                    jComboBoxRightMarginUnit.addItem(units[i]);
0098:                    jComboBoxColumnsWidthUnit.addItem(units[i]);
0099:                    jComboBoxColumnsSpacingUnit.addItem(units[i]);
0100:                }
0101:
0102:                //Modified by Felix Firgau for I18n on Feb 8th 2006
0103:
0104:                //jComboBoxScriptletHandling.addItem("Don't use scriptlet");
0105:                jComboBoxScriptletHandling
0106:                        .addItem(it.businesslogic.ireport.util.I18n.getString(
0107:                                "noScriptlet", "Don't use scriptlet"));
0108:                //jComboBoxScriptletHandling.addItem("Use iReport internal scriptlet support");
0109:                jComboBoxScriptletHandling
0110:                        .addItem(it.businesslogic.ireport.util.I18n.getString(
0111:                                "iReportScriptlet",
0112:                                "Use iReport internal scriptlet support"));
0113:                //jComboBoxScriptletHandling.addItem("Use this scriptlet class...");
0114:                jComboBoxScriptletHandling
0115:                        .addItem(it.businesslogic.ireport.util.I18n.getString(
0116:                                "customScriptlet",
0117:                                "Use this scriptlet class..."));
0118:                //Modification end
0119:
0120:                // Set right names to tabs...
0121:                this .jTabbedPane1.setTitleAt(0,
0122:                        it.businesslogic.ireport.util.I18n.getString(
0123:                                "pageMargin", "Page Margin"));
0124:                this .jTabbedPane1.setTitleAt(1,
0125:                        it.businesslogic.ireport.util.I18n.getString("columns",
0126:                                "Columns"));
0127:                this .jTabbedPane1.setTitleAt(2,
0128:                        it.businesslogic.ireport.util.I18n.getString(
0129:                                "scriptlet", "Scriptlet"));
0130:                this .jTabbedPane1.setTitleAt(3,
0131:                        it.businesslogic.ireport.util.I18n.getString("more",
0132:                                "More..."));
0133:
0134:                this .jComboBoxSize.addItem("Custom");
0135:                this .jComboBoxSize.addItem("LETTER");
0136:                this .jComboBoxSize.addItem("NOTE");
0137:                this .jComboBoxSize.addItem("LEGAL");
0138:                this .jComboBoxSize.addItem("A0");
0139:                this .jComboBoxSize.addItem("A1");
0140:                this .jComboBoxSize.addItem("A2");
0141:                this .jComboBoxSize.addItem("A3");
0142:                this .jComboBoxSize.addItem("A4");
0143:                this .jComboBoxSize.addItem("A5");
0144:                this .jComboBoxSize.addItem("A6");
0145:                this .jComboBoxSize.addItem("A7");
0146:                this .jComboBoxSize.addItem("A8");
0147:                this .jComboBoxSize.addItem("A9");
0148:                this .jComboBoxSize.addItem("A10");
0149:                this .jComboBoxSize.addItem("B0");
0150:                this .jComboBoxSize.addItem("B1");
0151:                this .jComboBoxSize.addItem("B2");
0152:                this .jComboBoxSize.addItem("B3");
0153:                this .jComboBoxSize.addItem("B4");
0154:                this .jComboBoxSize.addItem("B5");
0155:                this .jComboBoxSize.addItem("ARCH_E");
0156:                this .jComboBoxSize.addItem("ARCH_D");
0157:                this .jComboBoxSize.addItem("ARCH_C");
0158:                this .jComboBoxSize.addItem("ARCH_B");
0159:                this .jComboBoxSize.addItem("ARCH_A");
0160:                this .jComboBoxSize.addItem("FLSA");
0161:                this .jComboBoxSize.addItem("FLSE");
0162:                this .jComboBoxSize.addItem("HALFLETTER");
0163:                this .jComboBoxSize.addItem("11x17");
0164:                this .jComboBoxSize.addItem("LEDGER");
0165:
0166:                this .jComboBoxOrientation.addItem(new Tag("Portrait",
0167:                        it.businesslogic.ireport.util.I18n.getString(
0168:                                "pageOrientation.Portrait", "Portrait")));
0169:                this .jComboBoxOrientation.addItem(new Tag("Landscape",
0170:                        it.businesslogic.ireport.util.I18n.getString(
0171:                                "pageOrientation.Landscape", "Landscape")));
0172:
0173:                this .jComboBoxPrintOrder.addItem(new Tag("Vertical",
0174:                        it.businesslogic.ireport.util.I18n.getString(
0175:                                "printOrder.Vertical", "Vertical")));
0176:                this .jComboBoxPrintOrder.addItem(new Tag("Horizontal",
0177:                        it.businesslogic.ireport.util.I18n.getString(
0178:                                "printOrder.Horizontal", "Horizontal")));
0179:
0180:                this .jComboBoxWhenNoData.addItem(new Tag("NoPages",
0181:                        it.businesslogic.ireport.util.I18n.getString(
0182:                                "whenNoData.NoPages", "No pages")));
0183:                this .jComboBoxWhenNoData.addItem(new Tag("BlankPage",
0184:                        it.businesslogic.ireport.util.I18n.getString(
0185:                                "whenNoData.BlankPage", "Blank page")));
0186:                this .jComboBoxWhenNoData.addItem(new Tag("AllSectionsNoDetail",
0187:                        it.businesslogic.ireport.util.I18n.getString(
0188:                                "whenNoData.AllSectionsNoDetail",
0189:                                "All sections, no detail")));
0190:                this .jComboBoxWhenNoData
0191:                        .addItem(new Tag("NoDataSection",
0192:                                it.businesslogic.ireport.util.I18n.getString(
0193:                                        "whenNoData.NoDataSection",
0194:                                        "No-data section")));
0195:
0196:                this .jComboBoxXMLEncoding.addItem("UTF-8");
0197:                this .jComboBoxXMLEncoding.addItem("ISO-8859-1");
0198:
0199:                this .jComboBoxLanguage.addItem("java");
0200:                this .jComboBoxLanguage.addItem("groovy");
0201:
0202:                this .jComboBoxLanguage.setSelectedIndex(0);
0203:                // ********** Setting defaults ***************
0204:
0205:                Misc.setComboboxSelectedTagValue(jComboBoxPrintOrder,
0206:                        "Vertical");
0207:                this .jComboBoxWhenNoData.setSelectedItem("NoPages");
0208:                this .jComboBoxXMLEncoding.setSelectedItem("UTF-8");
0209:
0210:                this .jComboBoxWhenResourceMissingType.addItem(new Tag("Null",
0211:                        it.businesslogic.ireport.util.I18n.getString(
0212:                                "whenResourceMissingType.Null", "Null")));
0213:                this .jComboBoxWhenResourceMissingType.addItem(new Tag("Empty",
0214:                        it.businesslogic.ireport.util.I18n.getString(
0215:                                "whenResourceMissingType.Empty", "Empty")));
0216:                this .jComboBoxWhenResourceMissingType.addItem(new Tag("Key",
0217:                        it.businesslogic.ireport.util.I18n.getString(
0218:                                "whenResourceMissingType.Key", "Key")));
0219:                this .jComboBoxWhenResourceMissingType.addItem(new Tag("Error",
0220:                        it.businesslogic.ireport.util.I18n.getString(
0221:                                "whenResourceMissingType.Error", "Error")));
0222:
0223:                this .setReportFormat("A4");
0224:                this .setReportName(it.businesslogic.ireport.util.I18n
0225:                        .getString("untitledReport", "untitled_report_")
0226:                        + "1");//I18N on April 28th 2006
0227:                this .setReportWidth(PageSize.A4.x);
0228:                this .setReportHeight(PageSize.A4.y);
0229:                this .setTopMargin(20);
0230:                this .setBottomMargin(20);
0231:                this .setLeftMargin(30);
0232:                this .setRightMargin(30);
0233:                this .setColumns(1);
0234:                this .setColumnsSpacing(0);
0235:                this .setColumnsWidth(getReportWidth() - getLeftMargin()
0236:                        - getRightMargin());
0237:
0238:                String unit = MainFrame.getMainInstance().getProperties()
0239:                        .getProperty("DefaultUnit", "cm");
0240:
0241:                //jComboBoxWUnitActionPerformed(new java.awt.event.ActionEvent(jComboBoxWUnit,0,""));
0242:                //jComboBoxHUnitActionPerformed(new java.awt.event.ActionEvent(jComboBoxHUnit,0,""));
0243:                int index = Unit.getUnitIndex(unit);
0244:                if (index < 0)
0245:                    index = 2;
0246:                setGlobalUnit(index);
0247:
0248:                this .setLanguage(it.businesslogic.ireport.gui.MainFrame
0249:                        .getMainInstance().getProperties().getProperty(
0250:                                "DefaultScriptingLanguage", "java"));
0251:                applyI18n();
0252:                pack();
0253:
0254:                javax.swing.KeyStroke escape = javax.swing.KeyStroke
0255:                        .getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0,
0256:                                false);
0257:                javax.swing.Action escapeAction = new javax.swing.AbstractAction() {
0258:                    public void actionPerformed(java.awt.event.ActionEvent e) {
0259:                        jButtonCANCELActionPerformed(e);
0260:                    }
0261:                };
0262:
0263:                getRootPane().getInputMap(
0264:                        javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW).put(
0265:                        escape, "ESCAPE");
0266:                getRootPane().getActionMap().put("ESCAPE", escapeAction);
0267:
0268:                //to make the default button ...
0269:                this .getRootPane().setDefaultButton(this .jButtonOK);
0270:
0271:            }
0272:
0273:            /** This method is called from within the constructor to
0274:             * initialize the form.
0275:             * WARNING: Do NOT modify this code. The content of this method is
0276:             * always regenerated by the Form Editor.
0277:             */
0278:            // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
0279:            private void initComponents() {
0280:                java.awt.GridBagConstraints gridBagConstraints;
0281:
0282:                jPanel8 = new javax.swing.JPanel();
0283:                jButtonOK = new javax.swing.JButton();
0284:                jButtonCANCEL = new javax.swing.JButton();
0285:                jPanel10 = new javax.swing.JPanel();
0286:                jPanel1 = new javax.swing.JPanel();
0287:                jLabel2 = new javax.swing.JLabel();
0288:                jComboBoxSize = new javax.swing.JComboBox();
0289:                jComboBoxWUnit = new javax.swing.JComboBox();
0290:                jLabel3 = new javax.swing.JLabel();
0291:                jComboBoxHUnit = new javax.swing.JComboBox();
0292:                jLabel4 = new javax.swing.JLabel();
0293:                jComboBoxOrientation = new javax.swing.JComboBox();
0294:                jLabel5 = new javax.swing.JLabel();
0295:                jNumberFieldWidth = new it.businesslogic.ireport.gui.JNumberField();
0296:                jNumberFieldHeight = new it.businesslogic.ireport.gui.JNumberField();
0297:                jTabbedPane1 = new javax.swing.JTabbedPane();
0298:                jPanel2 = new javax.swing.JPanel();
0299:                jPanel6 = new javax.swing.JPanel();
0300:                jComboBoxTopMarginUnit = new javax.swing.JComboBox();
0301:                jLabel7 = new javax.swing.JLabel();
0302:                jComboBoxBottomMarginUnit = new javax.swing.JComboBox();
0303:                jLabel8 = new javax.swing.JLabel();
0304:                jComboBoxLeftMarginUnit = new javax.swing.JComboBox();
0305:                jLabel9 = new javax.swing.JLabel();
0306:                jComboBoxRightMarginUnit = new javax.swing.JComboBox();
0307:                jLabel10 = new javax.swing.JLabel();
0308:                jNumberFieldTopMargin = new it.businesslogic.ireport.gui.JNumberField();
0309:                jNumberFieldBottomMargin = new it.businesslogic.ireport.gui.JNumberField();
0310:                jNumberFieldLeftMargin = new it.businesslogic.ireport.gui.JNumberField();
0311:                jNumberFieldRightMargin = new it.businesslogic.ireport.gui.JNumberField();
0312:                jPanel3 = new javax.swing.JPanel();
0313:                jPanel7 = new javax.swing.JPanel();
0314:                jLabel11 = new javax.swing.JLabel();
0315:                jComboBoxColumnsWidthUnit = new javax.swing.JComboBox();
0316:                jLabel12 = new javax.swing.JLabel();
0317:                jComboBoxColumnsSpacingUnit = new javax.swing.JComboBox();
0318:                jLabel13 = new javax.swing.JLabel();
0319:                jNumberFieldColumnsWidth = new it.businesslogic.ireport.gui.JNumberField();
0320:                jNumberFieldColumnsSpacing = new it.businesslogic.ireport.gui.JNumberField();
0321:                jNumberFieldColumns = new it.businesslogic.ireport.gui.JNumberField();
0322:                jPanel4 = new javax.swing.JPanel();
0323:                jLabel6 = new javax.swing.JLabel();
0324:                jTextFieldScriptletClass = new javax.swing.JTextField();
0325:                jComboBoxScriptletHandling = new javax.swing.JComboBox();
0326:                jLabel18 = new javax.swing.JLabel();
0327:                jComboBoxLanguage = new javax.swing.JComboBox();
0328:                jPanel13 = new javax.swing.JPanel();
0329:                jPanel5 = new javax.swing.JPanel();
0330:                jCheckBoxTitleOnNewPage = new javax.swing.JCheckBox();
0331:                jCheckBoxSummaryOnNewPage = new javax.swing.JCheckBox();
0332:                jComboBoxPrintOrder = new javax.swing.JComboBox();
0333:                jLabel14 = new javax.swing.JLabel();
0334:                jLabel15 = new javax.swing.JLabel();
0335:                jComboBoxWhenNoData = new javax.swing.JComboBox();
0336:                jCheckBoxFloatColumnFooter = new javax.swing.JCheckBox();
0337:                jCheckBoxIgnorePagination = new javax.swing.JCheckBox();
0338:                jPanel11 = new javax.swing.JPanel();
0339:                jLabelFormatFactoryClass = new javax.swing.JLabel();
0340:                jTextFieldFormatFactoryClass = new javax.swing.JTextField();
0341:                jLabel17 = new javax.swing.JLabel();
0342:                jTextFieldResourceBundleBaseName = new javax.swing.JTextField();
0343:                jLabelWhenResourceMissingType = new javax.swing.JLabel();
0344:                jComboBoxWhenResourceMissingType = new javax.swing.JComboBox();
0345:                jLabel16 = new javax.swing.JLabel();
0346:                jComboBoxXMLEncoding = new javax.swing.JComboBox();
0347:                jPanel12 = new javax.swing.JPanel();
0348:                jPanel9 = new javax.swing.JPanel();
0349:                jLabel1 = new javax.swing.JLabel();
0350:                jTextFieldName = new javax.swing.JTextField();
0351:
0352:                getContentPane().setLayout(new java.awt.GridBagLayout());
0353:
0354:                setTitle("Report properties");
0355:                setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
0356:                setName("Report properties");
0357:                addWindowListener(new java.awt.event.WindowAdapter() {
0358:                    public void windowClosing(java.awt.event.WindowEvent evt) {
0359:                        exitForm(evt);
0360:                    }
0361:
0362:                    public void windowOpened(java.awt.event.WindowEvent evt) {
0363:                        formWindowOpened(evt);
0364:                    }
0365:                });
0366:
0367:                jPanel8.setLayout(new java.awt.GridBagLayout());
0368:
0369:                jButtonOK.setText("OK");
0370:                jButtonOK.setMaximumSize(new java.awt.Dimension(200, 26));
0371:                jButtonOK.setMinimumSize(new java.awt.Dimension(150, 26));
0372:                jButtonOK
0373:                        .addActionListener(new java.awt.event.ActionListener() {
0374:                            public void actionPerformed(
0375:                                    java.awt.event.ActionEvent evt) {
0376:                                jButtonOKActionPerformed(evt);
0377:                            }
0378:                        });
0379:
0380:                gridBagConstraints = new java.awt.GridBagConstraints();
0381:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0382:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0383:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 5, 3);
0384:                jPanel8.add(jButtonOK, gridBagConstraints);
0385:
0386:                jButtonCANCEL.setText("Cancel");
0387:                jButtonCANCEL
0388:                        .addActionListener(new java.awt.event.ActionListener() {
0389:                            public void actionPerformed(
0390:                                    java.awt.event.ActionEvent evt) {
0391:                                jButtonCANCELActionPerformed(evt);
0392:                            }
0393:                        });
0394:
0395:                gridBagConstraints = new java.awt.GridBagConstraints();
0396:                gridBagConstraints.gridx = 0;
0397:                gridBagConstraints.gridy = 1;
0398:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0399:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0400:                gridBagConstraints.weightx = 1.0;
0401:                gridBagConstraints.weighty = 1.0;
0402:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
0403:                jPanel8.add(jButtonCANCEL, gridBagConstraints);
0404:
0405:                gridBagConstraints = new java.awt.GridBagConstraints();
0406:                gridBagConstraints.gridx = 1;
0407:                gridBagConstraints.gridy = 0;
0408:                gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
0409:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
0410:                gridBagConstraints.weightx = 1.0;
0411:                gridBagConstraints.weighty = 1.0;
0412:                gridBagConstraints.insets = new java.awt.Insets(3, 0, 0, 3);
0413:                getContentPane().add(jPanel8, gridBagConstraints);
0414:
0415:                jPanel10.setLayout(new java.awt.GridBagLayout());
0416:
0417:                jPanel1.setLayout(new java.awt.GridBagLayout());
0418:
0419:                jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(
0420:                        javax.swing.BorderFactory.createEtchedBorder(),
0421:                        "Page size"));
0422:                jLabel2
0423:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
0424:                jLabel2.setText("Preset sizes:");
0425:                gridBagConstraints = new java.awt.GridBagConstraints();
0426:                gridBagConstraints.gridx = 0;
0427:                gridBagConstraints.gridy = 0;
0428:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0429:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 5, 3);
0430:                jPanel1.add(jLabel2, gridBagConstraints);
0431:
0432:                jComboBoxSize
0433:                        .addActionListener(new java.awt.event.ActionListener() {
0434:                            public void actionPerformed(
0435:                                    java.awt.event.ActionEvent evt) {
0436:                                jComboBoxSizeActionPerformed(evt);
0437:                            }
0438:                        });
0439:
0440:                gridBagConstraints = new java.awt.GridBagConstraints();
0441:                gridBagConstraints.gridx = 1;
0442:                gridBagConstraints.gridy = 0;
0443:                gridBagConstraints.gridwidth = 3;
0444:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0445:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0446:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 5, 3);
0447:                jPanel1.add(jComboBoxSize, gridBagConstraints);
0448:
0449:                jComboBoxWUnit
0450:                        .addActionListener(new java.awt.event.ActionListener() {
0451:                            public void actionPerformed(
0452:                                    java.awt.event.ActionEvent evt) {
0453:                                jComboBoxWUnitActionPerformed(evt);
0454:                            }
0455:                        });
0456:
0457:                gridBagConstraints = new java.awt.GridBagConstraints();
0458:                gridBagConstraints.gridx = 3;
0459:                gridBagConstraints.gridy = 1;
0460:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0461:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0462:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0463:                jPanel1.add(jComboBoxWUnit, gridBagConstraints);
0464:
0465:                jLabel3
0466:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
0467:                jLabel3.setText("Width:");
0468:                gridBagConstraints = new java.awt.GridBagConstraints();
0469:                gridBagConstraints.gridx = 1;
0470:                gridBagConstraints.gridy = 1;
0471:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0472:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0473:                jPanel1.add(jLabel3, gridBagConstraints);
0474:
0475:                jComboBoxHUnit
0476:                        .addActionListener(new java.awt.event.ActionListener() {
0477:                            public void actionPerformed(
0478:                                    java.awt.event.ActionEvent evt) {
0479:                                jComboBoxHUnitActionPerformed(evt);
0480:                            }
0481:                        });
0482:
0483:                gridBagConstraints = new java.awt.GridBagConstraints();
0484:                gridBagConstraints.gridx = 3;
0485:                gridBagConstraints.gridy = 2;
0486:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0487:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0488:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0489:                jPanel1.add(jComboBoxHUnit, gridBagConstraints);
0490:
0491:                jLabel4
0492:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
0493:                jLabel4.setText("Height:");
0494:                gridBagConstraints = new java.awt.GridBagConstraints();
0495:                gridBagConstraints.gridx = 1;
0496:                gridBagConstraints.gridy = 2;
0497:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0498:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0499:                jPanel1.add(jLabel4, gridBagConstraints);
0500:
0501:                jComboBoxOrientation
0502:                        .addActionListener(new java.awt.event.ActionListener() {
0503:                            public void actionPerformed(
0504:                                    java.awt.event.ActionEvent evt) {
0505:                                jComboBoxOrientationActionPerformed(evt);
0506:                            }
0507:                        });
0508:
0509:                gridBagConstraints = new java.awt.GridBagConstraints();
0510:                gridBagConstraints.gridx = 1;
0511:                gridBagConstraints.gridy = 3;
0512:                gridBagConstraints.gridwidth = 3;
0513:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0514:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0515:                gridBagConstraints.weightx = 1.0;
0516:                gridBagConstraints.weighty = 1.0;
0517:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0518:                jPanel1.add(jComboBoxOrientation, gridBagConstraints);
0519:
0520:                jLabel5
0521:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
0522:                jLabel5.setText("Orientation:");
0523:                gridBagConstraints = new java.awt.GridBagConstraints();
0524:                gridBagConstraints.gridx = 0;
0525:                gridBagConstraints.gridy = 3;
0526:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0527:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0528:                jPanel1.add(jLabel5, gridBagConstraints);
0529:
0530:                jNumberFieldWidth.setColumns(5);
0531:                jNumberFieldWidth
0532:                        .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
0533:                jNumberFieldWidth
0534:                        .setMinimumSize(new java.awt.Dimension(40, 20));
0535:                jNumberFieldWidth
0536:                        .addActionListener(new java.awt.event.ActionListener() {
0537:                            public void actionPerformed(
0538:                                    java.awt.event.ActionEvent evt) {
0539:                                jNumberFieldWidthActionPerformed(evt);
0540:                            }
0541:                        });
0542:
0543:                gridBagConstraints = new java.awt.GridBagConstraints();
0544:                gridBagConstraints.gridx = 2;
0545:                gridBagConstraints.gridy = 1;
0546:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0547:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0548:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0549:                jPanel1.add(jNumberFieldWidth, gridBagConstraints);
0550:
0551:                jNumberFieldHeight.setColumns(5);
0552:                jNumberFieldHeight
0553:                        .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
0554:                jNumberFieldHeight
0555:                        .setMinimumSize(new java.awt.Dimension(40, 20));
0556:                jNumberFieldHeight
0557:                        .addActionListener(new java.awt.event.ActionListener() {
0558:                            public void actionPerformed(
0559:                                    java.awt.event.ActionEvent evt) {
0560:                                jNumberFieldHeightActionPerformed(evt);
0561:                            }
0562:                        });
0563:
0564:                gridBagConstraints = new java.awt.GridBagConstraints();
0565:                gridBagConstraints.gridx = 2;
0566:                gridBagConstraints.gridy = 2;
0567:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0568:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0569:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0570:                jPanel1.add(jNumberFieldHeight, gridBagConstraints);
0571:
0572:                gridBagConstraints = new java.awt.GridBagConstraints();
0573:                gridBagConstraints.gridx = 0;
0574:                gridBagConstraints.gridy = 1;
0575:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0576:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0577:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0578:                jPanel10.add(jPanel1, gridBagConstraints);
0579:
0580:                jTabbedPane1.setName("");
0581:                jPanel2.setLayout(new java.awt.BorderLayout());
0582:
0583:                jPanel2.setName("");
0584:                jPanel6.setLayout(new java.awt.GridBagLayout());
0585:
0586:                jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(
0587:                        javax.swing.BorderFactory.createEtchedBorder(),
0588:                        "Page margin"));
0589:                jComboBoxTopMarginUnit
0590:                        .addActionListener(new java.awt.event.ActionListener() {
0591:                            public void actionPerformed(
0592:                                    java.awt.event.ActionEvent evt) {
0593:                                jComboBoxTopMarginUnitActionPerformed(evt);
0594:                            }
0595:                        });
0596:
0597:                gridBagConstraints = new java.awt.GridBagConstraints();
0598:                gridBagConstraints.gridx = 2;
0599:                gridBagConstraints.gridy = 0;
0600:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0601:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0602:                jPanel6.add(jComboBoxTopMarginUnit, gridBagConstraints);
0603:
0604:                jLabel7
0605:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
0606:                jLabel7.setText("Top:");
0607:                gridBagConstraints = new java.awt.GridBagConstraints();
0608:                gridBagConstraints.gridx = 0;
0609:                gridBagConstraints.gridy = 0;
0610:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
0611:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0612:                jPanel6.add(jLabel7, gridBagConstraints);
0613:
0614:                jComboBoxBottomMarginUnit
0615:                        .addActionListener(new java.awt.event.ActionListener() {
0616:                            public void actionPerformed(
0617:                                    java.awt.event.ActionEvent evt) {
0618:                                jComboBoxBottomMarginUnitActionPerformed(evt);
0619:                            }
0620:                        });
0621:
0622:                gridBagConstraints = new java.awt.GridBagConstraints();
0623:                gridBagConstraints.gridx = 2;
0624:                gridBagConstraints.gridy = 1;
0625:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0626:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0627:                jPanel6.add(jComboBoxBottomMarginUnit, gridBagConstraints);
0628:
0629:                jLabel8
0630:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
0631:                jLabel8.setText("Bottom:");
0632:                gridBagConstraints = new java.awt.GridBagConstraints();
0633:                gridBagConstraints.gridx = 0;
0634:                gridBagConstraints.gridy = 1;
0635:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
0636:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0637:                jPanel6.add(jLabel8, gridBagConstraints);
0638:
0639:                jComboBoxLeftMarginUnit
0640:                        .addActionListener(new java.awt.event.ActionListener() {
0641:                            public void actionPerformed(
0642:                                    java.awt.event.ActionEvent evt) {
0643:                                jComboBoxLeftMarginUnitActionPerformed(evt);
0644:                            }
0645:                        });
0646:
0647:                gridBagConstraints = new java.awt.GridBagConstraints();
0648:                gridBagConstraints.gridx = 2;
0649:                gridBagConstraints.gridy = 2;
0650:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0651:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0652:                jPanel6.add(jComboBoxLeftMarginUnit, gridBagConstraints);
0653:
0654:                jLabel9
0655:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
0656:                jLabel9.setText("Left:");
0657:                gridBagConstraints = new java.awt.GridBagConstraints();
0658:                gridBagConstraints.gridx = 0;
0659:                gridBagConstraints.gridy = 2;
0660:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
0661:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0662:                jPanel6.add(jLabel9, gridBagConstraints);
0663:
0664:                jComboBoxRightMarginUnit
0665:                        .addActionListener(new java.awt.event.ActionListener() {
0666:                            public void actionPerformed(
0667:                                    java.awt.event.ActionEvent evt) {
0668:                                jComboBoxRightMarginUnitActionPerformed(evt);
0669:                            }
0670:                        });
0671:
0672:                gridBagConstraints = new java.awt.GridBagConstraints();
0673:                gridBagConstraints.gridx = 2;
0674:                gridBagConstraints.gridy = 3;
0675:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0676:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0677:                jPanel6.add(jComboBoxRightMarginUnit, gridBagConstraints);
0678:
0679:                jLabel10
0680:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
0681:                jLabel10.setText("Right:");
0682:                gridBagConstraints = new java.awt.GridBagConstraints();
0683:                gridBagConstraints.gridx = 0;
0684:                gridBagConstraints.gridy = 3;
0685:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
0686:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0687:                jPanel6.add(jLabel10, gridBagConstraints);
0688:
0689:                jNumberFieldTopMargin.setColumns(4);
0690:                jNumberFieldTopMargin
0691:                        .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
0692:                jNumberFieldTopMargin.setText("0");
0693:                jNumberFieldTopMargin.setMinimumSize(new java.awt.Dimension(40,
0694:                        20));
0695:                jNumberFieldTopMargin
0696:                        .addActionListener(new java.awt.event.ActionListener() {
0697:                            public void actionPerformed(
0698:                                    java.awt.event.ActionEvent evt) {
0699:                                jNumberFieldTopMarginActionPerformed(evt);
0700:                            }
0701:                        });
0702:
0703:                gridBagConstraints = new java.awt.GridBagConstraints();
0704:                gridBagConstraints.gridx = 1;
0705:                gridBagConstraints.gridy = 0;
0706:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0707:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0708:                jPanel6.add(jNumberFieldTopMargin, gridBagConstraints);
0709:
0710:                jNumberFieldBottomMargin
0711:                        .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
0712:                jNumberFieldBottomMargin.setText("0");
0713:                jNumberFieldBottomMargin.setMinimumSize(new java.awt.Dimension(
0714:                        40, 20));
0715:                jNumberFieldBottomMargin
0716:                        .addActionListener(new java.awt.event.ActionListener() {
0717:                            public void actionPerformed(
0718:                                    java.awt.event.ActionEvent evt) {
0719:                                jNumberFieldBottomMarginActionPerformed(evt);
0720:                            }
0721:                        });
0722:
0723:                gridBagConstraints = new java.awt.GridBagConstraints();
0724:                gridBagConstraints.gridx = 1;
0725:                gridBagConstraints.gridy = 1;
0726:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0727:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0728:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0729:                jPanel6.add(jNumberFieldBottomMargin, gridBagConstraints);
0730:
0731:                jNumberFieldLeftMargin
0732:                        .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
0733:                jNumberFieldLeftMargin.setText("0");
0734:                jNumberFieldLeftMargin.setMinimumSize(new java.awt.Dimension(
0735:                        40, 20));
0736:                jNumberFieldLeftMargin
0737:                        .addActionListener(new java.awt.event.ActionListener() {
0738:                            public void actionPerformed(
0739:                                    java.awt.event.ActionEvent evt) {
0740:                                jNumberFieldLeftMarginActionPerformed(evt);
0741:                            }
0742:                        });
0743:
0744:                gridBagConstraints = new java.awt.GridBagConstraints();
0745:                gridBagConstraints.gridx = 1;
0746:                gridBagConstraints.gridy = 2;
0747:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0748:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0749:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0750:                jPanel6.add(jNumberFieldLeftMargin, gridBagConstraints);
0751:
0752:                jNumberFieldRightMargin
0753:                        .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
0754:                jNumberFieldRightMargin.setText("0");
0755:                jNumberFieldRightMargin.setMinimumSize(new java.awt.Dimension(
0756:                        40, 20));
0757:                jNumberFieldRightMargin
0758:                        .addActionListener(new java.awt.event.ActionListener() {
0759:                            public void actionPerformed(
0760:                                    java.awt.event.ActionEvent evt) {
0761:                                jNumberFieldRightMarginActionPerformed(evt);
0762:                            }
0763:                        });
0764:
0765:                gridBagConstraints = new java.awt.GridBagConstraints();
0766:                gridBagConstraints.gridx = 1;
0767:                gridBagConstraints.gridy = 3;
0768:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0769:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0770:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0771:                jPanel6.add(jNumberFieldRightMargin, gridBagConstraints);
0772:
0773:                jPanel2.add(jPanel6, java.awt.BorderLayout.CENTER);
0774:
0775:                jTabbedPane1.addTab("tab1", jPanel2);
0776:
0777:                jPanel3.setLayout(new java.awt.BorderLayout());
0778:
0779:                jPanel7.setLayout(new java.awt.GridBagLayout());
0780:
0781:                jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(
0782:                        javax.swing.BorderFactory.createEtchedBorder(),
0783:                        "Report columns"));
0784:                jLabel11
0785:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
0786:                jLabel11.setText("Columns:");
0787:                gridBagConstraints = new java.awt.GridBagConstraints();
0788:                gridBagConstraints.gridx = 0;
0789:                gridBagConstraints.gridy = 0;
0790:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
0791:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 5, 3);
0792:                jPanel7.add(jLabel11, gridBagConstraints);
0793:
0794:                jComboBoxColumnsWidthUnit
0795:                        .addActionListener(new java.awt.event.ActionListener() {
0796:                            public void actionPerformed(
0797:                                    java.awt.event.ActionEvent evt) {
0798:                                jComboBoxColumnsWidthUnitActionPerformed(evt);
0799:                            }
0800:                        });
0801:
0802:                gridBagConstraints = new java.awt.GridBagConstraints();
0803:                gridBagConstraints.gridx = 2;
0804:                gridBagConstraints.gridy = 1;
0805:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0806:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0807:                jPanel7.add(jComboBoxColumnsWidthUnit, gridBagConstraints);
0808:
0809:                jLabel12
0810:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
0811:                jLabel12.setText("Width:");
0812:                gridBagConstraints = new java.awt.GridBagConstraints();
0813:                gridBagConstraints.gridx = 0;
0814:                gridBagConstraints.gridy = 1;
0815:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
0816:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0817:                jPanel7.add(jLabel12, gridBagConstraints);
0818:
0819:                jComboBoxColumnsSpacingUnit
0820:                        .addActionListener(new java.awt.event.ActionListener() {
0821:                            public void actionPerformed(
0822:                                    java.awt.event.ActionEvent evt) {
0823:                                jComboBoxColumnsSpacingUnitActionPerformed(evt);
0824:                            }
0825:                        });
0826:
0827:                gridBagConstraints = new java.awt.GridBagConstraints();
0828:                gridBagConstraints.gridx = 2;
0829:                gridBagConstraints.gridy = 2;
0830:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0831:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0832:                jPanel7.add(jComboBoxColumnsSpacingUnit, gridBagConstraints);
0833:
0834:                jLabel13
0835:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
0836:                jLabel13.setText("Spacing:");
0837:                gridBagConstraints = new java.awt.GridBagConstraints();
0838:                gridBagConstraints.gridx = 0;
0839:                gridBagConstraints.gridy = 2;
0840:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
0841:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0842:                jPanel7.add(jLabel13, gridBagConstraints);
0843:
0844:                jNumberFieldColumnsWidth.setColumns(5);
0845:                jNumberFieldColumnsWidth
0846:                        .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
0847:                jNumberFieldColumnsWidth.setText("0");
0848:                jNumberFieldColumnsWidth
0849:                        .addActionListener(new java.awt.event.ActionListener() {
0850:                            public void actionPerformed(
0851:                                    java.awt.event.ActionEvent evt) {
0852:                                jNumberFieldColumnsWidthActionPerformed(evt);
0853:                            }
0854:                        });
0855:
0856:                gridBagConstraints = new java.awt.GridBagConstraints();
0857:                gridBagConstraints.gridx = 1;
0858:                gridBagConstraints.gridy = 1;
0859:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0860:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0861:                jPanel7.add(jNumberFieldColumnsWidth, gridBagConstraints);
0862:
0863:                jNumberFieldColumnsSpacing.setColumns(5);
0864:                jNumberFieldColumnsSpacing
0865:                        .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
0866:                jNumberFieldColumnsSpacing.setText("0");
0867:                jNumberFieldColumnsSpacing
0868:                        .addActionListener(new java.awt.event.ActionListener() {
0869:                            public void actionPerformed(
0870:                                    java.awt.event.ActionEvent evt) {
0871:                                jNumberFieldColumnsSpacingActionPerformed(evt);
0872:                            }
0873:                        });
0874:
0875:                gridBagConstraints = new java.awt.GridBagConstraints();
0876:                gridBagConstraints.gridx = 1;
0877:                gridBagConstraints.gridy = 2;
0878:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0879:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
0880:                jPanel7.add(jNumberFieldColumnsSpacing, gridBagConstraints);
0881:
0882:                jNumberFieldColumns.setColumns(4);
0883:                jNumberFieldColumns
0884:                        .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
0885:                jNumberFieldColumns.setText("0");
0886:                try {
0887:                    jNumberFieldColumns.setDecimals(0);
0888:                } catch (java.beans.PropertyVetoException e1) {
0889:                    e1.printStackTrace();
0890:                }
0891:                jNumberFieldColumns
0892:                        .addActionListener(new java.awt.event.ActionListener() {
0893:                            public void actionPerformed(
0894:                                    java.awt.event.ActionEvent evt) {
0895:                                jNumberFieldColumnsActionPerformed(evt);
0896:                            }
0897:                        });
0898:
0899:                gridBagConstraints = new java.awt.GridBagConstraints();
0900:                gridBagConstraints.gridx = 1;
0901:                gridBagConstraints.gridy = 0;
0902:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
0903:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 5, 3);
0904:                jPanel7.add(jNumberFieldColumns, gridBagConstraints);
0905:
0906:                jPanel3.add(jPanel7, java.awt.BorderLayout.CENTER);
0907:
0908:                jTabbedPane1.addTab("tab2", jPanel3);
0909:
0910:                jPanel4.setLayout(new java.awt.GridBagLayout());
0911:
0912:                jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
0913:                jLabel6.setText("Scriptlet class");
0914:                gridBagConstraints = new java.awt.GridBagConstraints();
0915:                gridBagConstraints.gridx = 0;
0916:                gridBagConstraints.gridy = 0;
0917:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0918:                gridBagConstraints.insets = new java.awt.Insets(7, 7, 3, 3);
0919:                jPanel4.add(jLabel6, gridBagConstraints);
0920:
0921:                jTextFieldScriptletClass.setEnabled(false);
0922:                jTextFieldScriptletClass
0923:                        .addActionListener(new java.awt.event.ActionListener() {
0924:                            public void actionPerformed(
0925:                                    java.awt.event.ActionEvent evt) {
0926:                                jTextFieldScriptletClassActionPerformed(evt);
0927:                            }
0928:                        });
0929:
0930:                gridBagConstraints = new java.awt.GridBagConstraints();
0931:                gridBagConstraints.gridx = 0;
0932:                gridBagConstraints.gridy = 2;
0933:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0934:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0935:                gridBagConstraints.weightx = 1.0;
0936:                gridBagConstraints.insets = new java.awt.Insets(0, 7, 5, 7);
0937:                jPanel4.add(jTextFieldScriptletClass, gridBagConstraints);
0938:
0939:                jComboBoxScriptletHandling
0940:                        .addActionListener(new java.awt.event.ActionListener() {
0941:                            public void actionPerformed(
0942:                                    java.awt.event.ActionEvent evt) {
0943:                                jComboBoxScriptletHandlingActionPerformed(evt);
0944:                            }
0945:                        });
0946:
0947:                gridBagConstraints = new java.awt.GridBagConstraints();
0948:                gridBagConstraints.gridx = 0;
0949:                gridBagConstraints.gridy = 1;
0950:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0951:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0952:                gridBagConstraints.insets = new java.awt.Insets(0, 7, 5, 7);
0953:                jPanel4.add(jComboBoxScriptletHandling, gridBagConstraints);
0954:
0955:                jLabel18
0956:                        .setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
0957:                jLabel18.setText("Language");
0958:                gridBagConstraints = new java.awt.GridBagConstraints();
0959:                gridBagConstraints.gridx = 0;
0960:                gridBagConstraints.gridy = 3;
0961:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0962:                gridBagConstraints.insets = new java.awt.Insets(7, 7, 3, 3);
0963:                jPanel4.add(jLabel18, gridBagConstraints);
0964:
0965:                gridBagConstraints = new java.awt.GridBagConstraints();
0966:                gridBagConstraints.gridx = 0;
0967:                gridBagConstraints.gridy = 4;
0968:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0969:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0970:                gridBagConstraints.insets = new java.awt.Insets(0, 7, 5, 7);
0971:                jPanel4.add(jComboBoxLanguage, gridBagConstraints);
0972:
0973:                gridBagConstraints = new java.awt.GridBagConstraints();
0974:                gridBagConstraints.gridx = 0;
0975:                gridBagConstraints.gridy = 99;
0976:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0977:                gridBagConstraints.weighty = 1.0;
0978:                jPanel4.add(jPanel13, gridBagConstraints);
0979:
0980:                jTabbedPane1.addTab("tab3", jPanel4);
0981:
0982:                jPanel5.setLayout(new java.awt.GridBagLayout());
0983:
0984:                jCheckBoxTitleOnNewPage.setText("Title on a new page");
0985:                jCheckBoxTitleOnNewPage
0986:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
0987:                jCheckBoxTitleOnNewPage
0988:                        .setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
0989:                jCheckBoxTitleOnNewPage
0990:                        .addActionListener(new java.awt.event.ActionListener() {
0991:                            public void actionPerformed(
0992:                                    java.awt.event.ActionEvent evt) {
0993:                                jCheckBoxTitleOnNewPageActionPerformed(evt);
0994:                            }
0995:                        });
0996:
0997:                gridBagConstraints = new java.awt.GridBagConstraints();
0998:                gridBagConstraints.gridx = 0;
0999:                gridBagConstraints.gridy = 0;
1000:                gridBagConstraints.gridwidth = 2;
1001:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1002:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 0, 3);
1003:                jPanel5.add(jCheckBoxTitleOnNewPage, gridBagConstraints);
1004:
1005:                jCheckBoxSummaryOnNewPage.setText("Summary on a new page");
1006:                jCheckBoxSummaryOnNewPage
1007:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
1008:                jCheckBoxSummaryOnNewPage
1009:                        .setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
1010:                jCheckBoxSummaryOnNewPage
1011:                        .addActionListener(new java.awt.event.ActionListener() {
1012:                            public void actionPerformed(
1013:                                    java.awt.event.ActionEvent evt) {
1014:                                jCheckBoxSummaryOnNewPageActionPerformed(evt);
1015:                            }
1016:                        });
1017:
1018:                gridBagConstraints = new java.awt.GridBagConstraints();
1019:                gridBagConstraints.gridx = 0;
1020:                gridBagConstraints.gridy = 1;
1021:                gridBagConstraints.gridwidth = 2;
1022:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1023:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1024:                jPanel5.add(jCheckBoxSummaryOnNewPage, gridBagConstraints);
1025:
1026:                jComboBoxPrintOrder
1027:                        .addActionListener(new java.awt.event.ActionListener() {
1028:                            public void actionPerformed(
1029:                                    java.awt.event.ActionEvent evt) {
1030:                                jComboBoxPrintOrderActionPerformed(evt);
1031:                            }
1032:                        });
1033:
1034:                gridBagConstraints = new java.awt.GridBagConstraints();
1035:                gridBagConstraints.gridx = 1;
1036:                gridBagConstraints.gridy = 5;
1037:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1038:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1039:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
1040:                jPanel5.add(jComboBoxPrintOrder, gridBagConstraints);
1041:
1042:                jLabel14
1043:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
1044:                jLabel14.setText("Print order:");
1045:                gridBagConstraints = new java.awt.GridBagConstraints();
1046:                gridBagConstraints.gridx = 0;
1047:                gridBagConstraints.gridy = 5;
1048:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1049:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
1050:                jPanel5.add(jLabel14, gridBagConstraints);
1051:
1052:                jLabel15
1053:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
1054:                jLabel15.setText("When no data:");
1055:                gridBagConstraints = new java.awt.GridBagConstraints();
1056:                gridBagConstraints.gridx = 0;
1057:                gridBagConstraints.gridy = 6;
1058:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1059:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
1060:                jPanel5.add(jLabel15, gridBagConstraints);
1061:
1062:                jComboBoxWhenNoData
1063:                        .addActionListener(new java.awt.event.ActionListener() {
1064:                            public void actionPerformed(
1065:                                    java.awt.event.ActionEvent evt) {
1066:                                jComboBoxWhenNoDataActionPerformed(evt);
1067:                            }
1068:                        });
1069:
1070:                gridBagConstraints = new java.awt.GridBagConstraints();
1071:                gridBagConstraints.gridx = 1;
1072:                gridBagConstraints.gridy = 6;
1073:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1074:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1075:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
1076:                jPanel5.add(jComboBoxWhenNoData, gridBagConstraints);
1077:
1078:                jCheckBoxFloatColumnFooter.setText("Floating column footer");
1079:                jCheckBoxFloatColumnFooter
1080:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
1081:                jCheckBoxFloatColumnFooter
1082:                        .setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
1083:                jCheckBoxFloatColumnFooter
1084:                        .addActionListener(new java.awt.event.ActionListener() {
1085:                            public void actionPerformed(
1086:                                    java.awt.event.ActionEvent evt) {
1087:                                jCheckBoxFloatColumnFooterActionPerformed(evt);
1088:                            }
1089:                        });
1090:
1091:                gridBagConstraints = new java.awt.GridBagConstraints();
1092:                gridBagConstraints.gridx = 0;
1093:                gridBagConstraints.gridy = 2;
1094:                gridBagConstraints.gridwidth = 2;
1095:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1096:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1097:                jPanel5.add(jCheckBoxFloatColumnFooter, gridBagConstraints);
1098:
1099:                jCheckBoxIgnorePagination.setText("Ignore pagination");
1100:                jCheckBoxIgnorePagination
1101:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
1102:                jCheckBoxIgnorePagination
1103:                        .setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
1104:                jCheckBoxIgnorePagination
1105:                        .addActionListener(new java.awt.event.ActionListener() {
1106:                            public void actionPerformed(
1107:                                    java.awt.event.ActionEvent evt) {
1108:                                jCheckBoxIgnorePaginationActionPerformed(evt);
1109:                            }
1110:                        });
1111:
1112:                gridBagConstraints = new java.awt.GridBagConstraints();
1113:                gridBagConstraints.gridx = 0;
1114:                gridBagConstraints.gridy = 4;
1115:                gridBagConstraints.gridwidth = 2;
1116:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1117:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
1118:                jPanel5.add(jCheckBoxIgnorePagination, gridBagConstraints);
1119:
1120:                jTabbedPane1.addTab("tab4", jPanel5);
1121:
1122:                jPanel11.setLayout(new java.awt.GridBagLayout());
1123:
1124:                jLabelFormatFactoryClass
1125:                        .setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
1126:                jLabelFormatFactoryClass.setText("Format factory class");
1127:                gridBagConstraints = new java.awt.GridBagConstraints();
1128:                gridBagConstraints.gridx = 0;
1129:                gridBagConstraints.gridwidth = 2;
1130:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1131:                gridBagConstraints.insets = new java.awt.Insets(7, 7, 3, 3);
1132:                jPanel11.add(jLabelFormatFactoryClass, gridBagConstraints);
1133:
1134:                gridBagConstraints = new java.awt.GridBagConstraints();
1135:                gridBagConstraints.gridx = 0;
1136:                gridBagConstraints.gridwidth = 2;
1137:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1138:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1139:                gridBagConstraints.weightx = 1.0;
1140:                gridBagConstraints.insets = new java.awt.Insets(0, 7, 0, 7);
1141:                jPanel11.add(jTextFieldFormatFactoryClass, gridBagConstraints);
1142:
1143:                jLabel17
1144:                        .setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
1145:                jLabel17.setText("Resource bundle base name");
1146:                gridBagConstraints = new java.awt.GridBagConstraints();
1147:                gridBagConstraints.gridx = 0;
1148:                gridBagConstraints.gridwidth = 2;
1149:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1150:                gridBagConstraints.insets = new java.awt.Insets(7, 7, 3, 3);
1151:                jPanel11.add(jLabel17, gridBagConstraints);
1152:
1153:                gridBagConstraints = new java.awt.GridBagConstraints();
1154:                gridBagConstraints.gridx = 0;
1155:                gridBagConstraints.gridwidth = 2;
1156:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1157:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1158:                gridBagConstraints.weightx = 1.0;
1159:                gridBagConstraints.insets = new java.awt.Insets(0, 7, 4, 7);
1160:                jPanel11.add(jTextFieldResourceBundleBaseName,
1161:                        gridBagConstraints);
1162:
1163:                jLabelWhenResourceMissingType
1164:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
1165:                jLabelWhenResourceMissingType
1166:                        .setText("When resource missing type");
1167:                gridBagConstraints = new java.awt.GridBagConstraints();
1168:                gridBagConstraints.gridx = 0;
1169:                gridBagConstraints.gridwidth = 2;
1170:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1171:                gridBagConstraints.insets = new java.awt.Insets(0, 7, 3, 3);
1172:                jPanel11.add(jLabelWhenResourceMissingType, gridBagConstraints);
1173:
1174:                gridBagConstraints = new java.awt.GridBagConstraints();
1175:                gridBagConstraints.gridx = 0;
1176:                gridBagConstraints.gridwidth = 2;
1177:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1178:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1179:                gridBagConstraints.insets = new java.awt.Insets(0, 7, 16, 7);
1180:                jPanel11.add(jComboBoxWhenResourceMissingType,
1181:                        gridBagConstraints);
1182:
1183:                jLabel16
1184:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
1185:                jLabel16.setText("XML encoding");
1186:                gridBagConstraints = new java.awt.GridBagConstraints();
1187:                gridBagConstraints.gridx = 0;
1188:                gridBagConstraints.gridwidth = 2;
1189:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1190:                gridBagConstraints.insets = new java.awt.Insets(0, 7, 3, 3);
1191:                jPanel11.add(jLabel16, gridBagConstraints);
1192:
1193:                jComboBoxXMLEncoding.setEditable(true);
1194:                jComboBoxXMLEncoding
1195:                        .addActionListener(new java.awt.event.ActionListener() {
1196:                            public void actionPerformed(
1197:                                    java.awt.event.ActionEvent evt) {
1198:                                jComboBoxXMLEncodingActionPerformed(evt);
1199:                            }
1200:                        });
1201:
1202:                gridBagConstraints = new java.awt.GridBagConstraints();
1203:                gridBagConstraints.gridx = 0;
1204:                gridBagConstraints.gridwidth = 2;
1205:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1206:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1207:                gridBagConstraints.insets = new java.awt.Insets(0, 7, 5, 7);
1208:                jPanel11.add(jComboBoxXMLEncoding, gridBagConstraints);
1209:
1210:                gridBagConstraints = new java.awt.GridBagConstraints();
1211:                gridBagConstraints.gridx = 0;
1212:                gridBagConstraints.gridwidth = 2;
1213:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1214:                gridBagConstraints.weightx = 1.0;
1215:                gridBagConstraints.weighty = 1.0;
1216:                jPanel11.add(jPanel12, gridBagConstraints);
1217:
1218:                jTabbedPane1.addTab("i18n", jPanel11);
1219:
1220:                gridBagConstraints = new java.awt.GridBagConstraints();
1221:                gridBagConstraints.gridx = 0;
1222:                gridBagConstraints.gridy = 2;
1223:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1224:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1225:                gridBagConstraints.weightx = 1.0;
1226:                gridBagConstraints.weighty = 1.0;
1227:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
1228:                jPanel10.add(jTabbedPane1, gridBagConstraints);
1229:
1230:                jPanel9.setLayout(new java.awt.GridBagLayout());
1231:
1232:                jLabel1
1233:                        .setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
1234:                jLabel1.setText("Report name:");
1235:                jLabel1.setMaximumSize(new java.awt.Dimension(2000, 16));
1236:                jLabel1.setMinimumSize(new java.awt.Dimension(150, 16));
1237:                gridBagConstraints = new java.awt.GridBagConstraints();
1238:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1239:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
1240:                jPanel9.add(jLabel1, gridBagConstraints);
1241:
1242:                jTextFieldName.setMinimumSize(new java.awt.Dimension(300, 20));
1243:                jTextFieldName
1244:                        .setPreferredSize(new java.awt.Dimension(300, 20));
1245:                jTextFieldName
1246:                        .addActionListener(new java.awt.event.ActionListener() {
1247:                            public void actionPerformed(
1248:                                    java.awt.event.ActionEvent evt) {
1249:                                jTextFieldNameActionPerformed(evt);
1250:                            }
1251:                        });
1252:
1253:                gridBagConstraints = new java.awt.GridBagConstraints();
1254:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1255:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1256:                gridBagConstraints.weightx = 1.0;
1257:                gridBagConstraints.weighty = 1.0;
1258:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
1259:                jPanel9.add(jTextFieldName, gridBagConstraints);
1260:
1261:                gridBagConstraints = new java.awt.GridBagConstraints();
1262:                gridBagConstraints.gridx = 0;
1263:                gridBagConstraints.gridy = 0;
1264:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1265:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1266:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 5, 3);
1267:                jPanel10.add(jPanel9, gridBagConstraints);
1268:
1269:                gridBagConstraints = new java.awt.GridBagConstraints();
1270:                gridBagConstraints.gridx = 0;
1271:                gridBagConstraints.gridy = 0;
1272:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1273:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1274:                gridBagConstraints.weightx = 1000.0;
1275:                getContentPane().add(jPanel10, gridBagConstraints);
1276:
1277:                pack();
1278:                java.awt.Dimension screenSize = java.awt.Toolkit
1279:                        .getDefaultToolkit().getScreenSize();
1280:                java.awt.Dimension dialogSize = getSize();
1281:                setLocation((screenSize.width - dialogSize.width) / 2,
1282:                        (screenSize.height - dialogSize.height) / 2);
1283:            }// </editor-fold>//GEN-END:initComponents
1284:
1285:            private void jCheckBoxIgnorePaginationActionPerformed(
1286:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxIgnorePaginationActionPerformed
1287:                ignorePagination = jCheckBoxIgnorePagination.isSelected();
1288:            }//GEN-LAST:event_jCheckBoxIgnorePaginationActionPerformed
1289:
1290:            private void jCheckBoxFloatColumnFooterActionPerformed(
1291:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxFloatColumnFooterActionPerformed
1292:                floatColumnFooter = jCheckBoxFloatColumnFooter.isSelected();
1293:            }//GEN-LAST:event_jCheckBoxFloatColumnFooterActionPerformed
1294:
1295:            private void jComboBoxScriptletHandlingActionPerformed(
1296:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxScriptletHandlingActionPerformed
1297:                if (jComboBoxScriptletHandling.getSelectedIndex() == 0) {
1298:                    jTextFieldScriptletClass.setText("");
1299:                    jTextFieldScriptletClass.setEnabled(false);
1300:                } else if (jComboBoxScriptletHandling.getSelectedIndex() == 1) {
1301:                    jTextFieldScriptletClass.setText("");
1302:                    jTextFieldScriptletClass.setEnabled(false);
1303:                } else if (jComboBoxScriptletHandling.getSelectedIndex() == 2) {
1304:                    jTextFieldScriptletClass.setEnabled(true);
1305:                }
1306:                this .scriptletHandling = jComboBoxScriptletHandling
1307:                        .getSelectedIndex();
1308:
1309:            }//GEN-LAST:event_jComboBoxScriptletHandlingActionPerformed
1310:
1311:            private void jCheckBoxSummaryOnNewPageActionPerformed(
1312:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxSummaryOnNewPageActionPerformed
1313:                this .summaryOnNewPage = jCheckBoxSummaryOnNewPage.isSelected();
1314:            }//GEN-LAST:event_jCheckBoxSummaryOnNewPageActionPerformed
1315:
1316:            private void jComboBoxOrientationActionPerformed(
1317:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxOrientationActionPerformed
1318:
1319:                orientation = (String) Misc
1320:                        .getComboboxSelectedValue(jComboBoxOrientation);
1321:                int reportSwitch = 0;
1322:                adjustSizes();
1323:                recalcColumnWidth();
1324:            }//GEN-LAST:event_jComboBoxOrientationActionPerformed
1325:
1326:            private void jComboBoxSizeActionPerformed(
1327:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxSizeActionPerformed
1328:                reportFormat = (String) this .jComboBoxSize.getSelectedItem();
1329:                if (reportFormat != null
1330:                        && !reportFormat.equalsIgnoreCase("CUSTOM")) {
1331:                    // set the Size fields.
1332:                    Point p = PageSize.getFormatSize(reportFormat);
1333:
1334:                    setReportWidth(p.x);
1335:                    setReportHeight(p.y);
1336:
1337:                    // reshuffle Height and Width according to Orientation
1338:                    adjustSizes();
1339:                    recalcColumnWidth();
1340:                }
1341:            }//GEN-LAST:event_jComboBoxSizeActionPerformed
1342:
1343:            private void jComboBoxXMLEncodingActionPerformed(
1344:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxXMLEncodingActionPerformed
1345:                this .xmlEncoding = jComboBoxXMLEncoding.getSelectedItem() + "";
1346:            }//GEN-LAST:event_jComboBoxXMLEncodingActionPerformed
1347:
1348:            private void jComboBoxWhenNoDataActionPerformed(
1349:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxWhenNoDataActionPerformed
1350:                this .whenNoDataType = Misc
1351:                        .getComboboxSelectedValue(jComboBoxWhenNoData)
1352:                        + "";
1353:            }//GEN-LAST:event_jComboBoxWhenNoDataActionPerformed
1354:
1355:            private void jComboBoxPrintOrderActionPerformed(
1356:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxPrintOrderActionPerformed
1357:                this .printOrder = Misc
1358:                        .getComboboxSelectedValue(jComboBoxPrintOrder)
1359:                        + "";
1360:            }//GEN-LAST:event_jComboBoxPrintOrderActionPerformed
1361:
1362:            private void jNumberFieldColumnsSpacingActionPerformed(
1363:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldColumnsSpacingActionPerformed
1364:
1365:                double convert = 1.0;
1366:                convert = this 
1367:                        .getConversionUnit(this .jComboBoxColumnsSpacingUnit);
1368:                //int old_spacing = getColumnsSpacing();
1369:                this .columnsSpacing = (int) Unit.convertToPixels(
1370:                        jNumberFieldColumnsSpacing.getValue(), convert);
1371:
1372:                int avail = getReportWidth() - getLeftMargin()
1373:                        - getRightMargin();
1374:                int dim = avail;
1375:
1376:                // calculate space...
1377:                if ((this .columnsSpacing * (getColumns() - 1)) > avail) {
1378:                    javax.swing.JOptionPane
1379:                            .showMessageDialog(
1380:                                    this ,
1381:                                    I18n
1382:                                            .getString(
1383:                                                    "messages.reportPropertiesFrame.invalidColumnSpacing",
1384:                                                    "Column spacing too big!"),
1385:                                    I18n.getString("message.title.error",
1386:                                            "Error"),
1387:                                    javax.swing.JOptionPane.WARNING_MESSAGE);
1388:                }
1389:                while (dim > 0
1390:                        && (dim * getColumns())
1391:                                + (getColumnsSpacing() * (getColumns() - 1)) > avail) {
1392:                    dim--;
1393:                }
1394:
1395:                this .setColumnsWidth(dim);
1396:            }//GEN-LAST:event_jNumberFieldColumnsSpacingActionPerformed
1397:
1398:            private void jNumberFieldColumnsWidthActionPerformed(
1399:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldColumnsWidthActionPerformed
1400:                int newColumnsWidth = (int) Unit.convertToPixels(
1401:                        this .jNumberFieldColumnsWidth.getValue(), this 
1402:                                .getConversionUnit(jComboBoxColumnsWidthUnit));
1403:                int total = (newColumnsWidth * (int) jNumberFieldColumns
1404:                        .getValue())
1405:                        + ((int) Unit
1406:                                .convertToPixels(
1407:                                        this .jNumberFieldColumnsSpacing
1408:                                                .getValue(),
1409:                                        this 
1410:                                                .getConversionUnit(jComboBoxColumnsWidthUnit)) * ((int) jNumberFieldColumnsSpacing
1411:                                .getValue() - 1));
1412:                if (total > this .getReportWidth() - this .getLeftMargin()
1413:                        - this .getRightMargin()) {
1414:                    javax.swing.JOptionPane
1415:                            .showMessageDialog(
1416:                                    this ,
1417:                                    I18n
1418:                                            .getString(
1419:                                                    "messages.reportPropertiesFrame.invalidColumnSize",
1420:                                                    "The column size is too big. Enlarge the report width first."));
1421:                    recalcColumnWidth();
1422:                }
1423:            }//GEN-LAST:event_jNumberFieldColumnsWidthActionPerformed
1424:
1425:            private void jComboBoxColumnsWidthUnitActionPerformed(
1426:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxColumnsWidthUnitActionPerformed
1427:                this .adjustValue(jComboBoxColumnsWidthUnit,
1428:                        jNumberFieldColumnsWidth, this .getColumnsWidth());
1429:            }//GEN-LAST:event_jComboBoxColumnsWidthUnitActionPerformed
1430:
1431:            private void jNumberFieldColumnsActionPerformed(
1432:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldColumnsActionPerformed
1433:                recalcColumnWidth();
1434:            }//GEN-LAST:event_jNumberFieldColumnsActionPerformed
1435:
1436:            private void jComboBoxColumnsSpacingUnitActionPerformed(
1437:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxColumnsSpacingUnitActionPerformed
1438:                this .adjustValue(jComboBoxColumnsSpacingUnit,
1439:                        jNumberFieldColumnsSpacing, this .getColumnsSpacing());
1440:            }//GEN-LAST:event_jComboBoxColumnsSpacingUnitActionPerformed
1441:
1442:            private void jTextFieldNameActionPerformed(
1443:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldNameActionPerformed
1444:                this .reportName = jTextFieldName.getText().trim();
1445:
1446:            }//GEN-LAST:event_jTextFieldNameActionPerformed
1447:
1448:            private void jTextFieldScriptletClassActionPerformed(
1449:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldScriptletClassActionPerformed
1450:                this .scriptletClass = jTextFieldScriptletClass.getText().trim();
1451:            }//GEN-LAST:event_jTextFieldScriptletClassActionPerformed
1452:
1453:            private void jComboBoxTopMarginUnitActionPerformed(
1454:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxTopMarginUnitActionPerformed
1455:                this .adjustValue(jComboBoxTopMarginUnit, jNumberFieldTopMargin,
1456:                        this .getTopMargin());
1457:            }//GEN-LAST:event_jComboBoxTopMarginUnitActionPerformed
1458:
1459:            private void jComboBoxBottomMarginUnitActionPerformed(
1460:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxBottomMarginUnitActionPerformed
1461:                this .adjustValue(jComboBoxBottomMarginUnit,
1462:                        jNumberFieldBottomMargin, this .getBottomMargin());
1463:            }//GEN-LAST:event_jComboBoxBottomMarginUnitActionPerformed
1464:
1465:            private void jComboBoxLeftMarginUnitActionPerformed(
1466:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxLeftMarginUnitActionPerformed
1467:                this .adjustValue(jComboBoxLeftMarginUnit,
1468:                        jNumberFieldLeftMargin, this .getLeftMargin());
1469:            }//GEN-LAST:event_jComboBoxLeftMarginUnitActionPerformed
1470:
1471:            private void jComboBoxRightMarginUnitActionPerformed(
1472:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxRightMarginUnitActionPerformed
1473:                this .adjustValue(jComboBoxRightMarginUnit,
1474:                        jNumberFieldRightMargin, this .getRightMargin());
1475:            }//GEN-LAST:event_jComboBoxRightMarginUnitActionPerformed
1476:
1477:            private void jNumberFieldRightMarginActionPerformed(
1478:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldRightMarginActionPerformed
1479:                rightMargin = (int) Unit.convertToPixels(
1480:                        this .jNumberFieldRightMargin.getValue(), this 
1481:                                .getConversionUnit(jComboBoxRightMarginUnit));
1482:                recalcColumnWidth();
1483:            }//GEN-LAST:event_jNumberFieldRightMarginActionPerformed
1484:
1485:            private void jNumberFieldLeftMarginActionPerformed(
1486:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldLeftMarginActionPerformed
1487:                leftMargin = (int) Unit.convertToPixels(
1488:                        this .jNumberFieldLeftMargin.getValue(), this 
1489:                                .getConversionUnit(jComboBoxLeftMarginUnit));
1490:                recalcColumnWidth();
1491:            }//GEN-LAST:event_jNumberFieldLeftMarginActionPerformed
1492:
1493:            private void jNumberFieldBottomMarginActionPerformed(
1494:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldBottomMarginActionPerformed
1495:                bottomMargin = (int) Unit.convertToPixels(
1496:                        this .jNumberFieldBottomMargin.getValue(), this 
1497:                                .getConversionUnit(jComboBoxBottomMarginUnit));
1498:            }//GEN-LAST:event_jNumberFieldBottomMarginActionPerformed
1499:
1500:            private void jNumberFieldTopMarginActionPerformed(
1501:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldTopMarginActionPerformed
1502:                topMargin = (int) Unit.convertToPixels(
1503:                        this .jNumberFieldTopMargin.getValue(), this 
1504:                                .getConversionUnit(jComboBoxTopMarginUnit));
1505:            }//GEN-LAST:event_jNumberFieldTopMarginActionPerformed
1506:
1507:            private void jComboBoxHUnitActionPerformed(
1508:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxHUnitActionPerformed
1509:                this .adjustValue(jComboBoxHUnit, jNumberFieldHeight, this 
1510:                        .getReportHeight());
1511:            }//GEN-LAST:event_jComboBoxHUnitActionPerformed
1512:
1513:            private void jNumberFieldHeightActionPerformed(
1514:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldHeightActionPerformed
1515:                this .jComboBoxSize.setSelectedItem("Custom");
1516:                reportHeight = (int) Unit.convertToPixels(
1517:                        this .jNumberFieldHeight.getValue(), this 
1518:                                .getConversionUnit(jComboBoxHUnit));
1519:                adjustOrientation();
1520:            }//GEN-LAST:event_jNumberFieldHeightActionPerformed
1521:
1522:            private void jNumberFieldWidthActionPerformed(
1523:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jNumberFieldWidthActionPerformed
1524:                this .jComboBoxSize.setSelectedItem("Custom");
1525:                reportWidth = (int) Unit.convertToPixels(this .jNumberFieldWidth
1526:                        .getValue(), this .getConversionUnit(jComboBoxWUnit));
1527:                adjustOrientation();
1528:                recalcColumnWidth();
1529:            }//GEN-LAST:event_jNumberFieldWidthActionPerformed
1530:
1531:            private void jComboBoxWUnitActionPerformed(
1532:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxWUnitActionPerformed
1533:                this .adjustValue(jComboBoxWUnit, jNumberFieldWidth, this 
1534:                        .getReportWidth());
1535:
1536:            }//GEN-LAST:event_jComboBoxWUnitActionPerformed
1537:
1538:            private void jCheckBoxTitleOnNewPageActionPerformed(
1539:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxTitleOnNewPageActionPerformed
1540:                this .titleOnNewPage = jCheckBoxTitleOnNewPage.isSelected();
1541:            }//GEN-LAST:event_jCheckBoxTitleOnNewPageActionPerformed
1542:
1543:            private void jButtonOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOKActionPerformed
1544:                this .reportName = jTextFieldName.getText();
1545:                this .scriptletClass = jTextFieldScriptletClass.getText();
1546:                this .setResourceBundleBaseName(jTextFieldResourceBundleBaseName
1547:                        .getText());
1548:
1549:                this .language = this .jComboBoxLanguage.getSelectedItem() + "";
1550:                this .whenResourceMissingType = ((Tag) jComboBoxWhenResourceMissingType
1551:                        .getSelectedItem()).getValue()
1552:                        + "";
1553:                this .setFormatFactoryClass(jTextFieldFormatFactoryClass
1554:                        .getText());
1555:
1556:                //System.out.println("Il nome :"+this.getReportName());
1557:                this .setDialogResult(JOptionPane.OK_OPTION);
1558:                this .setVisible(false);
1559:
1560:                //this.dispose();
1561:            }//GEN-LAST:event_jButtonOKActionPerformed
1562:
1563:            private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
1564:
1565:            }//GEN-LAST:event_formWindowOpened
1566:
1567:            private void jButtonCANCELActionPerformed(
1568:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCANCELActionPerformed
1569:                this .setDialogResult(JOptionPane.CANCEL_OPTION);
1570:                this .dispose();
1571:            }//GEN-LAST:event_jButtonCANCELActionPerformed
1572:
1573:            /** Exit the Application */
1574:            private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
1575:                this .setDialogResult(JOptionPane.CLOSED_OPTION);
1576:                this .dispose();
1577:            }//GEN-LAST:event_exitForm
1578:
1579:            /**
1580:             * @param args the command line arguments
1581:             */
1582:            public static void main(String args[]) {
1583:                new ReportPropertiesFrame(null, true).setVisible(true);
1584:            }
1585:
1586:            /** Getter for property dialogResult.
1587:             * @return Value of property dialogResult.
1588:             *
1589:             */
1590:            public int getDialogResult() {
1591:                return this .dialogResult;
1592:            }
1593:
1594:            /** Setter for property dialogResult.
1595:             * @param dialogResult New value of property dialogResult.
1596:             *
1597:             */
1598:            public void setDialogResult(int dialogResult) {
1599:                this .dialogResult = dialogResult;
1600:            }
1601:
1602:            /**
1603:             *  This method convert the old value in new value according with the Unit selected
1604:             */
1605:            public void adjustValue(javax.swing.JComboBox unitCombo,
1606:                    JNumberField numberField, int store_value) {
1607:                try {
1608:                    if (unitCombo.getSelectedIndex() == 0) {
1609:                        numberField.setDecimals(0);
1610:                        numberField.setInteger(true);
1611:                        numberField.setValue(store_value);
1612:                    } else if (unitCombo.getSelectedIndex() == 1) {
1613:                        numberField.setDecimals(3);
1614:                        numberField.setInteger(false);
1615:                        numberField.setValue(Unit
1616:                                .convertPixelsToInches(store_value));
1617:                    } else if (unitCombo.getSelectedIndex() == 2) {
1618:                        numberField.setDecimals(3);
1619:                        numberField.setInteger(false);
1620:                        numberField.setValue(Unit
1621:                                .convertPixelsToCentimeters(store_value));
1622:                    } else if (unitCombo.getSelectedIndex() == 3) {
1623:                        numberField.setDecimals(3);
1624:                        numberField.setInteger(false);
1625:                        numberField.setValue(Unit
1626:                                .convertPixelsToMillimeters(store_value));
1627:                    }
1628:                } catch (Exception ex) {
1629:                }
1630:            }
1631:
1632:            private double getConversionUnit(javax.swing.JComboBox comboBox) {
1633:                double convert = 1.0;
1634:                if (comboBox.getSelectedIndex() == 1)
1635:                    convert = Unit.INCHES;
1636:                else if (comboBox.getSelectedIndex() == 2)
1637:                    convert = Unit.CENTIMETERS;
1638:                else if (comboBox.getSelectedIndex() == 3)
1639:                    convert = Unit.MILLIMETERS;
1640:                return convert;
1641:            }
1642:
1643:            /** Getter for property reportHeight.
1644:             * @return Value of property reportHeight.
1645:             *
1646:             */
1647:            public int getReportHeight() {
1648:                return reportHeight;
1649:            }
1650:
1651:            /** Setter for property reportHeight.
1652:             * @param reportHeight New value of property reportHeight.
1653:             *
1654:             */
1655:            public void setReportHeight(int reportHeight) {
1656:                this .reportHeight = reportHeight;
1657:                jComboBoxHUnitActionPerformed(new java.awt.event.ActionEvent(
1658:                        jComboBoxHUnit, 0, ""));
1659:            }
1660:
1661:            /** Getter for property reportWidth.
1662:             * @return Value of property reportWidth.
1663:             *
1664:             */
1665:            public int getReportWidth() {
1666:                return reportWidth;
1667:            }
1668:
1669:            /** Setter for property reportWidth.
1670:             * @param reportWidth New value of property reportWidth.
1671:             *
1672:             */
1673:            public void setReportWidth(int reportWidth) {
1674:                this .reportWidth = reportWidth;
1675:                jComboBoxWUnitActionPerformed(new java.awt.event.ActionEvent(
1676:                        jComboBoxWUnit, 0, ""));
1677:            }
1678:
1679:            /** Getter for property rightMargin.
1680:             * @return Value of property rightMargin.
1681:             *
1682:             */
1683:            public int getRightMargin() {
1684:                return rightMargin;
1685:            }
1686:
1687:            /** Setter for property rightMargin.
1688:             * @param rightMargin New value of property rightMargin.
1689:             *
1690:             */
1691:            public void setRightMargin(int rightMargin) {
1692:                this .rightMargin = rightMargin;
1693:                jComboBoxRightMarginUnitActionPerformed(new java.awt.event.ActionEvent(
1694:                        jComboBoxRightMarginUnit, 0, ""));
1695:            }
1696:
1697:            /** Getter for property topMargin.
1698:             * @return Value of property topMargin.
1699:             *
1700:             */
1701:            public int getTopMargin() {
1702:                return topMargin;
1703:            }
1704:
1705:            /** Setter for property topMargin.
1706:             * @param topMargin New value of property topMargin.
1707:             *
1708:             */
1709:            public void setTopMargin(int topMargin) {
1710:                this .topMargin = topMargin;
1711:                jComboBoxTopMarginUnitActionPerformed(new java.awt.event.ActionEvent(
1712:                        jComboBoxTopMarginUnit, 0, ""));
1713:            }
1714:
1715:            /** Getter for property leftMargin.
1716:             * @return Value of property leftMargin.
1717:             *
1718:             */
1719:            public int getLeftMargin() {
1720:                return leftMargin;
1721:            }
1722:
1723:            /** Setter for property leftMargin.
1724:             * @param leftMargin New value of property leftMargin.
1725:             *
1726:             */
1727:            public void setLeftMargin(int leftMargin) {
1728:                this .leftMargin = leftMargin;
1729:                jComboBoxLeftMarginUnitActionPerformed(new java.awt.event.ActionEvent(
1730:                        jComboBoxLeftMarginUnit, 0, ""));
1731:            }
1732:
1733:            /** Getter for property bottomMargin.
1734:             * @return Value of property bottomMargin.
1735:             *
1736:             */
1737:            public int getBottomMargin() {
1738:                return bottomMargin;
1739:            }
1740:
1741:            /** Setter for property bottomMargin.
1742:             * @param bottomMargin New value of property bottomMargin.
1743:             *
1744:             */
1745:            public void setBottomMargin(int bottomMargin) {
1746:                this .bottomMargin = bottomMargin;
1747:                jComboBoxBottomMarginUnitActionPerformed(new java.awt.event.ActionEvent(
1748:                        jComboBoxBottomMarginUnit, 0, ""));
1749:            }
1750:
1751:            /** Getter for property orientation.
1752:             * @return Value of property orientation.
1753:             *
1754:             */
1755:            public java.lang.String getOrientation() {
1756:                return orientation;
1757:            }
1758:
1759:            /** Setter for property orientation.
1760:             * @param orientation New value of property orientation.
1761:             *
1762:             */
1763:            public void setOrientation(java.lang.String orientation) {
1764:
1765:                Misc.setComboboxSelectedTagValue(jComboBoxOrientation,
1766:                        orientation);
1767:                this .orientation = orientation;
1768:            }
1769:
1770:            /** Getter for property scriptletClass.
1771:             * @return Value of property scriptletClass.
1772:             *
1773:             */
1774:            public java.lang.String getScriptletClass() {
1775:                return scriptletClass;
1776:            }
1777:
1778:            /** Setter for property scriptletClass.
1779:             * @param scriptletClass New value of property scriptletClass.
1780:             *
1781:             */
1782:            public void setScriptletClass(java.lang.String scriptletClass) {
1783:                jTextFieldScriptletClass.setText(Misc.nvl(scriptletClass, ""));
1784:                this .scriptletClass = scriptletClass;
1785:
1786:            }
1787:
1788:            /** Getter for property reportName.
1789:             * @return Value of property reportName.
1790:             *
1791:             */
1792:            public java.lang.String getReportName() {
1793:                return reportName;
1794:            }
1795:
1796:            /** Setter for property reportName.
1797:             * @param reportName New value of property reportName.
1798:             *
1799:             */
1800:            public void setReportName(java.lang.String reportName) {
1801:                this .reportName = reportName;
1802:                this .jTextFieldName.setText(reportName);
1803:            }
1804:
1805:            /** Getter for property columns.
1806:             * @return Value of property columns.
1807:             *
1808:             */
1809:            public int getColumns() {
1810:                return columns;
1811:            }
1812:
1813:            /** Setter for property columns.
1814:             * @param columns New value of property columns.
1815:             *
1816:             */
1817:            public void setColumns(int columns) {
1818:                this .columns = columns;
1819:                try {
1820:                    jNumberFieldColumns.setValue(columns);
1821:                } catch (Exception ex) {
1822:                }
1823:            }
1824:
1825:            /** Getter for property columnsSpacing.
1826:             * @return Value of property columnsSpacing.
1827:             *
1828:             */
1829:            public int getColumnsSpacing() {
1830:
1831:                return columnsSpacing;
1832:            }
1833:
1834:            /** Setter for property columnsSpacing.
1835:             * @param columnsSpacing New value of property columnsSpacing.
1836:             *
1837:             */
1838:            public void setColumnsSpacing(int columnsSpacing) {
1839:                this .columnsSpacing = columnsSpacing;
1840:                jComboBoxColumnsSpacingUnitActionPerformed(new java.awt.event.ActionEvent(
1841:                        jComboBoxColumnsSpacingUnit, 0, ""));
1842:            }
1843:
1844:            /** Getter for property columnsWidth.
1845:             * @return Value of property columnsWidth.
1846:             *
1847:             */
1848:            public int getColumnsWidth() {
1849:                return columnsWidth;
1850:            }
1851:
1852:            /** Setter for property columnsWidth.
1853:             * @param columnsWidth New value of property columnsWidth.
1854:             *
1855:             */
1856:            public void setColumnsWidth(int columnsWidth) {
1857:                this .columnsWidth = columnsWidth;
1858:                jComboBoxColumnsWidthUnitActionPerformed(new java.awt.event.ActionEvent(
1859:                        jComboBoxColumnsWidthUnit, 0, ""));
1860:                //System.out.println("Column width = " + this.getColumnsWidth());
1861:            }
1862:
1863:            /** Getter for property summaryOnNewPage.
1864:             * @return Value of property summaryOnNewPage.
1865:             *
1866:             */
1867:            public boolean isSummaryOnNewPage() {
1868:                return summaryOnNewPage;
1869:            }
1870:
1871:            /** Setter for property summaryOnNewPage.
1872:             * @param summaryOnNewPage New value of property summaryOnNewPage.
1873:             *
1874:             */
1875:            public void setSummaryOnNewPage(boolean summaryOnNewPage) {
1876:                jCheckBoxSummaryOnNewPage.setSelected(summaryOnNewPage);
1877:                this .summaryOnNewPage = summaryOnNewPage;
1878:            }
1879:
1880:            /** Getter for property titleOnNewPage.
1881:             * @return Value of property titleOnNewPage.
1882:             *
1883:             */
1884:            public boolean isTitleOnNewPage() {
1885:                return titleOnNewPage;
1886:            }
1887:
1888:            /** Setter for property titleOnNewPage.
1889:             * @param titleOnNewPage New value of property titleOnNewPage.
1890:             *
1891:             */
1892:            public void setTitleOnNewPage(boolean titleOnNewPage) {
1893:                jCheckBoxTitleOnNewPage.setSelected(titleOnNewPage);
1894:                this .titleOnNewPage = titleOnNewPage;
1895:            }
1896:
1897:            /** Getter for property whenNoDataType.
1898:             * @return Value of property whenNoDataType.
1899:             *
1900:             */
1901:            public java.lang.String getWhenNoDataType() {
1902:                return whenNoDataType;
1903:            }
1904:
1905:            /** Setter for property whenNoDataType.
1906:             * @param whenNoDataType New value of property whenNoDataType.
1907:             *
1908:             */
1909:            public void setWhenNoDataType(java.lang.String whenNoDataType) {
1910:                Misc.setComboboxSelectedTagValue(jComboBoxWhenNoData,
1911:                        whenNoDataType);
1912:                this .whenNoDataType = whenNoDataType;
1913:            }
1914:
1915:            /** Getter for property xmlEncoding.
1916:             * @return Value of property xmlEncoding.
1917:             *
1918:             */
1919:            public java.lang.String getXmlEncoding() {
1920:                return xmlEncoding;
1921:            }
1922:
1923:            /** Setter for property xmlEncoding.
1924:             * @param xmlEncoding New value of property xmlEncoding.
1925:             *
1926:             */
1927:            public void setXmlEncoding(java.lang.String xmlEncoding) {
1928:                this .jComboBoxXMLEncoding.setSelectedItem(xmlEncoding);
1929:                this .xmlEncoding = xmlEncoding;
1930:            }
1931:
1932:            /** Getter for property globalUnit.
1933:             * @return Value of property globalUnit.
1934:             *
1935:             */
1936:            public int getGlobalUnit() {
1937:                return globalUnit;
1938:            }
1939:
1940:            /** Setter for property globalUnit.
1941:             * @param globalUnit New value of property globalUnit.
1942:             *
1943:             */
1944:            public void setGlobalUnit(int globalUnit) {
1945:                if (this .globalUnit != globalUnit) {
1946:                    this .globalUnit = globalUnit;
1947:                    jComboBoxWUnit.setSelectedIndex(globalUnit);
1948:                    jComboBoxHUnit.setSelectedIndex(globalUnit);
1949:                    jComboBoxTopMarginUnit.setSelectedIndex(globalUnit);
1950:                    jComboBoxBottomMarginUnit.setSelectedIndex(globalUnit);
1951:                    jComboBoxLeftMarginUnit.setSelectedIndex(globalUnit);
1952:                    jComboBoxRightMarginUnit.setSelectedIndex(globalUnit);
1953:                    jComboBoxColumnsSpacingUnit.setSelectedIndex(globalUnit);
1954:                    jComboBoxColumnsWidthUnit.setSelectedIndex(globalUnit);
1955:
1956:                }
1957:            }
1958:
1959:            /** Getter for property printOrder.
1960:             * @return Value of property printOrder.
1961:             *
1962:             */
1963:            public java.lang.String getPrintOrder() {
1964:                return printOrder;
1965:            }
1966:
1967:            /** Setter for property printOrder.
1968:             * @param printOrder New value of property printOrder.
1969:             *
1970:             */
1971:            public void setPrintOrder(java.lang.String printOrder) {
1972:
1973:                Misc.setComboboxSelectedTagValue(jComboBoxPrintOrder,
1974:                        printOrder);
1975:                this .printOrder = printOrder;
1976:            }
1977:
1978:            /** Getter for property reportFormat.
1979:             * @return Value of property reportFormat.
1980:             *
1981:             */
1982:            public java.lang.String getReportFormat() {
1983:                return reportFormat;
1984:            }
1985:
1986:            /** Setter for property reportFormat.
1987:             * @param reportFormat New value of property reportFormat.
1988:             *
1989:             */
1990:            public void setReportFormat(java.lang.String reportFormat) {
1991:                this .reportFormat = reportFormat;
1992:                this .jComboBoxSize.setSelectedItem(reportFormat);
1993:            }
1994:
1995:            /** Getter for property scriptletHandling.
1996:             * @return Value of property scriptletHandling.
1997:             *
1998:             */
1999:            public int getScriptletHandling() {
2000:                return scriptletHandling;
2001:            }
2002:
2003:            /** Setter for property scriptletHandling.
2004:             * @param scriptletHandling New value of property scriptletHandling.
2005:             *
2006:             */
2007:            public void setScriptletHandling(int scriptletHandling) {
2008:                this .scriptletHandling = scriptletHandling;
2009:                jComboBoxScriptletHandling.setSelectedIndex(scriptletHandling);
2010:            }
2011:
2012:            public void applyI18n() {
2013:                // Start autogenerated code ----------------------
2014:                jCheckBoxFloatColumnFooter.setText(I18n.getString(
2015:                        "reportPropertiesFrame.checkBoxFloatColumnFooter",
2016:                        "Floating column footer"));
2017:                // End autogenerated code ----------------------
2018:                // Start autogenerated code ----------------------
2019:                jButtonOK.setText(I18n.getString(
2020:                        "reportPropertiesFrame.buttonOK", "OK"));
2021:                jLabel18.setText(I18n.getString(
2022:                        "reportPropertiesFrame.label18", "Language"));
2023:                // End autogenerated code ----------------------
2024:                jLabel1.setText(it.businesslogic.ireport.util.I18n.getString(
2025:                        "reportName", "Report name")
2026:                        + ":");
2027:                jLabel2.setText(it.businesslogic.ireport.util.I18n.getString(
2028:                        "presetSizes", "Preset sizes")
2029:                        + ":");
2030:                jLabel3.setText(it.businesslogic.ireport.util.I18n.getString(
2031:                        "width", "Width")
2032:                        + ":");
2033:                jLabel4.setText(it.businesslogic.ireport.util.I18n.getString(
2034:                        "height", "Height")
2035:                        + ":");
2036:                jLabel5.setText(it.businesslogic.ireport.util.I18n.getString(
2037:                        "orientation", "Orientation")
2038:                        + ":");
2039:                jButtonCANCEL.setText(it.businesslogic.ireport.util.I18n
2040:                        .getString("cancel", "Cancel"));
2041:                jLabel7.setText(it.businesslogic.ireport.util.I18n.getString(
2042:                        "top", "Top")
2043:                        + ":");
2044:                jLabel8.setText(it.businesslogic.ireport.util.I18n.getString(
2045:                        "bottom", "Bottom")
2046:                        + ":");
2047:                jLabel9.setText(it.businesslogic.ireport.util.I18n.getString(
2048:                        "left", "Left")
2049:                        + ":");
2050:                jLabel10.setText(it.businesslogic.ireport.util.I18n.getString(
2051:                        "right", "Right")
2052:                        + ":");
2053:                jLabel11.setText(it.businesslogic.ireport.util.I18n.getString(
2054:                        "columns", "Columns")
2055:                        + ":");
2056:                jLabel12.setText(it.businesslogic.ireport.util.I18n.getString(
2057:                        "width", "Width")
2058:                        + ":");
2059:                jLabel13.setText(it.businesslogic.ireport.util.I18n.getString(
2060:                        "spacing", "Spacing")
2061:                        + ":");
2062:                jLabel6.setText(it.businesslogic.ireport.util.I18n.getString(
2063:                        "scriptlet", "Scriptlet class"));
2064:                jCheckBoxTitleOnNewPage
2065:                        .setText(it.businesslogic.ireport.util.I18n.getString(
2066:                                "titleOnANewPage", "Title on a new page"));
2067:                jCheckBoxSummaryOnNewPage
2068:                        .setText(it.businesslogic.ireport.util.I18n.getString(
2069:                                "summaryInANewPage", "Summary on a new page"));
2070:                jLabel14.setText(it.businesslogic.ireport.util.I18n.getString(
2071:                        "printOrder", "Print order")
2072:                        + ":");
2073:                jLabel15.setText(it.businesslogic.ireport.util.I18n.getString(
2074:                        "whenNoData", "When no data")
2075:                        + ":");
2076:                jLabel16.setText(it.businesslogic.ireport.util.I18n.getString(
2077:                        "xmlEncoding", "XML encoding")
2078:                        + ":");
2079:                jLabel17.setText(it.businesslogic.ireport.util.I18n.getString(
2080:                        "resourceBundleBaseName", "Resource bundle base name"));
2081:                jLabelWhenResourceMissingType
2082:                        .setText(it.businesslogic.ireport.util.I18n.getString(
2083:                                "whenResourceMissingType",
2084:                                "When resource missing type"));
2085:                jCheckBoxIgnorePagination
2086:                        .setText(it.businesslogic.ireport.util.I18n.getString(
2087:                                "ignorePagination", "Ignore pagination"));
2088:                jLabelFormatFactoryClass
2089:                        .setText(it.businesslogic.ireport.util.I18n.getString(
2090:                                "formatFactoryClass", "Format factory class"));
2091:
2092:                this .jTabbedPane1.setTitleAt(0,
2093:                        it.businesslogic.ireport.util.I18n.getString(
2094:                                "pageMargin", "Page Margin"));
2095:                this .jTabbedPane1.setTitleAt(1,
2096:                        it.businesslogic.ireport.util.I18n.getString("columns",
2097:                                "Columns"));
2098:                this .jTabbedPane1.setTitleAt(2,
2099:                        it.businesslogic.ireport.util.I18n.getString(
2100:                                "scriptlet", "Scriptlet"));
2101:                this .jTabbedPane1.setTitleAt(3,
2102:                        it.businesslogic.ireport.util.I18n.getString("more",
2103:                                "More..."));
2104:
2105:                ((javax.swing.border.TitledBorder) jPanel1.getBorder())
2106:                        .setTitle(it.businesslogic.ireport.util.I18n.getString(
2107:                                "reportPropertiesFrame.panelBorder.PageSize",
2108:                                "Page size"));
2109:                ((javax.swing.border.TitledBorder) jPanel6.getBorder())
2110:                        .setTitle(it.businesslogic.ireport.util.I18n.getString(
2111:                                "reportPropertiesFrame.panelBorder.PageMargin",
2112:                                "Page margin"));
2113:                ((javax.swing.border.TitledBorder) jPanel7.getBorder())
2114:                        .setTitle(it.businesslogic.ireport.util.I18n
2115:                                .getString(
2116:                                        "reportPropertiesFrame.panelBorder.ReportColumns",
2117:                                        "Report columns"));
2118:                this .setTitle(I18n.getString("reportPropertiesFrame.title",
2119:                        "Report properties"));
2120:                jButtonCANCEL.setMnemonic(I18n.getString(
2121:                        "reportPropertiesFrame.buttonCANCELMnemonic", "c")
2122:                        .charAt(0));
2123:                jButtonOK.setMnemonic(I18n.getString(
2124:                        "reportPropertiesFrame.buttonOKMnemonic", "o")
2125:                        .charAt(0));
2126:
2127:            }
2128:
2129:            public void languageChanged(LanguageChangedEvent evt) {
2130:
2131:                this .applyI18n();
2132:            }
2133:
2134:            // Variables declaration - do not modify//GEN-BEGIN:variables
2135:            private javax.swing.JButton jButtonCANCEL;
2136:            private javax.swing.JButton jButtonOK;
2137:            private javax.swing.JCheckBox jCheckBoxFloatColumnFooter;
2138:            private javax.swing.JCheckBox jCheckBoxIgnorePagination;
2139:            private javax.swing.JCheckBox jCheckBoxSummaryOnNewPage;
2140:            private javax.swing.JCheckBox jCheckBoxTitleOnNewPage;
2141:            private javax.swing.JComboBox jComboBoxBottomMarginUnit;
2142:            private javax.swing.JComboBox jComboBoxColumnsSpacingUnit;
2143:            private javax.swing.JComboBox jComboBoxColumnsWidthUnit;
2144:            private javax.swing.JComboBox jComboBoxHUnit;
2145:            private javax.swing.JComboBox jComboBoxLanguage;
2146:            private javax.swing.JComboBox jComboBoxLeftMarginUnit;
2147:            private javax.swing.JComboBox jComboBoxOrientation;
2148:            private javax.swing.JComboBox jComboBoxPrintOrder;
2149:            private javax.swing.JComboBox jComboBoxRightMarginUnit;
2150:            private javax.swing.JComboBox jComboBoxScriptletHandling;
2151:            private javax.swing.JComboBox jComboBoxSize;
2152:            private javax.swing.JComboBox jComboBoxTopMarginUnit;
2153:            private javax.swing.JComboBox jComboBoxWUnit;
2154:            private javax.swing.JComboBox jComboBoxWhenNoData;
2155:            private javax.swing.JComboBox jComboBoxWhenResourceMissingType;
2156:            private javax.swing.JComboBox jComboBoxXMLEncoding;
2157:            private javax.swing.JLabel jLabel1;
2158:            private javax.swing.JLabel jLabel10;
2159:            private javax.swing.JLabel jLabel11;
2160:            private javax.swing.JLabel jLabel12;
2161:            private javax.swing.JLabel jLabel13;
2162:            private javax.swing.JLabel jLabel14;
2163:            private javax.swing.JLabel jLabel15;
2164:            private javax.swing.JLabel jLabel16;
2165:            private javax.swing.JLabel jLabel17;
2166:            private javax.swing.JLabel jLabel18;
2167:            private javax.swing.JLabel jLabel2;
2168:            private javax.swing.JLabel jLabel3;
2169:            private javax.swing.JLabel jLabel4;
2170:            private javax.swing.JLabel jLabel5;
2171:            private javax.swing.JLabel jLabel6;
2172:            private javax.swing.JLabel jLabel7;
2173:            private javax.swing.JLabel jLabel8;
2174:            private javax.swing.JLabel jLabel9;
2175:            private javax.swing.JLabel jLabelFormatFactoryClass;
2176:            private javax.swing.JLabel jLabelWhenResourceMissingType;
2177:            private it.businesslogic.ireport.gui.JNumberField jNumberFieldBottomMargin;
2178:            private it.businesslogic.ireport.gui.JNumberField jNumberFieldColumns;
2179:            private it.businesslogic.ireport.gui.JNumberField jNumberFieldColumnsSpacing;
2180:            private it.businesslogic.ireport.gui.JNumberField jNumberFieldColumnsWidth;
2181:            private it.businesslogic.ireport.gui.JNumberField jNumberFieldHeight;
2182:            private it.businesslogic.ireport.gui.JNumberField jNumberFieldLeftMargin;
2183:            private it.businesslogic.ireport.gui.JNumberField jNumberFieldRightMargin;
2184:            private it.businesslogic.ireport.gui.JNumberField jNumberFieldTopMargin;
2185:            private it.businesslogic.ireport.gui.JNumberField jNumberFieldWidth;
2186:            private javax.swing.JPanel jPanel1;
2187:            private javax.swing.JPanel jPanel10;
2188:            private javax.swing.JPanel jPanel11;
2189:            private javax.swing.JPanel jPanel12;
2190:            private javax.swing.JPanel jPanel13;
2191:            private javax.swing.JPanel jPanel2;
2192:            private javax.swing.JPanel jPanel3;
2193:            private javax.swing.JPanel jPanel4;
2194:            private javax.swing.JPanel jPanel5;
2195:            private javax.swing.JPanel jPanel6;
2196:            private javax.swing.JPanel jPanel7;
2197:            private javax.swing.JPanel jPanel8;
2198:            private javax.swing.JPanel jPanel9;
2199:            private javax.swing.JTabbedPane jTabbedPane1;
2200:            private javax.swing.JTextField jTextFieldFormatFactoryClass;
2201:            private javax.swing.JTextField jTextFieldName;
2202:            private javax.swing.JTextField jTextFieldResourceBundleBaseName;
2203:            private javax.swing.JTextField jTextFieldScriptletClass;
2204:            // End of variables declaration//GEN-END:variables
2205:
2206:            private int columns;
2207:
2208:            private int columnsWidth;
2209:
2210:            private int columnsSpacing;
2211:
2212:            private boolean titleOnNewPage;
2213:
2214:            private boolean summaryOnNewPage;
2215:
2216:            private String printOrder;
2217:
2218:            private String whenNoDataType;
2219:
2220:            private String xmlEncoding;
2221:
2222:            private int globalUnit = 0;
2223:
2224:            private String reportFormat;
2225:
2226:            private int scriptletHandling;
2227:
2228:            /**
2229:             * This method sets height and width according to the orientation.
2230:             * @return Void
2231:             * @since July 3, 2004
2232:             * @author Robert Lamping
2233:             */
2234:            public void adjustSizes() {
2235:                int reportSwitch = 0;
2236:                if (orientation == "Landscape") {
2237:                    // set Width to largest value of ReportWidth, ReportHeight
2238:                    if (getReportWidth() < getReportHeight()) {
2239:                        reportSwitch = getReportHeight();
2240:                        setReportHeight(getReportWidth());
2241:                        setReportWidth(reportSwitch);
2242:                    }
2243:                } else {
2244:                    // Orientation = Portrait
2245:                    if (getReportWidth() > getReportHeight()) {
2246:                        reportSwitch = getReportHeight();
2247:                        setReportHeight(getReportWidth());
2248:                        setReportWidth(reportSwitch);
2249:                    }
2250:                }
2251:            }
2252:
2253:            public void adjustOrientation() {
2254:                if (getReportWidth() <= getReportHeight()) {
2255:                    setOrientation("Portrait");
2256:                } else {
2257:                    setOrientation("Landscape");
2258:                }
2259:            }
2260:
2261:            public String getResourceBundleBaseName() {
2262:                return resourceBundleBaseName;
2263:            }
2264:
2265:            public void setResourceBundleBaseName(String resourceBundleBaseName) {
2266:                this .resourceBundleBaseName = resourceBundleBaseName;
2267:                jTextFieldResourceBundleBaseName
2268:                        .setText(resourceBundleBaseName);
2269:            }
2270:
2271:            public boolean isFloatColumnFooter() {
2272:                return floatColumnFooter;
2273:
2274:            }
2275:
2276:            public void setFloatColumnFooter(boolean floatColumnFooter) {
2277:                this .floatColumnFooter = floatColumnFooter;
2278:                jCheckBoxFloatColumnFooter.setSelected(floatColumnFooter);
2279:            }
2280:
2281:            public String getLanguage() {
2282:                return language;
2283:            }
2284:
2285:            public void setLanguage(String language) {
2286:                this .jComboBoxLanguage.setSelectedItem(language);
2287:            }
2288:
2289:            void recalcColumnWidth() {
2290:
2291:                this .columns = (int) jNumberFieldColumns.getValue();
2292:                // calculate space...
2293:                int avail = getReportWidth() - getLeftMargin()
2294:                        - getRightMargin() - (this .getColumns() - 1)
2295:                        * getColumnsSpacing();
2296:                int dim = avail;
2297:                dim = (int) ((double) dim / (double) this .getColumns());
2298:
2299:                while ((dim * this .getColumns()) > avail) {
2300:                    dim--;
2301:                }
2302:                this .setColumnsWidth(dim);
2303:            }
2304:
2305:            public String getWhenResourceMissingType() {
2306:                return whenResourceMissingType;
2307:            }
2308:
2309:            public void setWhenResourceMissingType(
2310:                    String whenResourceMissingType) {
2311:                this .whenResourceMissingType = whenResourceMissingType;
2312:                Misc.setComboboxSelectedTagValue(
2313:                        jComboBoxWhenResourceMissingType,
2314:                        whenResourceMissingType);
2315:            }
2316:
2317:            public boolean isIgnorePagination() {
2318:                return ignorePagination;
2319:            }
2320:
2321:            public void setIgnorePagination(boolean ignorePagination) {
2322:                jCheckBoxIgnorePagination.setSelected(ignorePagination);
2323:                this .ignorePagination = ignorePagination;
2324:            }
2325:
2326:            public String getFormatFactoryClass() {
2327:                return formatFactoryClass;
2328:            }
2329:
2330:            public void setFormatFactoryClass(String formatFactoryClass) {
2331:                this.formatFactoryClass = formatFactoryClass;
2332:                jTextFieldFormatFactoryClass.setText(formatFactoryClass);
2333:            }
2334:
2335:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.