Source Code Cross Referenced for CrosstabPropertiesDialog.java in  » Report » iReport-2.0.5 » it » businesslogic » ireport » crosstab » 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.crosstab.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:         * CrosstabPropertiesDialog.java
0028:         * 
0029:         * Created on 4 gennaio 2006, 9.35
0030:         *
0031:         */
0032:
0033:        package it.businesslogic.ireport.crosstab.gui;
0034:
0035:        import it.businesslogic.ireport.chart.gui.ChartPropertiesDialog;
0036:        import it.businesslogic.ireport.gui.MainFrame;
0037:        import it.businesslogic.ireport.gui.event.CrosstabLayoutChangedEvent;
0038:        import it.businesslogic.ireport.gui.sheet.*;
0039:        import it.businesslogic.ireport.*;
0040:        import it.businesslogic.ireport.chart.Dataset;
0041:        import it.businesslogic.ireport.crosstab.CrosstabColumnGroup;
0042:        import it.businesslogic.ireport.crosstab.CrosstabGroup;
0043:        import it.businesslogic.ireport.crosstab.CrosstabRowGroup;
0044:        import it.businesslogic.ireport.crosstab.Measure;
0045:        import it.businesslogic.ireport.gui.JRSubreportParameterDialog;
0046:        import it.businesslogic.ireport.gui.JReportFrame;
0047:        import it.businesslogic.ireport.util.Misc;
0048:        import java.awt.event.ActionEvent;
0049:        import java.awt.image.CropImageFilter;
0050:        import java.util.ArrayList;
0051:        import java.util.Vector;
0052:        import java.awt.Color;
0053:
0054:        /**
0055:         *
0056:         * @author  Administrator
0057:         */
0058:        import java.util.Enumeration;
0059:        import javax.swing.SwingUtilities;
0060:        import it.businesslogic.ireport.util.I18n;
0061:
0062:        public class CrosstabPropertiesDialog extends javax.swing.JDialog {
0063:
0064:            private CrosstabReportElement currentCrosstabReportElement = null;
0065:            private int dialogResult = javax.swing.JOptionPane.OK_OPTION;
0066:            private JReportFrame jReportFrame = null;
0067:            private boolean init = false;
0068:
0069:            /** Creates new form CrosstabPropertiesDialog */
0070:            public CrosstabPropertiesDialog(java.awt.Frame parent, boolean modal) {
0071:                super (parent, modal);
0072:                initAll();
0073:            }
0074:
0075:            /** Creates new form CrosstabPropertiesDialog */
0076:            public CrosstabPropertiesDialog(java.awt.Dialog parent,
0077:                    boolean modal) {
0078:                super (parent, modal);
0079:                initAll();
0080:            }
0081:
0082:            public void initAll() {
0083:                initComponents();
0084:
0085:                applyI18n();
0086:
0087:                this .jComboBoxResetType.addItem(new Tag("None",
0088:                        it.businesslogic.ireport.util.I18n.getString(
0089:                                "resetType.None", "None")));
0090:                this .jComboBoxResetType.addItem(new Tag("Report",
0091:                        it.businesslogic.ireport.util.I18n.getString(
0092:                                "resetType.Report", "Report")));
0093:                this .jComboBoxResetType.addItem(new Tag("Page",
0094:                        it.businesslogic.ireport.util.I18n.getString(
0095:                                "resetType.Page", "Page")));
0096:                this .jComboBoxResetType.addItem(new Tag("Column",
0097:                        it.businesslogic.ireport.util.I18n.getString(
0098:                                "resetType.Column", "Column")));
0099:                this .jComboBoxResetType.addItem(new Tag("Group",
0100:                        it.businesslogic.ireport.util.I18n.getString(
0101:                                "resetType.Group", "Group")));
0102:
0103:                this .jComboBoxIncrementType.addItem(new Tag("None",
0104:                        it.businesslogic.ireport.util.I18n.getString(
0105:                                "incrementType.None", "None")));
0106:                this .jComboBoxIncrementType.addItem(new Tag("Report",
0107:                        it.businesslogic.ireport.util.I18n.getString(
0108:                                "incrementType.Report", "Report")));
0109:                this .jComboBoxIncrementType.addItem(new Tag("Page",
0110:                        it.businesslogic.ireport.util.I18n.getString(
0111:                                "incrementType.Page", "Page")));
0112:                this .jComboBoxIncrementType.addItem(new Tag("Column",
0113:                        it.businesslogic.ireport.util.I18n.getString(
0114:                                "incrementType.Column", "Column")));
0115:                this .jComboBoxIncrementType.addItem(new Tag("Group",
0116:                        it.businesslogic.ireport.util.I18n.getString(
0117:                                "incrementType.Group", "Group")));
0118:
0119:                jComboBoxDatasetConnectionType.addItem(new Tag(
0120:                        "Don't use connection or datasource",
0121:                        it.businesslogic.ireport.util.I18n.getString(
0122:                                "ConnectionType.1",
0123:                                "Don't use connection or datasource")));
0124:                jComboBoxDatasetConnectionType.addItem(new Tag(
0125:                        "Use connection expression",
0126:                        it.businesslogic.ireport.util.I18n
0127:                                .getString("ConnectionType.2",
0128:                                        "Use connection expression")));
0129:                jComboBoxDatasetConnectionType.addItem(new Tag(
0130:                        "Use datasource expression",
0131:                        it.businesslogic.ireport.util.I18n
0132:                                .getString("ConnectionType.3",
0133:                                        "Use datasource expression")));
0134:
0135:                this .jComboBoxrunDirection.addItem(new Tag("LTR",
0136:                        it.businesslogic.ireport.util.I18n.getString(
0137:                                "runDirection.LTR", "Left to Right")));
0138:                this .jComboBoxrunDirection.addItem(new Tag("RTL",
0139:                        it.businesslogic.ireport.util.I18n.getString(
0140:                                "runDirection.RTL", "Right to Left")));
0141:
0142:                this .jRTextExpressionAreaMapExpression.getDocument()
0143:                        .addDocumentListener(
0144:                                new javax.swing.event.DocumentListener() {
0145:                                    public void changedUpdate(
0146:                                            javax.swing.event.DocumentEvent evt) {
0147:                                        jRTextExpressionAreaMapExpressionTextChanged();
0148:                                    }
0149:
0150:                                    public void insertUpdate(
0151:                                            javax.swing.event.DocumentEvent evt) {
0152:                                        jRTextExpressionAreaMapExpressionTextChanged();
0153:                                    }
0154:
0155:                                    public void removeUpdate(
0156:                                            javax.swing.event.DocumentEvent evt) {
0157:                                        jRTextExpressionAreaMapExpressionTextChanged();
0158:                                    }
0159:                                });
0160:
0161:                this .jRTextExpressionAreaFilterExpression.getDocument()
0162:                        .addDocumentListener(
0163:                                new javax.swing.event.DocumentListener() {
0164:                                    public void changedUpdate(
0165:                                            javax.swing.event.DocumentEvent evt) {
0166:                                        jRTextExpressionAreaFilterExpressionTextChanged();
0167:                                    }
0168:
0169:                                    public void insertUpdate(
0170:                                            javax.swing.event.DocumentEvent evt) {
0171:                                        jRTextExpressionAreaFilterExpressionTextChanged();
0172:                                    }
0173:
0174:                                    public void removeUpdate(
0175:                                            javax.swing.event.DocumentEvent evt) {
0176:                                        jRTextExpressionAreaFilterExpressionTextChanged();
0177:                                    }
0178:                                });
0179:
0180:                this .jRTextExpressionAreaTextConnectionExpression.getDocument()
0181:                        .addDocumentListener(
0182:                                new javax.swing.event.DocumentListener() {
0183:                                    public void changedUpdate(
0184:                                            javax.swing.event.DocumentEvent evt) {
0185:                                        jRTextExpressionAreaTextConnectionExpressionTextChanged();
0186:                                    }
0187:
0188:                                    public void insertUpdate(
0189:                                            javax.swing.event.DocumentEvent evt) {
0190:                                        jRTextExpressionAreaTextConnectionExpressionTextChanged();
0191:                                    }
0192:
0193:                                    public void removeUpdate(
0194:                                            javax.swing.event.DocumentEvent evt) {
0195:                                        jRTextExpressionAreaTextConnectionExpressionTextChanged();
0196:                                    }
0197:                                });
0198:
0199:                javax.swing.DefaultListSelectionModel dlsm = (javax.swing.DefaultListSelectionModel) this .jTableDatasetParameters
0200:                        .getSelectionModel();
0201:                dlsm
0202:                        .addListSelectionListener(new javax.swing.event.ListSelectionListener() {
0203:                            public void valueChanged(
0204:                                    javax.swing.event.ListSelectionEvent e) {
0205:                                jTableDatasetParametersListSelectionValueChanged(e);
0206:                            }
0207:                        });
0208:
0209:                dlsm = (javax.swing.DefaultListSelectionModel) this .jTableMeasures
0210:                        .getSelectionModel();
0211:                dlsm
0212:                        .addListSelectionListener(new javax.swing.event.ListSelectionListener() {
0213:                            public void valueChanged(
0214:                                    javax.swing.event.ListSelectionEvent e) {
0215:                                jTableMeasuresListSelectionValueChanged(e);
0216:                            }
0217:                        });
0218:
0219:                dlsm = (javax.swing.DefaultListSelectionModel) this .jTableRowGroups
0220:                        .getSelectionModel();
0221:                dlsm
0222:                        .addListSelectionListener(new javax.swing.event.ListSelectionListener() {
0223:                            public void valueChanged(
0224:                                    javax.swing.event.ListSelectionEvent e) {
0225:                                jTableRowGroupsListSelectionValueChanged(e);
0226:                            }
0227:                        });
0228:
0229:                dlsm = (javax.swing.DefaultListSelectionModel) this .jTableColumnGroups
0230:                        .getSelectionModel();
0231:                dlsm
0232:                        .addListSelectionListener(new javax.swing.event.ListSelectionListener() {
0233:                            public void valueChanged(
0234:                                    javax.swing.event.ListSelectionEvent e) {
0235:                                jTableColumnGroupsListSelectionValueChanged(e);
0236:                            }
0237:                        });
0238:
0239:                this .jRTextExpressionAreaMapExpression
0240:                        .setCrosstabElements(new Vector());
0241:                this .jRTextExpressionAreaTextConnectionExpression
0242:                        .setCrosstabElements(new Vector());
0243:                if (MainFrame.getMainInstance().getActiveReportFrame() != null) {
0244:                    this .jRTextExpressionAreaMapExpression
0245:                            .setSubDataset(MainFrame.getMainInstance()
0246:                                    .getActiveReportFrame().getReport());
0247:                    this .jRTextExpressionAreaTextConnectionExpression
0248:                            .setSubDataset(MainFrame.getMainInstance()
0249:                                    .getActiveReportFrame().getReport());
0250:                }
0251:                this .pack();
0252:                it.businesslogic.ireport.util.Misc.centerFrame(this );
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:                        setVisible(false);
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:
0270:            }
0271:
0272:            public void applyI18n() {
0273:                // Start autogenerated code ----------------------
0274:                jCheckBoxPreSorted.setText(I18n.getString(
0275:                        "crosstabPropertiesDialog.checkBoxPreSorted",
0276:                        "Data is PreSorted"));
0277:                jCheckBoxUseDataset.setText(I18n.getString(
0278:                        "crosstabPropertiesDialog.checkBoxUseDataset",
0279:                        "Use a dataset to fill the crosstab"));
0280:                // End autogenerated code ----------------------
0281:                // Start autogenerated code ----------------------
0282:                jButtonAddColumnGroup
0283:                        .setText(I18n
0284:                                .getString(
0285:                                        "crosstabPropertiesDialog.buttonAddColumnGroup",
0286:                                        "Add"));
0287:                jButtonAddMeasure.setText(I18n.getString(
0288:                        "crosstabPropertiesDialog.buttonAddMeasure", "Add"));
0289:                jButtonAddParameter.setText(I18n.getString(
0290:                        "crosstabPropertiesDialog.buttonAddParameter", "Add"));
0291:                jButtonAddRowGroup.setText(I18n.getString(
0292:                        "crosstabPropertiesDialog.buttonAddRowGroup", "Add"));
0293:                jButtonDownColumnGroup.setText(I18n.getString(
0294:                        "crosstabPropertiesDialog.buttonDownColumnGroup",
0295:                        "Down"));
0296:                jButtonDownRowGroup.setText(I18n.getString(
0297:                        "crosstabPropertiesDialog.buttonDownRowGroup", "Down"));
0298:                jButtonModColumnGroup.setText(I18n.getString(
0299:                        "crosstabPropertiesDialog.buttonModColumnGroup",
0300:                        "Modify"));
0301:                jButtonModMeasure.setText(I18n.getString(
0302:                        "crosstabPropertiesDialog.buttonModMeasure", "Modify"));
0303:                jButtonModParameter.setText(I18n
0304:                        .getString(
0305:                                "crosstabPropertiesDialog.buttonModParameter",
0306:                                "Modify"));
0307:                jButtonModRowGroup
0308:                        .setText(I18n.getString(
0309:                                "crosstabPropertiesDialog.buttonModRowGroup",
0310:                                "Modify"));
0311:                jButtonRemColumnGroup.setText(I18n.getString(
0312:                        "crosstabPropertiesDialog.buttonRemColumnGroup",
0313:                        "Remove"));
0314:                jButtonRemMeasure.setText(I18n.getString(
0315:                        "crosstabPropertiesDialog.buttonRemMeasure", "Remove"));
0316:                jButtonRemParameter.setText(I18n
0317:                        .getString(
0318:                                "crosstabPropertiesDialog.buttonRemParameter",
0319:                                "Remove"));
0320:                jButtonRemRowGroup
0321:                        .setText(I18n.getString(
0322:                                "crosstabPropertiesDialog.buttonRemRowGroup",
0323:                                "Remove"));
0324:                jButtonUpColumnGroup.setText(I18n.getString(
0325:                        "crosstabPropertiesDialog.buttonUpColumnGroup", "Up"));
0326:                jButtonUpRowGroup.setText(I18n.getString(
0327:                        "crosstabPropertiesDialog.buttonUpRowGroup", "Up"));
0328:                jLabel1.setText(I18n.getString(
0329:                        "crosstabPropertiesDialog.label1", "Row groups"));
0330:                jLabel2.setText(I18n.getString(
0331:                        "crosstabPropertiesDialog.label2", "Column groups"));
0332:                jLabel26.setText(I18n.getString(
0333:                        "crosstabPropertiesDialog.label26",
0334:                        "Parameters Map Expression"));
0335:                jLabel41.setText(I18n.getString(
0336:                        "crosstabPropertiesDialog.label41",
0337:                        "Connection / Datasource Expression"));
0338:                jLabelIncrementType1.setText(I18n.getString(
0339:                        "crosstabPropertiesDialog.labelIncrementType1",
0340:                        "Sub dataset"));
0341:                jLabelIncrementWhenExpression
0342:                        .setText(I18n
0343:                                .getString(
0344:                                        "crosstabPropertiesDialog.labelIncrementWhenExpression",
0345:                                        "Increment When expression"));
0346:
0347:                jLabelRunDirection.setText(I18n.getString(
0348:                        "crosstabPropertiesDialog.labelRunDirection",
0349:                        "Run direction"));
0350:                // End autogenerated code ----------------------
0351:
0352:                jLabelResetType.setText(it.businesslogic.ireport.util.I18n
0353:                        .getString("resetType", "Reset type"));
0354:                jLabelResetGroup.setText(it.businesslogic.ireport.util.I18n
0355:                        .getString("resetGroup", "Reset group"));
0356:                jLabelIncrementType.setText(it.businesslogic.ireport.util.I18n
0357:                        .getString("incrementType", "Increment type"));
0358:                jLabelIncrementGroup.setText(it.businesslogic.ireport.util.I18n
0359:                        .getString("incrementGroup", "Increment group"));
0360:
0361:                jButtonCopy.setText(it.businesslogic.ireport.util.I18n
0362:                        .getString("charts.copyDataset", "Copy dataset"));
0363:                jButtonPaste.setText(it.businesslogic.ireport.util.I18n
0364:                        .getString("charts.pasteDataset", "Paste dataset"));
0365:
0366:                jTableDatasetParameters
0367:                        .getColumnModel()
0368:                        .getColumn(0)
0369:                        .setHeaderValue(
0370:                                I18n
0371:                                        .getString(
0372:                                                "crosstabPropertiesDialog.tablecolumn.parameterName",
0373:                                                "Parameter name"));
0374:                jTableDatasetParameters
0375:                        .getColumnModel()
0376:                        .getColumn(1)
0377:                        .setHeaderValue(
0378:                                I18n
0379:                                        .getString(
0380:                                                "crosstabPropertiesDialog.tablecolumn.expression",
0381:                                                "Expression"));
0382:                jTableRowGroups
0383:                        .getColumnModel()
0384:                        .getColumn(0)
0385:                        .setHeaderValue(
0386:                                I18n
0387:                                        .getString(
0388:                                                "crosstabPropertiesDialog.tablecolumn.rowGroup",
0389:                                                "Row group"));
0390:                jTableColumnGroups
0391:                        .getColumnModel()
0392:                        .getColumn(0)
0393:                        .setHeaderValue(
0394:                                I18n
0395:                                        .getString(
0396:                                                "crosstabPropertiesDialog.tablecolumn.columnGroup",
0397:                                                "Column group"));
0398:                jTableMeasures.getColumnModel().getColumn(0).setHeaderValue(
0399:                        I18n.getString(
0400:                                "crosstabPropertiesDialog.tablecolumn.measure",
0401:                                "Measure"));
0402:                jTableMeasures.getColumnModel().getColumn(1).setHeaderValue(
0403:                        I18n.getString(
0404:                                "crosstabPropertiesDialog.tablecolumn.class",
0405:                                "Class"));
0406:
0407:                jTabbedPane1.setTitleAt(0, it.businesslogic.ireport.util.I18n
0408:                        .getString("crosstabPropertiesDialog.tab.CrosstabData",
0409:                                "Crosstab data"));
0410:                jTabbedPane1
0411:                        .setTitleAt(
0412:                                1,
0413:                                it.businesslogic.ireport.util.I18n
0414:                                        .getString(
0415:                                                "crosstabPropertiesDialog.tab.RowAndColumnGroups",
0416:                                                "Row and column groups"));
0417:                jTabbedPane1.setTitleAt(2, it.businesslogic.ireport.util.I18n
0418:                        .getString("crosstabPropertiesDialog.tab.Measures",
0419:                                "Measures"));
0420:
0421:                jTabbedPane2.setTitleAt(0, it.businesslogic.ireport.util.I18n
0422:                        .getString("datasetRun.tab.Parameters", "Parameters"));
0423:                jTabbedPane2.setTitleAt(1, it.businesslogic.ireport.util.I18n
0424:                        .getString("datasetRun.tab.ParametersMapExp",
0425:                                "Parameters map exp."));
0426:                jTabbedPane2.setTitleAt(2, it.businesslogic.ireport.util.I18n
0427:                        .getString("datasetRun.tab.ConnectionDatasourceExp",
0428:                                "Connection/Datasource exp."));
0429:
0430:                ((javax.swing.border.TitledBorder) jPanelDataset.getBorder())
0431:                        .setTitle(I18n.getString(
0432:                                "datasetRun.panelBorder.Bucket", "Dataset"));
0433:                ((javax.swing.border.TitledBorder) jPanel1.getBorder())
0434:                        .setTitle(I18n.getString(
0435:                                "datasetRun.panelBorder.DatasetRun",
0436:                                "Dataset Run"));
0437:
0438:                this .setTitle(it.businesslogic.ireport.util.I18n.getString(
0439:                        "gui.CrosstabPropertiesDialog.title",
0440:                        "Crosstab properties"));
0441:                this .getRootPane().updateUI();
0442:            }
0443:
0444:            /** This method is called from within the constructor to
0445:             * initialize the form.
0446:             * WARNING: Do NOT modify this code. The content of this method is
0447:             * always regenerated by the Form Editor.
0448:             */
0449:            // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
0450:            private void initComponents() {
0451:                java.awt.GridBagConstraints gridBagConstraints;
0452:
0453:                jTabbedPane1 = new javax.swing.JTabbedPane();
0454:                jPanel8 = new javax.swing.JPanel();
0455:                jPanelDataset = new javax.swing.JPanel();
0456:                jLabelResetType = new javax.swing.JLabel();
0457:                jComboBoxResetType = new javax.swing.JComboBox();
0458:                jLabelResetGroup = new javax.swing.JLabel();
0459:                jComboBoxResetGroup = new javax.swing.JComboBox();
0460:                jLabelIncrementType = new javax.swing.JLabel();
0461:                jComboBoxIncrementType = new javax.swing.JComboBox();
0462:                jLabelIncrementGroup = new javax.swing.JLabel();
0463:                jComboBoxIncrementGroup = new javax.swing.JComboBox();
0464:                jPanel1 = new javax.swing.JPanel();
0465:                jLabelIncrementType1 = new javax.swing.JLabel();
0466:                jComboBoxSubDataset = new javax.swing.JComboBox();
0467:                jPanel7 = new javax.swing.JPanel();
0468:                jTabbedPane2 = new javax.swing.JTabbedPane();
0469:                jPanel4 = new javax.swing.JPanel();
0470:                jPanel16 = new javax.swing.JPanel();
0471:                jScrollPane2 = new javax.swing.JScrollPane();
0472:                jTableDatasetParameters = new javax.swing.JTable();
0473:                jPanel10 = new javax.swing.JPanel();
0474:                jButtonAddParameter = new javax.swing.JButton();
0475:                jButtonModParameter = new javax.swing.JButton();
0476:                jButtonRemParameter = new javax.swing.JButton();
0477:                jPanel13 = new javax.swing.JPanel();
0478:                jPanel5 = new javax.swing.JPanel();
0479:                jLabel26 = new javax.swing.JLabel();
0480:                jRTextExpressionAreaMapExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea();
0481:                jPanel6 = new javax.swing.JPanel();
0482:                jLabel41 = new javax.swing.JLabel();
0483:                jComboBoxDatasetConnectionType = new javax.swing.JComboBox();
0484:                jRTextExpressionAreaTextConnectionExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea();
0485:                jPanel2 = new javax.swing.JPanel();
0486:                jButtonCopy = new javax.swing.JButton();
0487:                jButtonPaste = new javax.swing.JButton();
0488:                jPanel3 = new javax.swing.JPanel();
0489:                jCheckBoxPreSorted = new javax.swing.JCheckBox();
0490:                jLabelIncrementWhenExpression = new javax.swing.JLabel();
0491:                jRTextExpressionAreaFilterExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea();
0492:                jCheckBoxUseDataset = new javax.swing.JCheckBox();
0493:                jPanel23 = new javax.swing.JPanel();
0494:                jLabelRunDirection = new javax.swing.JLabel();
0495:                jComboBoxrunDirection = new javax.swing.JComboBox();
0496:                jPanel9 = new javax.swing.JPanel();
0497:                jLabel1 = new javax.swing.JLabel();
0498:                jPanel18 = new javax.swing.JPanel();
0499:                jScrollPane4 = new javax.swing.JScrollPane();
0500:                jTableRowGroups = new javax.swing.JTable();
0501:                jPanel15 = new javax.swing.JPanel();
0502:                jButtonAddRowGroup = new javax.swing.JButton();
0503:                jButtonModRowGroup = new javax.swing.JButton();
0504:                jButtonRemRowGroup = new javax.swing.JButton();
0505:                jButtonUpRowGroup = new javax.swing.JButton();
0506:                jButtonDownRowGroup = new javax.swing.JButton();
0507:                jPanel19 = new javax.swing.JPanel();
0508:                jPanel20 = new javax.swing.JPanel();
0509:                jScrollPane5 = new javax.swing.JScrollPane();
0510:                jTableColumnGroups = new javax.swing.JTable();
0511:                jPanel21 = new javax.swing.JPanel();
0512:                jButtonAddColumnGroup = new javax.swing.JButton();
0513:                jButtonModColumnGroup = new javax.swing.JButton();
0514:                jButtonRemColumnGroup = new javax.swing.JButton();
0515:                jButtonUpColumnGroup = new javax.swing.JButton();
0516:                jButtonDownColumnGroup = new javax.swing.JButton();
0517:                jPanel22 = new javax.swing.JPanel();
0518:                jLabel2 = new javax.swing.JLabel();
0519:                jPanel11 = new javax.swing.JPanel();
0520:                jPanel17 = new javax.swing.JPanel();
0521:                jScrollPane3 = new javax.swing.JScrollPane();
0522:                jTableMeasures = new javax.swing.JTable();
0523:                jPanel12 = new javax.swing.JPanel();
0524:                jButtonAddMeasure = new javax.swing.JButton();
0525:                jButtonModMeasure = new javax.swing.JButton();
0526:                jButtonRemMeasure = new javax.swing.JButton();
0527:                jPanel14 = new javax.swing.JPanel();
0528:
0529:                setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
0530:                setTitle("Crosstab properties");
0531:                addWindowListener(new java.awt.event.WindowAdapter() {
0532:                    public void windowOpened(java.awt.event.WindowEvent evt) {
0533:                        formWindowOpened(evt);
0534:                    }
0535:                });
0536:                getContentPane().setLayout(new java.awt.GridBagLayout());
0537:
0538:                jPanel8.setLayout(new java.awt.GridBagLayout());
0539:
0540:                jPanelDataset
0541:                        .setBorder(javax.swing.BorderFactory
0542:                                .createTitledBorder(
0543:                                        javax.swing.BorderFactory
0544:                                                .createEtchedBorder(),
0545:                                        "Dataset",
0546:                                        javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
0547:                                        javax.swing.border.TitledBorder.DEFAULT_POSITION,
0548:                                        new java.awt.Font("Dialog", 0, 11)));
0549:                jPanelDataset
0550:                        .setPreferredSize(new java.awt.Dimension(460, 420));
0551:                jPanelDataset.setLayout(new java.awt.GridBagLayout());
0552:
0553:                jLabelResetType.setText("Reset type");
0554:                gridBagConstraints = new java.awt.GridBagConstraints();
0555:                gridBagConstraints.gridx = 0;
0556:                gridBagConstraints.gridy = 4;
0557:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0558:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 0, 3);
0559:                jPanelDataset.add(jLabelResetType, gridBagConstraints);
0560:
0561:                jComboBoxResetType
0562:                        .addActionListener(new java.awt.event.ActionListener() {
0563:                            public void actionPerformed(
0564:                                    java.awt.event.ActionEvent evt) {
0565:                                jComboBoxResetTypeActionPerformed(evt);
0566:                            }
0567:                        });
0568:                gridBagConstraints = new java.awt.GridBagConstraints();
0569:                gridBagConstraints.gridx = 0;
0570:                gridBagConstraints.gridy = 5;
0571:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0572:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0573:                gridBagConstraints.weightx = 1.0;
0574:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0575:                jPanelDataset.add(jComboBoxResetType, gridBagConstraints);
0576:
0577:                jLabelResetGroup.setText("Reset group");
0578:                gridBagConstraints = new java.awt.GridBagConstraints();
0579:                gridBagConstraints.gridx = 1;
0580:                gridBagConstraints.gridy = 4;
0581:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0582:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 0, 3);
0583:                jPanelDataset.add(jLabelResetGroup, gridBagConstraints);
0584:
0585:                jComboBoxResetGroup
0586:                        .addActionListener(new java.awt.event.ActionListener() {
0587:                            public void actionPerformed(
0588:                                    java.awt.event.ActionEvent evt) {
0589:                                jComboBoxResetGroupActionPerformed(evt);
0590:                            }
0591:                        });
0592:                gridBagConstraints = new java.awt.GridBagConstraints();
0593:                gridBagConstraints.gridx = 1;
0594:                gridBagConstraints.gridy = 5;
0595:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0596:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0597:                gridBagConstraints.weightx = 1.0;
0598:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0599:                jPanelDataset.add(jComboBoxResetGroup, gridBagConstraints);
0600:
0601:                jLabelIncrementType.setText("Increment type");
0602:                gridBagConstraints = new java.awt.GridBagConstraints();
0603:                gridBagConstraints.gridx = 0;
0604:                gridBagConstraints.gridy = 6;
0605:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0606:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 0, 3);
0607:                jPanelDataset.add(jLabelIncrementType, gridBagConstraints);
0608:
0609:                jComboBoxIncrementType
0610:                        .addActionListener(new java.awt.event.ActionListener() {
0611:                            public void actionPerformed(
0612:                                    java.awt.event.ActionEvent evt) {
0613:                                jComboBoxIncrementTypeActionPerformed(evt);
0614:                            }
0615:                        });
0616:                gridBagConstraints = new java.awt.GridBagConstraints();
0617:                gridBagConstraints.gridx = 0;
0618:                gridBagConstraints.gridy = 7;
0619:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0620:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0621:                gridBagConstraints.weightx = 1.0;
0622:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0623:                jPanelDataset.add(jComboBoxIncrementType, gridBagConstraints);
0624:
0625:                jLabelIncrementGroup.setText("Increment group");
0626:                gridBagConstraints = new java.awt.GridBagConstraints();
0627:                gridBagConstraints.gridx = 1;
0628:                gridBagConstraints.gridy = 6;
0629:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0630:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 0, 3);
0631:                jPanelDataset.add(jLabelIncrementGroup, gridBagConstraints);
0632:
0633:                jComboBoxIncrementGroup
0634:                        .addActionListener(new java.awt.event.ActionListener() {
0635:                            public void actionPerformed(
0636:                                    java.awt.event.ActionEvent evt) {
0637:                                jComboBoxIncrementGroupActionPerformed(evt);
0638:                            }
0639:                        });
0640:                gridBagConstraints = new java.awt.GridBagConstraints();
0641:                gridBagConstraints.gridx = 1;
0642:                gridBagConstraints.gridy = 7;
0643:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0644:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0645:                gridBagConstraints.weightx = 1.0;
0646:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0647:                jPanelDataset.add(jComboBoxIncrementGroup, gridBagConstraints);
0648:
0649:                jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(
0650:                        javax.swing.BorderFactory.createEtchedBorder(),
0651:                        "Dataset run",
0652:                        javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
0653:                        javax.swing.border.TitledBorder.DEFAULT_POSITION,
0654:                        new java.awt.Font("Dialog", 0, 11)));
0655:                jPanel1.setMinimumSize(new java.awt.Dimension(329, 180));
0656:                jPanel1.setPreferredSize(new java.awt.Dimension(430, 180));
0657:                jPanel1.setLayout(new java.awt.GridBagLayout());
0658:
0659:                jLabelIncrementType1.setText("Sub dataset");
0660:                gridBagConstraints = new java.awt.GridBagConstraints();
0661:                gridBagConstraints.gridx = 0;
0662:                gridBagConstraints.gridy = 0;
0663:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0664:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 0, 3);
0665:                jPanel1.add(jLabelIncrementType1, gridBagConstraints);
0666:
0667:                jComboBoxSubDataset.setMinimumSize(new java.awt.Dimension(23,
0668:                        22));
0669:                jComboBoxSubDataset
0670:                        .addActionListener(new java.awt.event.ActionListener() {
0671:                            public void actionPerformed(
0672:                                    java.awt.event.ActionEvent evt) {
0673:                                jComboBoxSubDatasetActionPerformed(evt);
0674:                            }
0675:                        });
0676:                gridBagConstraints = new java.awt.GridBagConstraints();
0677:                gridBagConstraints.gridx = 1;
0678:                gridBagConstraints.gridy = 0;
0679:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0680:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0681:                gridBagConstraints.weightx = 1.0;
0682:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
0683:                jPanel1.add(jComboBoxSubDataset, gridBagConstraints);
0684:
0685:                jPanel7.setLayout(new java.awt.GridBagLayout());
0686:
0687:                jPanel4.setLayout(new java.awt.GridBagLayout());
0688:
0689:                jPanel16.setLayout(new java.awt.GridBagLayout());
0690:
0691:                jScrollPane2.setMinimumSize(new java.awt.Dimension(300, 50));
0692:                jScrollPane2.setPreferredSize(new java.awt.Dimension(300, 50));
0693:
0694:                jTableDatasetParameters
0695:                        .setModel(new javax.swing.table.DefaultTableModel(
0696:                                new Object[][] {
0697:
0698:                                }, new String[] { "Parameter", "Expression" }) {
0699:                            boolean[] canEdit = new boolean[] { false, false };
0700:
0701:                            public boolean isCellEditable(int rowIndex,
0702:                                    int columnIndex) {
0703:                                return canEdit[columnIndex];
0704:                            }
0705:                        });
0706:                jTableDatasetParameters
0707:                        .addMouseListener(new java.awt.event.MouseAdapter() {
0708:                            public void mouseClicked(
0709:                                    java.awt.event.MouseEvent evt) {
0710:                                jTableDatasetParametersMouseClicked(evt);
0711:                            }
0712:                        });
0713:                jScrollPane2.setViewportView(jTableDatasetParameters);
0714:
0715:                gridBagConstraints = new java.awt.GridBagConstraints();
0716:                gridBagConstraints.gridx = 0;
0717:                gridBagConstraints.gridy = 0;
0718:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0719:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0720:                gridBagConstraints.weightx = 1.0;
0721:                gridBagConstraints.weighty = 1.0;
0722:                gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
0723:                jPanel16.add(jScrollPane2, gridBagConstraints);
0724:
0725:                jPanel10.setLayout(new java.awt.GridBagLayout());
0726:
0727:                jButtonAddParameter.setText("Add");
0728:                jButtonAddParameter
0729:                        .addActionListener(new java.awt.event.ActionListener() {
0730:                            public void actionPerformed(
0731:                                    java.awt.event.ActionEvent evt) {
0732:                                jButtonAddParameterActionPerformed(evt);
0733:                            }
0734:                        });
0735:                gridBagConstraints = new java.awt.GridBagConstraints();
0736:                gridBagConstraints.gridx = 0;
0737:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0738:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0739:                gridBagConstraints.weightx = 1.0;
0740:                jPanel10.add(jButtonAddParameter, gridBagConstraints);
0741:                jButtonAddParameter.getAccessibleContext()
0742:                        .setAccessibleName("");
0743:
0744:                jButtonModParameter.setText("Modify");
0745:                jButtonModParameter.setEnabled(false);
0746:                jButtonModParameter
0747:                        .addActionListener(new java.awt.event.ActionListener() {
0748:                            public void actionPerformed(
0749:                                    java.awt.event.ActionEvent evt) {
0750:                                jButtonModParameterActionPerformed(evt);
0751:                            }
0752:                        });
0753:                gridBagConstraints = new java.awt.GridBagConstraints();
0754:                gridBagConstraints.gridx = 0;
0755:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0756:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0757:                gridBagConstraints.weightx = 1.0;
0758:                jPanel10.add(jButtonModParameter, gridBagConstraints);
0759:                jButtonModParameter.getAccessibleContext()
0760:                        .setAccessibleName("");
0761:
0762:                jButtonRemParameter.setText("Remove");
0763:                jButtonRemParameter.setEnabled(false);
0764:                jButtonRemParameter
0765:                        .addActionListener(new java.awt.event.ActionListener() {
0766:                            public void actionPerformed(
0767:                                    java.awt.event.ActionEvent evt) {
0768:                                jButtonRemParameterActionPerformed(evt);
0769:                            }
0770:                        });
0771:                gridBagConstraints = new java.awt.GridBagConstraints();
0772:                gridBagConstraints.gridx = 0;
0773:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0774:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0775:                gridBagConstraints.weightx = 1.0;
0776:                jPanel10.add(jButtonRemParameter, gridBagConstraints);
0777:                jButtonRemParameter.getAccessibleContext()
0778:                        .setAccessibleName("");
0779:
0780:                gridBagConstraints = new java.awt.GridBagConstraints();
0781:                gridBagConstraints.gridx = 0;
0782:                gridBagConstraints.weightx = 1.0;
0783:                gridBagConstraints.weighty = 1.0;
0784:                jPanel10.add(jPanel13, gridBagConstraints);
0785:
0786:                gridBagConstraints = new java.awt.GridBagConstraints();
0787:                gridBagConstraints.gridy = 0;
0788:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0789:                gridBagConstraints.weighty = 1.0;
0790:                gridBagConstraints.insets = new java.awt.Insets(4, 0, 4, 4);
0791:                jPanel16.add(jPanel10, gridBagConstraints);
0792:
0793:                gridBagConstraints = new java.awt.GridBagConstraints();
0794:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0795:                gridBagConstraints.weightx = 1.0;
0796:                gridBagConstraints.weighty = 1.0;
0797:                jPanel4.add(jPanel16, gridBagConstraints);
0798:
0799:                jTabbedPane2.addTab("Parameters", jPanel4);
0800:
0801:                jPanel5.setLayout(new java.awt.GridBagLayout());
0802:
0803:                jLabel26
0804:                        .setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
0805:                jLabel26.setText("Parameters Map Expression");
0806:                gridBagConstraints = new java.awt.GridBagConstraints();
0807:                gridBagConstraints.gridx = 0;
0808:                gridBagConstraints.gridy = 2;
0809:                gridBagConstraints.gridwidth = 3;
0810:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0811:                gridBagConstraints.insets = new java.awt.Insets(6, 8, 0, 0);
0812:                jPanel5.add(jLabel26, gridBagConstraints);
0813:
0814:                jRTextExpressionAreaMapExpression
0815:                        .setBorder(javax.swing.BorderFactory
0816:                                .createEtchedBorder());
0817:                jRTextExpressionAreaMapExpression.setElectricScroll(0);
0818:                jRTextExpressionAreaMapExpression
0819:                        .setMinimumSize(new java.awt.Dimension(0, 0));
0820:                jRTextExpressionAreaMapExpression
0821:                        .setPreferredSize(new java.awt.Dimension(300, 50));
0822:                gridBagConstraints = new java.awt.GridBagConstraints();
0823:                gridBagConstraints.gridx = 0;
0824:                gridBagConstraints.gridy = 3;
0825:                gridBagConstraints.gridwidth = 3;
0826:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0827:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0828:                gridBagConstraints.weightx = 1.0;
0829:                gridBagConstraints.weighty = 1.0;
0830:                gridBagConstraints.insets = new java.awt.Insets(2, 4, 4, 4);
0831:                jPanel5.add(jRTextExpressionAreaMapExpression,
0832:                        gridBagConstraints);
0833:
0834:                jTabbedPane2.addTab("Parameters map exp", jPanel5);
0835:
0836:                jPanel6.setLayout(new java.awt.GridBagLayout());
0837:
0838:                jLabel41.setText("Connection / Datasource Expression");
0839:                gridBagConstraints = new java.awt.GridBagConstraints();
0840:                gridBagConstraints.gridx = 0;
0841:                gridBagConstraints.gridy = 2;
0842:                gridBagConstraints.gridwidth = 2;
0843:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0844:                gridBagConstraints.insets = new java.awt.Insets(2, 6, 0, 0);
0845:                jPanel6.add(jLabel41, gridBagConstraints);
0846:
0847:                jComboBoxDatasetConnectionType
0848:                        .setMinimumSize(new java.awt.Dimension(300, 20));
0849:                jComboBoxDatasetConnectionType
0850:                        .setPreferredSize(new java.awt.Dimension(300, 20));
0851:                jComboBoxDatasetConnectionType
0852:                        .addActionListener(new java.awt.event.ActionListener() {
0853:                            public void actionPerformed(
0854:                                    java.awt.event.ActionEvent evt) {
0855:                                jComboBoxDatasetConnectionTypeActionPerformed(evt);
0856:                            }
0857:                        });
0858:                gridBagConstraints = new java.awt.GridBagConstraints();
0859:                gridBagConstraints.gridx = 0;
0860:                gridBagConstraints.gridy = 3;
0861:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0862:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
0863:                gridBagConstraints.insets = new java.awt.Insets(2, 6, 0, 6);
0864:                jPanel6.add(jComboBoxDatasetConnectionType, gridBagConstraints);
0865:
0866:                jRTextExpressionAreaTextConnectionExpression
0867:                        .setBorder(javax.swing.BorderFactory
0868:                                .createEtchedBorder());
0869:                jRTextExpressionAreaTextConnectionExpression.setEnabled(false);
0870:                jRTextExpressionAreaTextConnectionExpression
0871:                        .setMinimumSize(new java.awt.Dimension(300, 50));
0872:                jRTextExpressionAreaTextConnectionExpression
0873:                        .setPreferredSize(new java.awt.Dimension(300, 50));
0874:                gridBagConstraints = new java.awt.GridBagConstraints();
0875:                gridBagConstraints.gridx = 0;
0876:                gridBagConstraints.gridy = 4;
0877:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0878:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0879:                gridBagConstraints.weightx = 1.0;
0880:                gridBagConstraints.weighty = 1.0;
0881:                gridBagConstraints.insets = new java.awt.Insets(2, 4, 4, 4);
0882:                jPanel6.add(jRTextExpressionAreaTextConnectionExpression,
0883:                        gridBagConstraints);
0884:
0885:                jTabbedPane2.addTab("Connection/Datasource exp", jPanel6);
0886:
0887:                gridBagConstraints = new java.awt.GridBagConstraints();
0888:                gridBagConstraints.gridy = 1;
0889:                gridBagConstraints.gridwidth = 2;
0890:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0891:                gridBagConstraints.weightx = 1.0;
0892:                gridBagConstraints.weighty = 1.0;
0893:                gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
0894:                jPanel7.add(jTabbedPane2, gridBagConstraints);
0895:
0896:                gridBagConstraints = new java.awt.GridBagConstraints();
0897:                gridBagConstraints.gridx = 0;
0898:                gridBagConstraints.gridwidth = 2;
0899:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0900:                gridBagConstraints.weightx = 1.0;
0901:                gridBagConstraints.weighty = 1.0;
0902:                jPanel1.add(jPanel7, gridBagConstraints);
0903:
0904:                gridBagConstraints = new java.awt.GridBagConstraints();
0905:                gridBagConstraints.gridy = 100;
0906:                gridBagConstraints.gridwidth = 2;
0907:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0908:                gridBagConstraints.weightx = 1.0;
0909:                gridBagConstraints.weighty = 1.0;
0910:                gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
0911:                jPanelDataset.add(jPanel1, gridBagConstraints);
0912:
0913:                jPanel2.setLayout(new java.awt.GridBagLayout());
0914:
0915:                jButtonCopy.setText("Copy dataset");
0916:                jButtonCopy
0917:                        .addActionListener(new java.awt.event.ActionListener() {
0918:                            public void actionPerformed(
0919:                                    java.awt.event.ActionEvent evt) {
0920:                                jButtonCopyActionPerformed(evt);
0921:                            }
0922:                        });
0923:                gridBagConstraints = new java.awt.GridBagConstraints();
0924:                gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 4);
0925:                jPanel2.add(jButtonCopy, gridBagConstraints);
0926:
0927:                jButtonPaste.setText("Paste dataset");
0928:                jButtonPaste
0929:                        .addActionListener(new java.awt.event.ActionListener() {
0930:                            public void actionPerformed(
0931:                                    java.awt.event.ActionEvent evt) {
0932:                                jButtonPasteActionPerformed(evt);
0933:                            }
0934:                        });
0935:                jPanel2.add(jButtonPaste, new java.awt.GridBagConstraints());
0936:                gridBagConstraints = new java.awt.GridBagConstraints();
0937:                gridBagConstraints.weightx = 1.0;
0938:                jPanel2.add(jPanel3, gridBagConstraints);
0939:
0940:                gridBagConstraints = new java.awt.GridBagConstraints();
0941:                gridBagConstraints.gridx = 0;
0942:                gridBagConstraints.gridy = 101;
0943:                gridBagConstraints.gridwidth = 2;
0944:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0945:                gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 0);
0946:                jPanelDataset.add(jPanel2, gridBagConstraints);
0947:
0948:                jCheckBoxPreSorted.setText("Data is PreSorted");
0949:                jCheckBoxPreSorted.setBorder(javax.swing.BorderFactory
0950:                        .createEmptyBorder(0, 0, 0, 0));
0951:                jCheckBoxPreSorted.setMargin(new java.awt.Insets(0, 0, 0, 0));
0952:                jCheckBoxPreSorted
0953:                        .addActionListener(new java.awt.event.ActionListener() {
0954:                            public void actionPerformed(
0955:                                    java.awt.event.ActionEvent evt) {
0956:                                jCheckBoxPreSortedActionPerformed(evt);
0957:                            }
0958:                        });
0959:                gridBagConstraints = new java.awt.GridBagConstraints();
0960:                gridBagConstraints.gridwidth = 2;
0961:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
0962:                gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
0963:                jPanelDataset.add(jCheckBoxPreSorted, gridBagConstraints);
0964:
0965:                jLabelIncrementWhenExpression
0966:                        .setText("Increment When expression");
0967:                gridBagConstraints = new java.awt.GridBagConstraints();
0968:                gridBagConstraints.gridx = 0;
0969:                gridBagConstraints.gridy = 8;
0970:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0971:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 0, 3);
0972:                jPanelDataset.add(jLabelIncrementWhenExpression,
0973:                        gridBagConstraints);
0974:
0975:                jRTextExpressionAreaFilterExpression
0976:                        .setBorder(javax.swing.BorderFactory
0977:                                .createEtchedBorder());
0978:                jRTextExpressionAreaFilterExpression.setCaretVisible(false);
0979:                jRTextExpressionAreaFilterExpression.setElectricScroll(0);
0980:                jRTextExpressionAreaFilterExpression
0981:                        .setMinimumSize(new java.awt.Dimension(400, 50));
0982:                jRTextExpressionAreaFilterExpression
0983:                        .setPreferredSize(new java.awt.Dimension(400, 50));
0984:                gridBagConstraints = new java.awt.GridBagConstraints();
0985:                gridBagConstraints.gridx = 0;
0986:                gridBagConstraints.gridy = 9;
0987:                gridBagConstraints.gridwidth = 2;
0988:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0989:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
0990:                gridBagConstraints.weightx = 1.0;
0991:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 3, 3);
0992:                jPanelDataset.add(jRTextExpressionAreaFilterExpression,
0993:                        gridBagConstraints);
0994:
0995:                gridBagConstraints = new java.awt.GridBagConstraints();
0996:                gridBagConstraints.gridy = 2;
0997:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
0998:                gridBagConstraints.weightx = 1.0;
0999:                gridBagConstraints.weighty = 1.0;
1000:                gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
1001:                jPanel8.add(jPanelDataset, gridBagConstraints);
1002:
1003:                jCheckBoxUseDataset
1004:                        .setText("Use a dataset to fill the crosstab");
1005:                jCheckBoxUseDataset.setBorder(javax.swing.BorderFactory
1006:                        .createEmptyBorder(0, 0, 0, 0));
1007:                jCheckBoxUseDataset.setMargin(new java.awt.Insets(0, 0, 0, 0));
1008:                jCheckBoxUseDataset
1009:                        .addActionListener(new java.awt.event.ActionListener() {
1010:                            public void actionPerformed(
1011:                                    java.awt.event.ActionEvent evt) {
1012:                                jCheckBoxUseDatasetActionPerformed(evt);
1013:                            }
1014:                        });
1015:                gridBagConstraints = new java.awt.GridBagConstraints();
1016:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1017:                gridBagConstraints.insets = new java.awt.Insets(8, 8, 8, 4);
1018:                jPanel8.add(jCheckBoxUseDataset, gridBagConstraints);
1019:
1020:                jPanel23.setLayout(new java.awt.GridBagLayout());
1021:
1022:                jLabelRunDirection.setText("Run direction");
1023:                gridBagConstraints = new java.awt.GridBagConstraints();
1024:                gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 4);
1025:                jPanel23.add(jLabelRunDirection, gridBagConstraints);
1026:
1027:                jComboBoxrunDirection.setMinimumSize(new java.awt.Dimension(
1028:                        300, 18));
1029:                jComboBoxrunDirection
1030:                        .addActionListener(new java.awt.event.ActionListener() {
1031:                            public void actionPerformed(
1032:                                    java.awt.event.ActionEvent evt) {
1033:                                jComboBoxrunDirectionActionPerformed(evt);
1034:                            }
1035:                        });
1036:                gridBagConstraints = new java.awt.GridBagConstraints();
1037:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1038:                gridBagConstraints.weightx = 1.0;
1039:                jPanel23.add(jComboBoxrunDirection, gridBagConstraints);
1040:
1041:                gridBagConstraints = new java.awt.GridBagConstraints();
1042:                gridBagConstraints.gridx = 0;
1043:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1044:                gridBagConstraints.weightx = 1.0;
1045:                gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
1046:                jPanel8.add(jPanel23, gridBagConstraints);
1047:
1048:                jTabbedPane1.addTab("Crosstab data", jPanel8);
1049:
1050:                jPanel9.setLayout(new java.awt.GridBagLayout());
1051:
1052:                jLabel1.setText("Row groups");
1053:                gridBagConstraints = new java.awt.GridBagConstraints();
1054:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1055:                gridBagConstraints.weightx = 1.0;
1056:                gridBagConstraints.insets = new java.awt.Insets(4, 6, 0, 6);
1057:                jPanel9.add(jLabel1, gridBagConstraints);
1058:
1059:                jPanel18.setLayout(new java.awt.GridBagLayout());
1060:
1061:                jScrollPane4.setMinimumSize(new java.awt.Dimension(300, 50));
1062:                jScrollPane4.setPreferredSize(new java.awt.Dimension(300, 50));
1063:
1064:                jTableRowGroups
1065:                        .setModel(new javax.swing.table.DefaultTableModel(
1066:                                new Object[][] {
1067:
1068:                                }, new String[] { "Row group" }) {
1069:                            boolean[] canEdit = new boolean[] { false };
1070:
1071:                            public boolean isCellEditable(int rowIndex,
1072:                                    int columnIndex) {
1073:                                return canEdit[columnIndex];
1074:                            }
1075:                        });
1076:                jTableRowGroups
1077:                        .addMouseListener(new java.awt.event.MouseAdapter() {
1078:                            public void mouseClicked(
1079:                                    java.awt.event.MouseEvent evt) {
1080:                                jTableRowGroupsMouseClicked(evt);
1081:                            }
1082:                        });
1083:                jScrollPane4.setViewportView(jTableRowGroups);
1084:
1085:                gridBagConstraints = new java.awt.GridBagConstraints();
1086:                gridBagConstraints.gridx = 0;
1087:                gridBagConstraints.gridy = 7;
1088:                gridBagConstraints.gridwidth = 3;
1089:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1090:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1091:                gridBagConstraints.weightx = 1.0;
1092:                gridBagConstraints.weighty = 1.0;
1093:                gridBagConstraints.insets = new java.awt.Insets(2, 6, 0, 6);
1094:                jPanel18.add(jScrollPane4, gridBagConstraints);
1095:
1096:                jPanel15.setLayout(new java.awt.GridBagLayout());
1097:
1098:                jButtonAddRowGroup.setText("Add");
1099:                jButtonAddRowGroup
1100:                        .addActionListener(new java.awt.event.ActionListener() {
1101:                            public void actionPerformed(
1102:                                    java.awt.event.ActionEvent evt) {
1103:                                jButtonAddRowGroupActionPerformed(evt);
1104:                            }
1105:                        });
1106:                gridBagConstraints = new java.awt.GridBagConstraints();
1107:                gridBagConstraints.gridx = 0;
1108:                gridBagConstraints.gridy = 0;
1109:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1110:                gridBagConstraints.insets = new java.awt.Insets(4, 0, 6, 0);
1111:                jPanel15.add(jButtonAddRowGroup, gridBagConstraints);
1112:
1113:                jButtonModRowGroup.setText("Modify");
1114:                jButtonModRowGroup.setEnabled(false);
1115:                jButtonModRowGroup
1116:                        .addActionListener(new java.awt.event.ActionListener() {
1117:                            public void actionPerformed(
1118:                                    java.awt.event.ActionEvent evt) {
1119:                                jButtonModRowGroupActionPerformed(evt);
1120:                            }
1121:                        });
1122:                gridBagConstraints = new java.awt.GridBagConstraints();
1123:                gridBagConstraints.gridx = 1;
1124:                gridBagConstraints.gridy = 0;
1125:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1126:                gridBagConstraints.insets = new java.awt.Insets(4, 6, 6, 0);
1127:                jPanel15.add(jButtonModRowGroup, gridBagConstraints);
1128:
1129:                jButtonRemRowGroup.setText("Remove");
1130:                jButtonRemRowGroup.setEnabled(false);
1131:                jButtonRemRowGroup
1132:                        .addActionListener(new java.awt.event.ActionListener() {
1133:                            public void actionPerformed(
1134:                                    java.awt.event.ActionEvent evt) {
1135:                                jButtonRemRowGroupActionPerformed(evt);
1136:                            }
1137:                        });
1138:                gridBagConstraints = new java.awt.GridBagConstraints();
1139:                gridBagConstraints.gridx = 2;
1140:                gridBagConstraints.gridy = 0;
1141:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1142:                gridBagConstraints.insets = new java.awt.Insets(4, 6, 6, 0);
1143:                jPanel15.add(jButtonRemRowGroup, gridBagConstraints);
1144:
1145:                jButtonUpRowGroup.setText("Up");
1146:                jButtonUpRowGroup.setEnabled(false);
1147:                jButtonUpRowGroup
1148:                        .addActionListener(new java.awt.event.ActionListener() {
1149:                            public void actionPerformed(
1150:                                    java.awt.event.ActionEvent evt) {
1151:                                jButtonUpRowGroupActionPerformed(evt);
1152:                            }
1153:                        });
1154:                gridBagConstraints = new java.awt.GridBagConstraints();
1155:                gridBagConstraints.gridx = 3;
1156:                gridBagConstraints.gridy = 0;
1157:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1158:                gridBagConstraints.insets = new java.awt.Insets(4, 6, 6, 0);
1159:                jPanel15.add(jButtonUpRowGroup, gridBagConstraints);
1160:
1161:                jButtonDownRowGroup.setText("Down");
1162:                jButtonDownRowGroup.setEnabled(false);
1163:                jButtonDownRowGroup
1164:                        .addActionListener(new java.awt.event.ActionListener() {
1165:                            public void actionPerformed(
1166:                                    java.awt.event.ActionEvent evt) {
1167:                                jButtonDownRowGroupActionPerformed(evt);
1168:                            }
1169:                        });
1170:                gridBagConstraints = new java.awt.GridBagConstraints();
1171:                gridBagConstraints.gridx = 4;
1172:                gridBagConstraints.gridy = 0;
1173:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1174:                gridBagConstraints.insets = new java.awt.Insets(4, 6, 6, 0);
1175:                jPanel15.add(jButtonDownRowGroup, gridBagConstraints);
1176:                gridBagConstraints = new java.awt.GridBagConstraints();
1177:                gridBagConstraints.gridx = 99;
1178:                gridBagConstraints.weightx = 1.0;
1179:                jPanel15.add(jPanel19, gridBagConstraints);
1180:
1181:                gridBagConstraints = new java.awt.GridBagConstraints();
1182:                gridBagConstraints.gridy = 9;
1183:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1184:                gridBagConstraints.weightx = 1.0;
1185:                gridBagConstraints.insets = new java.awt.Insets(0, 6, 0, 6);
1186:                jPanel18.add(jPanel15, gridBagConstraints);
1187:
1188:                gridBagConstraints = new java.awt.GridBagConstraints();
1189:                gridBagConstraints.gridy = 2;
1190:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1191:                gridBagConstraints.weightx = 1.0;
1192:                gridBagConstraints.weighty = 0.5;
1193:                jPanel9.add(jPanel18, gridBagConstraints);
1194:
1195:                jPanel20.setLayout(new java.awt.GridBagLayout());
1196:
1197:                jScrollPane5.setMinimumSize(new java.awt.Dimension(300, 50));
1198:                jScrollPane5.setPreferredSize(new java.awt.Dimension(300, 50));
1199:
1200:                jTableColumnGroups
1201:                        .setModel(new javax.swing.table.DefaultTableModel(
1202:                                new Object[][] {
1203:
1204:                                }, new String[] { "Column group" }) {
1205:                            boolean[] canEdit = new boolean[] { false };
1206:
1207:                            public boolean isCellEditable(int rowIndex,
1208:                                    int columnIndex) {
1209:                                return canEdit[columnIndex];
1210:                            }
1211:                        });
1212:                jTableColumnGroups
1213:                        .addMouseListener(new java.awt.event.MouseAdapter() {
1214:                            public void mouseClicked(
1215:                                    java.awt.event.MouseEvent evt) {
1216:                                jTableColumnGroupsMouseClicked(evt);
1217:                            }
1218:                        });
1219:                jScrollPane5.setViewportView(jTableColumnGroups);
1220:
1221:                gridBagConstraints = new java.awt.GridBagConstraints();
1222:                gridBagConstraints.gridx = 0;
1223:                gridBagConstraints.gridy = 7;
1224:                gridBagConstraints.gridwidth = 3;
1225:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1226:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1227:                gridBagConstraints.weightx = 1.0;
1228:                gridBagConstraints.weighty = 1.0;
1229:                gridBagConstraints.insets = new java.awt.Insets(2, 6, 0, 6);
1230:                jPanel20.add(jScrollPane5, gridBagConstraints);
1231:
1232:                jPanel21.setLayout(new java.awt.GridBagLayout());
1233:
1234:                jButtonAddColumnGroup.setText("Add");
1235:                jButtonAddColumnGroup
1236:                        .addActionListener(new java.awt.event.ActionListener() {
1237:                            public void actionPerformed(
1238:                                    java.awt.event.ActionEvent evt) {
1239:                                jButtonAddColumnGroupActionPerformed(evt);
1240:                            }
1241:                        });
1242:                gridBagConstraints = new java.awt.GridBagConstraints();
1243:                gridBagConstraints.gridx = 0;
1244:                gridBagConstraints.gridy = 0;
1245:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1246:                gridBagConstraints.insets = new java.awt.Insets(4, 0, 6, 0);
1247:                jPanel21.add(jButtonAddColumnGroup, gridBagConstraints);
1248:
1249:                jButtonModColumnGroup.setText("Modify");
1250:                jButtonModColumnGroup.setEnabled(false);
1251:                jButtonModColumnGroup
1252:                        .addActionListener(new java.awt.event.ActionListener() {
1253:                            public void actionPerformed(
1254:                                    java.awt.event.ActionEvent evt) {
1255:                                jButtonModColumnGroupActionPerformed(evt);
1256:                            }
1257:                        });
1258:                gridBagConstraints = new java.awt.GridBagConstraints();
1259:                gridBagConstraints.gridx = 1;
1260:                gridBagConstraints.gridy = 0;
1261:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1262:                gridBagConstraints.insets = new java.awt.Insets(4, 6, 6, 0);
1263:                jPanel21.add(jButtonModColumnGroup, gridBagConstraints);
1264:
1265:                jButtonRemColumnGroup.setText("Remove");
1266:                jButtonRemColumnGroup.setEnabled(false);
1267:                jButtonRemColumnGroup
1268:                        .addActionListener(new java.awt.event.ActionListener() {
1269:                            public void actionPerformed(
1270:                                    java.awt.event.ActionEvent evt) {
1271:                                jButtonRemColumnGroupActionPerformed(evt);
1272:                            }
1273:                        });
1274:                gridBagConstraints = new java.awt.GridBagConstraints();
1275:                gridBagConstraints.gridx = 2;
1276:                gridBagConstraints.gridy = 0;
1277:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1278:                gridBagConstraints.insets = new java.awt.Insets(4, 6, 6, 0);
1279:                jPanel21.add(jButtonRemColumnGroup, gridBagConstraints);
1280:
1281:                jButtonUpColumnGroup.setText("Up");
1282:                jButtonUpColumnGroup.setEnabled(false);
1283:                jButtonUpColumnGroup
1284:                        .addActionListener(new java.awt.event.ActionListener() {
1285:                            public void actionPerformed(
1286:                                    java.awt.event.ActionEvent evt) {
1287:                                jButtonUpColumnGroupActionPerformed(evt);
1288:                            }
1289:                        });
1290:                gridBagConstraints = new java.awt.GridBagConstraints();
1291:                gridBagConstraints.gridx = 3;
1292:                gridBagConstraints.gridy = 0;
1293:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1294:                gridBagConstraints.insets = new java.awt.Insets(4, 6, 6, 0);
1295:                jPanel21.add(jButtonUpColumnGroup, gridBagConstraints);
1296:
1297:                jButtonDownColumnGroup.setText("Down");
1298:                jButtonDownColumnGroup.setEnabled(false);
1299:                jButtonDownColumnGroup
1300:                        .addActionListener(new java.awt.event.ActionListener() {
1301:                            public void actionPerformed(
1302:                                    java.awt.event.ActionEvent evt) {
1303:                                jButtonDownColumnGroupActionPerformed(evt);
1304:                            }
1305:                        });
1306:                gridBagConstraints = new java.awt.GridBagConstraints();
1307:                gridBagConstraints.gridx = 4;
1308:                gridBagConstraints.gridy = 0;
1309:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1310:                gridBagConstraints.insets = new java.awt.Insets(4, 6, 6, 0);
1311:                jPanel21.add(jButtonDownColumnGroup, gridBagConstraints);
1312:                gridBagConstraints = new java.awt.GridBagConstraints();
1313:                gridBagConstraints.gridx = 99;
1314:                gridBagConstraints.weightx = 1.0;
1315:                jPanel21.add(jPanel22, gridBagConstraints);
1316:
1317:                gridBagConstraints = new java.awt.GridBagConstraints();
1318:                gridBagConstraints.gridy = 9;
1319:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1320:                gridBagConstraints.weightx = 1.0;
1321:                gridBagConstraints.insets = new java.awt.Insets(0, 6, 0, 6);
1322:                jPanel20.add(jPanel21, gridBagConstraints);
1323:
1324:                gridBagConstraints = new java.awt.GridBagConstraints();
1325:                gridBagConstraints.gridy = 4;
1326:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1327:                gridBagConstraints.weightx = 1.0;
1328:                gridBagConstraints.weighty = 0.5;
1329:                jPanel9.add(jPanel20, gridBagConstraints);
1330:
1331:                jLabel2.setText("Column groups");
1332:                gridBagConstraints = new java.awt.GridBagConstraints();
1333:                gridBagConstraints.gridy = 3;
1334:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1335:                gridBagConstraints.weightx = 1.0;
1336:                gridBagConstraints.insets = new java.awt.Insets(4, 6, 0, 6);
1337:                jPanel9.add(jLabel2, gridBagConstraints);
1338:
1339:                jTabbedPane1.addTab("Row and column groups", jPanel9);
1340:
1341:                jPanel11.setLayout(new java.awt.GridBagLayout());
1342:
1343:                jPanel17.setLayout(new java.awt.GridBagLayout());
1344:
1345:                jScrollPane3.setMinimumSize(new java.awt.Dimension(300, 50));
1346:                jScrollPane3.setPreferredSize(new java.awt.Dimension(300, 50));
1347:
1348:                jTableMeasures
1349:                        .setModel(new javax.swing.table.DefaultTableModel(
1350:                                new Object[][] {
1351:
1352:                                }, new String[] { "Measure", "Class" }) {
1353:                            boolean[] canEdit = new boolean[] { false, false };
1354:
1355:                            public boolean isCellEditable(int rowIndex,
1356:                                    int columnIndex) {
1357:                                return canEdit[columnIndex];
1358:                            }
1359:                        });
1360:                jTableMeasures
1361:                        .addMouseListener(new java.awt.event.MouseAdapter() {
1362:                            public void mouseClicked(
1363:                                    java.awt.event.MouseEvent evt) {
1364:                                jTableMeasuresMouseClicked(evt);
1365:                            }
1366:                        });
1367:                jScrollPane3.setViewportView(jTableMeasures);
1368:
1369:                gridBagConstraints = new java.awt.GridBagConstraints();
1370:                gridBagConstraints.gridx = 0;
1371:                gridBagConstraints.gridy = 7;
1372:                gridBagConstraints.gridwidth = 3;
1373:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1374:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1375:                gridBagConstraints.weightx = 1.0;
1376:                gridBagConstraints.weighty = 1.0;
1377:                gridBagConstraints.insets = new java.awt.Insets(2, 6, 0, 6);
1378:                jPanel17.add(jScrollPane3, gridBagConstraints);
1379:
1380:                jPanel12.setLayout(new java.awt.GridBagLayout());
1381:
1382:                jButtonAddMeasure.setText("Add");
1383:                jButtonAddMeasure
1384:                        .addActionListener(new java.awt.event.ActionListener() {
1385:                            public void actionPerformed(
1386:                                    java.awt.event.ActionEvent evt) {
1387:                                jButtonAddMeasureActionPerformed(evt);
1388:                            }
1389:                        });
1390:                gridBagConstraints = new java.awt.GridBagConstraints();
1391:                gridBagConstraints.gridx = 0;
1392:                gridBagConstraints.gridy = 0;
1393:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1394:                gridBagConstraints.insets = new java.awt.Insets(4, 0, 6, 0);
1395:                jPanel12.add(jButtonAddMeasure, gridBagConstraints);
1396:
1397:                jButtonModMeasure.setText("Modify");
1398:                jButtonModMeasure.setEnabled(false);
1399:                jButtonModMeasure
1400:                        .addActionListener(new java.awt.event.ActionListener() {
1401:                            public void actionPerformed(
1402:                                    java.awt.event.ActionEvent evt) {
1403:                                jButtonModMeasureActionPerformed(evt);
1404:                            }
1405:                        });
1406:                gridBagConstraints = new java.awt.GridBagConstraints();
1407:                gridBagConstraints.gridx = 1;
1408:                gridBagConstraints.gridy = 0;
1409:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1410:                gridBagConstraints.insets = new java.awt.Insets(4, 6, 6, 0);
1411:                jPanel12.add(jButtonModMeasure, gridBagConstraints);
1412:
1413:                jButtonRemMeasure.setText("Remove");
1414:                jButtonRemMeasure.setEnabled(false);
1415:                jButtonRemMeasure
1416:                        .addActionListener(new java.awt.event.ActionListener() {
1417:                            public void actionPerformed(
1418:                                    java.awt.event.ActionEvent evt) {
1419:                                jButtonRemMeasureActionPerformed(evt);
1420:                            }
1421:                        });
1422:                gridBagConstraints = new java.awt.GridBagConstraints();
1423:                gridBagConstraints.gridx = 2;
1424:                gridBagConstraints.gridy = 0;
1425:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1426:                gridBagConstraints.insets = new java.awt.Insets(4, 6, 6, 0);
1427:                jPanel12.add(jButtonRemMeasure, gridBagConstraints);
1428:                gridBagConstraints = new java.awt.GridBagConstraints();
1429:                gridBagConstraints.gridx = 4;
1430:                gridBagConstraints.weightx = 1.0;
1431:                jPanel12.add(jPanel14, gridBagConstraints);
1432:
1433:                gridBagConstraints = new java.awt.GridBagConstraints();
1434:                gridBagConstraints.gridy = 9;
1435:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1436:                gridBagConstraints.weightx = 1.0;
1437:                gridBagConstraints.insets = new java.awt.Insets(0, 6, 0, 6);
1438:                jPanel17.add(jPanel12, gridBagConstraints);
1439:
1440:                gridBagConstraints = new java.awt.GridBagConstraints();
1441:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1442:                gridBagConstraints.weightx = 1.0;
1443:                gridBagConstraints.weighty = 1.0;
1444:                jPanel11.add(jPanel17, gridBagConstraints);
1445:
1446:                jTabbedPane1.addTab("Measures", jPanel11);
1447:
1448:                gridBagConstraints = new java.awt.GridBagConstraints();
1449:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1450:                gridBagConstraints.weightx = 1.0;
1451:                gridBagConstraints.weighty = 1.0;
1452:                getContentPane().add(jTabbedPane1, gridBagConstraints);
1453:
1454:                pack();
1455:            }// </editor-fold>//GEN-END:initComponents
1456:
1457:            private void jComboBoxrunDirectionActionPerformed(
1458:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxrunDirectionActionPerformed
1459:                if (isInit() || currentCrosstabReportElement == null)
1460:                    return;
1461:
1462:                currentCrosstabReportElement
1463:                        .setRunDirection(((Tag) jComboBoxrunDirection
1464:                                .getSelectedItem()).getValue()
1465:                                + "");
1466:                notifyChange();
1467:            }//GEN-LAST:event_jComboBoxrunDirectionActionPerformed
1468:
1469:            private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
1470:
1471:                openExtraWindows();
1472:
1473:            }//GEN-LAST:event_formWindowOpened
1474:
1475:            private void jButtonDownColumnGroupActionPerformed(
1476:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDownColumnGroupActionPerformed
1477:
1478:                if (this .isInit())
1479:                    return;
1480:
1481:                if (currentCrosstabReportElement == null)
1482:                    return;
1483:                javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableColumnGroups
1484:                        .getModel();
1485:
1486:                int index = jTableColumnGroups.getSelectedRow();
1487:
1488:                if (index < currentCrosstabReportElement.getColumnGroups()
1489:                        .size() - 1) {
1490:                    CrosstabColumnGroup group = (CrosstabColumnGroup) currentCrosstabReportElement
1491:                            .getColumnGroups().elementAt(index);
1492:                    currentCrosstabReportElement.getColumnGroups()
1493:                            .removeElementAt(index);
1494:                    currentCrosstabReportElement.getColumnGroups()
1495:                            .insertElementAt(group, index + 1);
1496:
1497:                    dtm.removeRow(index);
1498:                    dtm.insertRow(index + 1, new Object[] { group });
1499:                    currentCrosstabReportElement.modifyGroup(group.getName(),
1500:                            group);
1501:                }
1502:
1503:            }//GEN-LAST:event_jButtonDownColumnGroupActionPerformed
1504:
1505:            private void jButtonUpColumnGroupActionPerformed(
1506:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonUpColumnGroupActionPerformed
1507:
1508:                if (this .isInit())
1509:                    return;
1510:
1511:                if (currentCrosstabReportElement == null)
1512:                    return;
1513:                javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableColumnGroups
1514:                        .getModel();
1515:
1516:                int index = jTableColumnGroups.getSelectedRow();
1517:
1518:                if (index > 0) {
1519:                    CrosstabColumnGroup group = (CrosstabColumnGroup) currentCrosstabReportElement
1520:                            .getColumnGroups().elementAt(index);
1521:                    currentCrosstabReportElement.getColumnGroups()
1522:                            .removeElementAt(index);
1523:                    currentCrosstabReportElement.getColumnGroups()
1524:                            .insertElementAt(group, index - 1);
1525:
1526:                    dtm.removeRow(index);
1527:                    dtm.insertRow(index - 1, new Object[] { group });
1528:                    currentCrosstabReportElement.modifyGroup(group.getName(),
1529:                            group);
1530:                }
1531:            }//GEN-LAST:event_jButtonUpColumnGroupActionPerformed
1532:
1533:            private void jButtonDownRowGroupActionPerformed(
1534:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonDownRowGroupActionPerformed
1535:                if (this .isInit())
1536:                    return;
1537:
1538:                if (currentCrosstabReportElement == null)
1539:                    return;
1540:                javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableRowGroups
1541:                        .getModel();
1542:
1543:                int index = jTableRowGroups.getSelectedRow();
1544:
1545:                if (index < currentCrosstabReportElement.getRowGroups().size() - 1) {
1546:                    CrosstabRowGroup group = (CrosstabRowGroup) currentCrosstabReportElement
1547:                            .getRowGroups().elementAt(index);
1548:                    currentCrosstabReportElement.getRowGroups()
1549:                            .removeElementAt(index);
1550:                    currentCrosstabReportElement.getRowGroups()
1551:                            .insertElementAt(group, index + 1);
1552:
1553:                    dtm.removeRow(index);
1554:                    dtm.insertRow(index + 1, new Object[] { group });
1555:                    currentCrosstabReportElement.modifyGroup(group.getName(),
1556:                            group);
1557:                }
1558:            }//GEN-LAST:event_jButtonDownRowGroupActionPerformed
1559:
1560:            private void jButtonUpRowGroupActionPerformed(
1561:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonUpRowGroupActionPerformed
1562:
1563:                if (this .isInit())
1564:                    return;
1565:
1566:                if (currentCrosstabReportElement == null)
1567:                    return;
1568:                javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableRowGroups
1569:                        .getModel();
1570:
1571:                int index = jTableRowGroups.getSelectedRow();
1572:
1573:                if (index > 0) {
1574:                    CrosstabRowGroup group = (CrosstabRowGroup) currentCrosstabReportElement
1575:                            .getRowGroups().elementAt(index);
1576:                    currentCrosstabReportElement.getRowGroups()
1577:                            .removeElementAt(index);
1578:                    currentCrosstabReportElement.getRowGroups()
1579:                            .insertElementAt(group, index - 1);
1580:
1581:                    dtm.removeRow(index);
1582:                    dtm.insertRow(index - 1, new Object[] { group });
1583:                    currentCrosstabReportElement.modifyGroup(group.getName(),
1584:                            group);
1585:                }
1586:
1587:            }//GEN-LAST:event_jButtonUpRowGroupActionPerformed
1588:
1589:            private void jButtonRemColumnGroupActionPerformed(
1590:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRemColumnGroupActionPerformed
1591:                if (this .isInit())
1592:                    return;
1593:
1594:                if (currentCrosstabReportElement == null)
1595:                    return;
1596:                javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableColumnGroups
1597:                        .getModel();
1598:
1599:                Vector groupsToRemove = new Vector();
1600:                while (jTableColumnGroups.getSelectedRowCount() > 0) {
1601:                    int i = jTableColumnGroups.getSelectedRow();
1602:                    groupsToRemove.add(jTableColumnGroups.getValueAt(i, 0));
1603:                    dtm.removeRow(i);
1604:                }
1605:                currentCrosstabReportElement.removeGroups(groupsToRemove);
1606:            }//GEN-LAST:event_jButtonRemColumnGroupActionPerformed
1607:
1608:            private void jButtonModColumnGroupActionPerformed(
1609:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonModColumnGroupActionPerformed
1610:                if (this .isInit())
1611:                    return;
1612:
1613:                if (currentCrosstabReportElement == null)
1614:                    return;
1615:                int rowNumber = jTableColumnGroups.getSelectedRow();
1616:                CrosstabColumnGroup rg = (CrosstabColumnGroup) jTableColumnGroups
1617:                        .getValueAt(jTableColumnGroups.getSelectedRow(), 0);
1618:
1619:                CrosstabGroupDialog jrpd = new CrosstabGroupDialog(
1620:                        CrosstabGroupDialog.COLUMNGROUP, this , true);
1621:                jrpd.setGroup(rg);
1622:                jrpd
1623:                        .setExpressionContext(((this 
1624:                                .getCurrentCrosstabReportElement()
1625:                                .isUseDataset() && this 
1626:                                .getCurrentCrosstabReportElement().getDataset() != null) ? this 
1627:                                .getCurrentCrosstabReportElement().getDataset()
1628:                                .getSubDataset()
1629:                                : null));
1630:                if (evt != null && evt.getID() > 0) {
1631:                    jrpd.setFocusedExpression(evt.getID());
1632:                }
1633:                jrpd.setVisible(true);
1634:
1635:                if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) {
1636:
1637:                    CrosstabGroup group = jrpd.getGroup();
1638:                    String oldName = rg.getName();
1639:                    rg.setName(group.getName());
1640:                    rg.setBucketComparatorExpression(group
1641:                            .getBucketComparatorExpression());
1642:                    rg.setBucketExpression(group.getBucketExpression());
1643:                    rg.setBucketExpressionClass(group
1644:                            .getBucketExpressionClass());
1645:                    rg.setBucketOrder(group.getBucketOrder());
1646:                    rg.setHeaderPosition(group.getHeaderPosition());
1647:                    rg.setTotalPosition(group.getTotalPosition());
1648:                    rg.setName(group.getName());
1649:                    rg.setSize(group.getSize());
1650:                    rg.setHasHeader(group.isHasHeader());
1651:                    rg.setHasTotal(group.isHasTotal());
1652:
1653:                    javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableColumnGroups
1654:                            .getModel();
1655:                    dtm.setValueAt(rg, rowNumber, 0);
1656:                    jTableColumnGroups.updateUI();
1657:                    currentCrosstabReportElement.modifyGroup(oldName, rg);
1658:                }
1659:            }//GEN-LAST:event_jButtonModColumnGroupActionPerformed
1660:
1661:            private void jButtonAddColumnGroupActionPerformed(
1662:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddColumnGroupActionPerformed
1663:                if (this .isInit())
1664:                    return;
1665:
1666:                if (currentCrosstabReportElement == null)
1667:                    return;
1668:                // Set the new value for all selected elements...
1669:
1670:                CrosstabGroupDialog jrpd = new CrosstabGroupDialog(
1671:                        CrosstabGroupDialog.COLUMNGROUP, this , true);
1672:                jrpd
1673:                        .setExpressionContext(((this 
1674:                                .getCurrentCrosstabReportElement()
1675:                                .isUseDataset() && this 
1676:                                .getCurrentCrosstabReportElement().getDataset() != null) ? this 
1677:                                .getCurrentCrosstabReportElement().getDataset()
1678:                                .getSubDataset()
1679:                                : null));
1680:                jrpd.setVisible(true);
1681:
1682:                if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) {
1683:                    CrosstabGroup group = jrpd.getGroup();
1684:                    CrosstabColumnGroup rg = new CrosstabColumnGroup();
1685:
1686:                    rg.setName(group.getName());
1687:                    rg.setBucketComparatorExpression(group
1688:                            .getBucketComparatorExpression());
1689:                    rg.setBucketExpression(group.getBucketExpression());
1690:                    rg.setBucketExpressionClass(group
1691:                            .getBucketExpressionClass());
1692:                    rg.setBucketOrder(group.getBucketOrder());
1693:                    rg.setHeaderPosition(group.getHeaderPosition());
1694:                    rg.setTotalPosition(group.getTotalPosition());
1695:                    rg.setName(group.getName());
1696:                    rg.setSize(group.getSize());
1697:                    rg.setHasHeader(group.isHasHeader());
1698:                    rg.setHasTotal(group.isHasTotal());
1699:
1700:                    javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableColumnGroups
1701:                            .getModel();
1702:                    dtm.addRow(new Object[] { rg });
1703:                    currentCrosstabReportElement.addGroup(rg);
1704:                }
1705:            }//GEN-LAST:event_jButtonAddColumnGroupActionPerformed
1706:
1707:            private void jTableColumnGroupsMouseClicked(
1708:                    java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableColumnGroupsMouseClicked
1709:                if (evt.getClickCount() == 2 && evt.getButton() == evt.BUTTON1) {
1710:                    if (jTableColumnGroups.getSelectedRowCount() > 0) {
1711:                        jButtonModColumnGroupActionPerformed(null);
1712:                    }
1713:                }
1714:            }//GEN-LAST:event_jTableColumnGroupsMouseClicked
1715:
1716:            private void jTableRowGroupsMouseClicked(
1717:                    java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableRowGroupsMouseClicked
1718:                if (evt.getClickCount() == 2 && evt.getButton() == evt.BUTTON1) {
1719:                    if (jTableRowGroups.getSelectedRowCount() > 0) {
1720:                        jButtonModRowGroupActionPerformed(null);
1721:                    }
1722:                }
1723:            }//GEN-LAST:event_jTableRowGroupsMouseClicked
1724:
1725:            private void jButtonRemRowGroupActionPerformed(
1726:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRemRowGroupActionPerformed
1727:                if (this .isInit())
1728:                    return;
1729:
1730:                if (currentCrosstabReportElement == null)
1731:                    return;
1732:                javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableRowGroups
1733:                        .getModel();
1734:
1735:                ArrayList groupsToRemove = new ArrayList();
1736:
1737:                while (jTableRowGroups.getSelectedRowCount() > 0) {
1738:                    int i = jTableRowGroups.getSelectedRow();
1739:                    groupsToRemove.add(jTableRowGroups.getValueAt(i, 0));
1740:                    dtm.removeRow(i);
1741:                }
1742:                currentCrosstabReportElement.removeGroups(groupsToRemove);
1743:
1744:            }//GEN-LAST:event_jButtonRemRowGroupActionPerformed
1745:
1746:            private void jButtonModRowGroupActionPerformed(
1747:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonModRowGroupActionPerformed
1748:                if (this .isInit())
1749:                    return;
1750:
1751:                if (currentCrosstabReportElement == null)
1752:                    return;
1753:                int rowNumber = jTableRowGroups.getSelectedRow();
1754:                CrosstabRowGroup rg = (CrosstabRowGroup) jTableRowGroups
1755:                        .getValueAt(jTableRowGroups.getSelectedRow(), 0);
1756:
1757:                CrosstabGroupDialog jrpd = new CrosstabGroupDialog(
1758:                        CrosstabGroupDialog.ROWGROUP, this , true);
1759:                jrpd
1760:                        .setExpressionContext(((this 
1761:                                .getCurrentCrosstabReportElement()
1762:                                .isUseDataset() && this 
1763:                                .getCurrentCrosstabReportElement().getDataset() != null) ? this 
1764:                                .getCurrentCrosstabReportElement().getDataset()
1765:                                .getSubDataset()
1766:                                : null));
1767:                jrpd.setGroup(rg);
1768:                if (evt != null && evt.getID() > 0) {
1769:                    jrpd.setFocusedExpression(evt.getID());
1770:                }
1771:                jrpd.setVisible(true);
1772:
1773:                if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) {
1774:
1775:                    CrosstabGroup group = jrpd.getGroup();
1776:                    String oldName = rg.getName();
1777:                    rg.setName(group.getName());
1778:                    rg.setBucketComparatorExpression(group
1779:                            .getBucketComparatorExpression());
1780:                    rg.setBucketExpression(group.getBucketExpression());
1781:                    rg.setBucketExpressionClass(group
1782:                            .getBucketExpressionClass());
1783:                    rg.setBucketOrder(group.getBucketOrder());
1784:                    rg.setHeaderPosition(group.getHeaderPosition());
1785:                    rg.setTotalPosition(group.getTotalPosition());
1786:                    rg.setName(group.getName());
1787:                    rg.setSize(group.getSize());
1788:                    rg.setHasHeader(group.isHasHeader());
1789:                    rg.setHasTotal(group.isHasTotal());
1790:
1791:                    javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableRowGroups
1792:                            .getModel();
1793:                    dtm.setValueAt(rg, rowNumber, 0);
1794:                    jTableRowGroups.updateUI();
1795:                    currentCrosstabReportElement.modifyGroup(oldName, rg);
1796:                }
1797:            }//GEN-LAST:event_jButtonModRowGroupActionPerformed
1798:
1799:            private void jButtonAddRowGroupActionPerformed(
1800:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddRowGroupActionPerformed
1801:                if (this .isInit())
1802:                    return;
1803:
1804:                if (currentCrosstabReportElement == null)
1805:                    return;
1806:                // Set the new value for all selected elements...
1807:
1808:                CrosstabGroupDialog jrpd = new CrosstabGroupDialog(
1809:                        CrosstabGroupDialog.ROWGROUP, this , true);
1810:                jrpd
1811:                        .setExpressionContext(((this 
1812:                                .getCurrentCrosstabReportElement()
1813:                                .isUseDataset() && this 
1814:                                .getCurrentCrosstabReportElement().getDataset() != null) ? this 
1815:                                .getCurrentCrosstabReportElement().getDataset()
1816:                                .getSubDataset()
1817:                                : null));
1818:                jrpd.setVisible(true);
1819:
1820:                if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) {
1821:                    CrosstabGroup group = jrpd.getGroup();
1822:                    CrosstabRowGroup rg = new CrosstabRowGroup();
1823:
1824:                    rg.setName(group.getName());
1825:                    rg.setBucketComparatorExpression(group
1826:                            .getBucketComparatorExpression());
1827:                    rg.setBucketExpression(group.getBucketExpression());
1828:                    rg.setBucketExpressionClass(group
1829:                            .getBucketExpressionClass());
1830:                    rg.setBucketOrder(group.getBucketOrder());
1831:                    rg.setHeaderPosition(group.getHeaderPosition());
1832:                    rg.setTotalPosition(group.getTotalPosition());
1833:                    rg.setName(group.getName());
1834:                    rg.setSize(group.getSize());
1835:                    rg.setHasHeader(group.isHasHeader());
1836:                    rg.setHasTotal(group.isHasTotal());
1837:
1838:                    javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableRowGroups
1839:                            .getModel();
1840:                    dtm.addRow(new Object[] { rg });
1841:                    currentCrosstabReportElement.addGroup(rg);
1842:                }
1843:            }//GEN-LAST:event_jButtonAddRowGroupActionPerformed
1844:
1845:            private void jTableMeasuresMouseClicked(
1846:                    java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableMeasuresMouseClicked
1847:                if (evt.getClickCount() == 2 && evt.getButton() == evt.BUTTON1) {
1848:                    if (jTableMeasures.getSelectedRowCount() > 0) {
1849:                        jButtonModMeasureActionPerformed(null);
1850:                    }
1851:                }
1852:            }//GEN-LAST:event_jTableMeasuresMouseClicked
1853:
1854:            private void jButtonRemMeasureActionPerformed(
1855:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRemMeasureActionPerformed
1856:                if (this .isInit())
1857:                    return;
1858:
1859:                if (currentCrosstabReportElement == null)
1860:                    return;
1861:                javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableMeasures
1862:                        .getModel();
1863:
1864:                while (jTableMeasures.getSelectedRowCount() > 0) {
1865:                    int i = jTableMeasures.getSelectedRow();
1866:
1867:                    currentCrosstabReportElement
1868:                            .removeMeasure((Measure) jTableMeasures.getValueAt(
1869:                                    i, 0));
1870:                    dtm.removeRow(i);
1871:                }
1872:            }//GEN-LAST:event_jButtonRemMeasureActionPerformed
1873:
1874:            private void jButtonModMeasureActionPerformed(
1875:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonModMeasureActionPerformed
1876:                if (this .isInit())
1877:                    return;
1878:
1879:                if (currentCrosstabReportElement == null)
1880:                    return;
1881:                int rowNumber = jTableMeasures.getSelectedRow();
1882:                Measure measure = (Measure) jTableMeasures.getValueAt(
1883:                        jTableMeasures.getSelectedRow(), 0);
1884:
1885:                MeasureDialog jrpd = new MeasureDialog(null, this , true);
1886:                jrpd
1887:                        .setExpressionContext(((this 
1888:                                .getCurrentCrosstabReportElement()
1889:                                .isUseDataset() && this 
1890:                                .getCurrentCrosstabReportElement().getDataset() != null) ? this 
1891:                                .getCurrentCrosstabReportElement().getDataset()
1892:                                .getSubDataset()
1893:                                : null));
1894:                jrpd.setMeasure(measure);
1895:                if (evt != null && evt.getID() > 0) {
1896:                    jrpd.setFocusedExpression(evt.getID());
1897:                }
1898:                jrpd.setVisible(true);
1899:
1900:                if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) {
1901:                    measure.setName(jrpd.getMeasure().getName());
1902:                    measure.setExpression(jrpd.getMeasure().getExpression());
1903:                    measure.setClassType(jrpd.getMeasure().getClassType());
1904:                    measure.setCalculation(jrpd.getMeasure().getCalculation());
1905:                    measure.setIncrementerFactoryClass(jrpd.getMeasure()
1906:                            .getIncrementerFactoryClass());
1907:                    measure.setPercentageCalculatorClass(jrpd.getMeasure()
1908:                            .getPercentageCalculatorClass());
1909:                    measure
1910:                            .setPercentageOf(jrpd.getMeasure()
1911:                                    .getPercentageOf());
1912:
1913:                    currentCrosstabReportElement.measureModified(measure);
1914:
1915:                    javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableMeasures
1916:                            .getModel();
1917:                    dtm.setValueAt(measure, rowNumber, 0);
1918:                    dtm.setValueAt(measure.getExpression(), rowNumber, 1);
1919:                    jTableMeasures.updateUI();
1920:                }
1921:            }//GEN-LAST:event_jButtonModMeasureActionPerformed
1922:
1923:            private void jButtonAddMeasureActionPerformed(
1924:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddMeasureActionPerformed
1925:                if (this .isInit())
1926:                    return;
1927:
1928:                if (currentCrosstabReportElement == null)
1929:                    return;
1930:                // Set the new value for all selected elements...
1931:
1932:                MeasureDialog jrpd = new MeasureDialog(null, this , true);
1933:                jrpd
1934:                        .setExpressionContext(((this 
1935:                                .getCurrentCrosstabReportElement()
1936:                                .isUseDataset() && this 
1937:                                .getCurrentCrosstabReportElement().getDataset() != null) ? this 
1938:                                .getCurrentCrosstabReportElement().getDataset()
1939:                                .getSubDataset()
1940:                                : null));
1941:                jrpd.setVisible(true);
1942:
1943:                if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) {
1944:                    Measure measure = jrpd.getMeasure();
1945:                    currentCrosstabReportElement.addMeasure(measure);
1946:                    javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableMeasures
1947:                            .getModel();
1948:                    dtm
1949:                            .addRow(new Object[] { measure,
1950:                                    measure.getClassType() });
1951:                }
1952:            }//GEN-LAST:event_jButtonAddMeasureActionPerformed
1953:
1954:            private void jButtonPasteActionPerformed(
1955:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonPasteActionPerformed
1956:
1957:                if (currentCrosstabReportElement == null)
1958:                    return;
1959:                if (it.businesslogic.ireport.gui.MainFrame.getMainInstance()
1960:                        .getChartDatasetClipBoard() == null)
1961:                    return;
1962:
1963:                Dataset theDataset = it.businesslogic.ireport.gui.MainFrame
1964:                        .getMainInstance().getChartDatasetClipBoard();
1965:
1966:                currentCrosstabReportElement.getDataset().setIncrementType(
1967:                        it.businesslogic.ireport.gui.MainFrame
1968:                                .getMainInstance().getChartDatasetClipBoard()
1969:                                .getIncrementType());
1970:                currentCrosstabReportElement.getDataset().setIncrementGroup(
1971:                        it.businesslogic.ireport.gui.MainFrame
1972:                                .getMainInstance().getChartDatasetClipBoard()
1973:                                .getIncrementGroup());
1974:                currentCrosstabReportElement.getDataset().setResetType(
1975:                        it.businesslogic.ireport.gui.MainFrame
1976:                                .getMainInstance().getChartDatasetClipBoard()
1977:                                .getResetType());
1978:                currentCrosstabReportElement.getDataset().setResetGroup(
1979:                        it.businesslogic.ireport.gui.MainFrame
1980:                                .getMainInstance().getChartDatasetClipBoard()
1981:                                .getResetGroup());
1982:
1983:                currentCrosstabReportElement.getDataset().setUseConnection(
1984:                        theDataset.isUseConnection());
1985:                currentCrosstabReportElement.getDataset().setSubDataset(
1986:                        theDataset.getSubDataset());
1987:                currentCrosstabReportElement.getDataset()
1988:                        .setParametersMapExpression(
1989:                                theDataset.getParametersMapExpression());
1990:                currentCrosstabReportElement.getDataset()
1991:                        .setConnectionExpression(
1992:                                theDataset.getConnectionExpression());
1993:                currentCrosstabReportElement.getDataset()
1994:                        .setDataSourceExpression(
1995:                                theDataset.getDataSourceExpression());
1996:
1997:                for (int i = 0; i < theDataset.getSubreportParameters().size(); ++i) {
1998:                    currentCrosstabReportElement.getDataset()
1999:                            .getSubreportParameters().add(
2000:                                    ((JRSubreportParameter) theDataset
2001:                                            .getSubreportParameters()
2002:                                            .elementAt(i)).cloneMe());
2003:                }
2004:
2005:                init = true;
2006:
2007:                loadDataset();
2008:
2009:                init = false;
2010:                notifyChange();
2011:            }//GEN-LAST:event_jButtonPasteActionPerformed
2012:
2013:            private void jButtonCopyActionPerformed(
2014:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCopyActionPerformed
2015:
2016:                if (currentCrosstabReportElement == null)
2017:                    return;
2018:                it.businesslogic.ireport.gui.MainFrame.getMainInstance()
2019:                        .setChartDatasetClipBoard(
2020:                                currentCrosstabReportElement.getDataset()
2021:                                        .cloneMe());
2022:                jButtonPaste.setEnabled(true);
2023:            }//GEN-LAST:event_jButtonCopyActionPerformed
2024:
2025:            private void jComboBoxIncrementGroupActionPerformed(
2026:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxIncrementGroupActionPerformed
2027:                if (isInit() || currentCrosstabReportElement == null)
2028:                    return;
2029:                currentCrosstabReportElement.getDataset().setIncrementGroup(
2030:                        "" + jComboBoxIncrementGroup.getSelectedItem());
2031:                notifyChange();
2032:            }//GEN-LAST:event_jComboBoxIncrementGroupActionPerformed
2033:
2034:            private void jComboBoxIncrementTypeActionPerformed(
2035:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxIncrementTypeActionPerformed
2036:
2037:                if (isInit() || currentCrosstabReportElement == null)
2038:                    return;
2039:                currentCrosstabReportElement.getDataset().setIncrementType(
2040:                        ((Tag) jComboBoxIncrementType.getSelectedItem())
2041:                                .getValue()
2042:                                + "");
2043:
2044:                if (currentCrosstabReportElement.getDataset()
2045:                        .getIncrementType().equals("Group")) {
2046:                    // We have to removethe null entry...
2047:                    if (jComboBoxIncrementGroup.getItemAt(0).equals("")) {
2048:                        jComboBoxIncrementGroup.removeItemAt(0);
2049:                    }
2050:                    jComboBoxIncrementGroup.setSelectedIndex(0);
2051:                } else {
2052:                    if (!jComboBoxIncrementGroup.getItemAt(0).equals("")) {
2053:                        jComboBoxIncrementGroup.insertItemAt("", 0);
2054:                    }
2055:                    jComboBoxIncrementGroup.setSelectedIndex(0);
2056:                }
2057:                notifyChange();
2058:            }//GEN-LAST:event_jComboBoxIncrementTypeActionPerformed
2059:
2060:            private void jComboBoxResetGroupActionPerformed(
2061:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxResetGroupActionPerformed
2062:
2063:                if (isInit() || currentCrosstabReportElement == null)
2064:                    return;
2065:                currentCrosstabReportElement.getDataset().setResetGroup(
2066:                        "" + jComboBoxResetGroup.getSelectedItem());
2067:                notifyChange();
2068:            }//GEN-LAST:event_jComboBoxResetGroupActionPerformed
2069:
2070:            private void jComboBoxResetTypeActionPerformed(
2071:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxResetTypeActionPerformed
2072:                if (isInit() || currentCrosstabReportElement == null)
2073:                    return;
2074:                currentCrosstabReportElement.getDataset().setResetType(
2075:                        ((Tag) jComboBoxResetType.getSelectedItem()).getValue()
2076:                                + "");
2077:
2078:                if (currentCrosstabReportElement.getDataset().getResetType()
2079:                        .equals("Group")) {
2080:                    // We have to remove the null entry...
2081:                    if (jComboBoxResetGroup.getItemAt(0).equals("")) {
2082:                        jComboBoxResetGroup.removeItemAt(0);
2083:                    }
2084:                    jComboBoxResetGroup.setSelectedIndex(0);
2085:                } else {
2086:                    if (!jComboBoxResetGroup.getItemAt(0).equals("")) {
2087:                        jComboBoxResetGroup.insertItemAt("", 0);
2088:                    }
2089:                    jComboBoxResetGroup.setSelectedIndex(0);
2090:                }
2091:
2092:                notifyChange();
2093:            }//GEN-LAST:event_jComboBoxResetTypeActionPerformed
2094:
2095:            private void jButtonRemParameterActionPerformed(
2096:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRemParameterActionPerformed
2097:                if (this .isInit())
2098:                    return;
2099:
2100:                if (currentCrosstabReportElement == null)
2101:                    return;
2102:                javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableDatasetParameters
2103:                        .getModel();
2104:
2105:                while (jTableDatasetParameters.getSelectedRowCount() > 0) {
2106:                    int i = jTableDatasetParameters.getSelectedRow();
2107:                    currentCrosstabReportElement.getDataset()
2108:                            .getSubreportParameters().removeElement(
2109:                                    jTableDatasetParameters.getValueAt(i, 0));
2110:                    dtm.removeRow(i);
2111:                }
2112:                notifyChange();
2113:            }//GEN-LAST:event_jButtonRemParameterActionPerformed
2114:
2115:            private void jButtonModParameterActionPerformed(
2116:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonModParameterActionPerformed
2117:                if (this .isInit())
2118:                    return;
2119:
2120:                if (currentCrosstabReportElement == null)
2121:                    return;
2122:                int rowNumber = jTableDatasetParameters.getSelectedRow();
2123:                JRSubreportParameter parameter = (JRSubreportParameter) jTableDatasetParameters
2124:                        .getValueAt(jTableDatasetParameters.getSelectedRow(), 0);
2125:
2126:                JRSubreportParameterDialog jrpd = new JRSubreportParameterDialog(
2127:                        this , true);
2128:                jrpd.setParameter(parameter);
2129:                if (subdatasetParameterHighlightExpression != null) {
2130:                    jrpd
2131:                            .setFocusedExpression(((Integer) subdatasetParameterHighlightExpression[0])
2132:                                    .intValue());
2133:                }
2134:                jrpd.setVisible(true);
2135:
2136:                if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) {
2137:                    parameter.setName(jrpd.getParameter().getName());
2138:                    parameter
2139:                            .setExpression(jrpd.getParameter().getExpression());
2140:                    javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableDatasetParameters
2141:                            .getModel();
2142:                    dtm.setValueAt(parameter, rowNumber, 0);
2143:                    dtm.setValueAt(parameter.getExpression(), rowNumber, 1);
2144:                    jTableDatasetParameters.updateUI();
2145:                    notifyChange();
2146:                }
2147:            }//GEN-LAST:event_jButtonModParameterActionPerformed
2148:
2149:            private void jButtonAddParameterActionPerformed(
2150:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddParameterActionPerformed
2151:                if (this .isInit())
2152:                    return;
2153:
2154:                if (currentCrosstabReportElement == null)
2155:                    return;
2156:                // Set the new value for all selected elements...
2157:
2158:                JRSubreportParameterDialog jrpd = new JRSubreportParameterDialog(
2159:                        this , true);
2160:                jrpd.setVisible(true);
2161:
2162:                if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) {
2163:                    it.businesslogic.ireport.JRSubreportParameter parameter = jrpd
2164:                            .getParameter();
2165:                    currentCrosstabReportElement.getDataset()
2166:                            .getSubreportParameters().addElement(parameter);
2167:                    javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableDatasetParameters
2168:                            .getModel();
2169:                    dtm.addRow(new Object[] { parameter,
2170:                            parameter.getExpression() });
2171:                    notifyChange();
2172:                }
2173:            }//GEN-LAST:event_jButtonAddParameterActionPerformed
2174:
2175:            private void jTableDatasetParametersMouseClicked(
2176:                    java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableDatasetParametersMouseClicked
2177:                if (evt.getClickCount() == 2 && evt.getButton() == evt.BUTTON1) {
2178:                    if (jTableDatasetParameters.getSelectedRowCount() > 0) {
2179:                        jButtonModParameterActionPerformed(null);
2180:                    }
2181:                }
2182:            }//GEN-LAST:event_jTableDatasetParametersMouseClicked
2183:
2184:            private void jComboBoxDatasetConnectionTypeActionPerformed(
2185:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxDatasetConnectionTypeActionPerformed
2186:                if (isInit() || currentCrosstabReportElement == null)
2187:                    return;
2188:
2189:                if (jComboBoxDatasetConnectionType.getSelectedIndex() == 0) {
2190:                    currentCrosstabReportElement.getDataset().setUseConnection(
2191:                            false);
2192:                    currentCrosstabReportElement.getDataset()
2193:                            .setConnectionExpression("");
2194:                    currentCrosstabReportElement.getDataset()
2195:                            .setDataSourceExpression("");
2196:                    jRTextExpressionAreaTextConnectionExpression.setText("");
2197:                    jRTextExpressionAreaTextConnectionExpression
2198:                            .setEnabled(false);
2199:                    jRTextExpressionAreaTextConnectionExpression
2200:                            .setBackground(Color.LIGHT_GRAY);
2201:                } else if (jComboBoxDatasetConnectionType.getSelectedIndex() == 1) {
2202:                    currentCrosstabReportElement.getDataset().setUseConnection(
2203:                            true);
2204:                    currentCrosstabReportElement.getDataset()
2205:                            .setDataSourceExpression("");
2206:                    currentCrosstabReportElement.getDataset()
2207:                            .setConnectionExpression("$P{REPORT_CONNECTION}");
2208:                    jRTextExpressionAreaTextConnectionExpression
2209:                            .setText("$P{REPORT_CONNECTION}");
2210:                    jRTextExpressionAreaTextConnectionExpression
2211:                            .setEnabled(true);
2212:                    jRTextExpressionAreaTextConnectionExpression
2213:                            .setBackground(Color.WHITE);
2214:                } else if (jComboBoxDatasetConnectionType.getSelectedIndex() == 2) {
2215:                    currentCrosstabReportElement.getDataset().setUseConnection(
2216:                            false);
2217:                    currentCrosstabReportElement.getDataset()
2218:                            .setDataSourceExpression("$P{MyDataource}");
2219:                    currentCrosstabReportElement.getDataset()
2220:                            .setConnectionExpression("");
2221:                    jRTextExpressionAreaTextConnectionExpression
2222:                            .setText("$P{MyDataource}");
2223:                    jRTextExpressionAreaTextConnectionExpression
2224:                            .setEnabled(true);
2225:                    jRTextExpressionAreaTextConnectionExpression
2226:                            .setBackground(Color.WHITE);
2227:                }
2228:                notifyChange();
2229:            }//GEN-LAST:event_jComboBoxDatasetConnectionTypeActionPerformed
2230:
2231:            private void jCheckBoxPreSortedActionPerformed(
2232:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxPreSortedActionPerformed
2233:                if (this .isInit())
2234:                    return;
2235:
2236:                if (currentCrosstabReportElement != null) {
2237:                    currentCrosstabReportElement
2238:                            .setPreSorted(jCheckBoxPreSorted.isSelected());
2239:                }
2240:
2241:            }//GEN-LAST:event_jCheckBoxPreSortedActionPerformed
2242:
2243:            private void jCheckBoxUseDatasetActionPerformed(
2244:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxUseDatasetActionPerformed
2245:
2246:                if (this .isInit())
2247:                    return;
2248:
2249:                if (currentCrosstabReportElement != null) {
2250:                    currentCrosstabReportElement
2251:                            .setUseDataset(jCheckBoxUseDataset.isSelected());
2252:                }
2253:
2254:                setDatasetEnabled(currentCrosstabReportElement.isUseDataset());
2255:
2256:            }//GEN-LAST:event_jCheckBoxUseDatasetActionPerformed
2257:
2258:            private void jComboBoxSubDatasetActionPerformed(
2259:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxSubDatasetActionPerformed
2260:                if (this .isInit())
2261:                    return;
2262:
2263:                if (currentCrosstabReportElement != null) {
2264:                    if (this .jComboBoxSubDataset.getSelectedIndex() > 0) {
2265:                        if (currentCrosstabReportElement.getDataset()
2266:                                .getSubDataset() != jComboBoxSubDataset
2267:                                .getSelectedItem()) {
2268:                            currentCrosstabReportElement.getDataset()
2269:                                    .setSubDataset(
2270:                                            (SubDataset) jComboBoxSubDataset
2271:                                                    .getSelectedItem());
2272:                            jTabbedPane2.setVisible(true);
2273:                        }
2274:                        jRTextExpressionAreaFilterExpression
2275:                                .setSubDataset((SubDataset) jComboBoxSubDataset
2276:                                        .getSelectedItem());
2277:                        // Check subdataset parameters.... (TODO)
2278:                    } else {
2279:                        jRTextExpressionAreaFilterExpression
2280:                                .setSubDataset(null);
2281:                        currentCrosstabReportElement.getDataset()
2282:                                .setSubDataset(null);
2283:                        currentCrosstabReportElement.getDataset()
2284:                                .getSubreportParameters().removeAllElements();
2285:                        currentCrosstabReportElement.getDataset()
2286:                                .setParametersMapExpression("");
2287:                        currentCrosstabReportElement.getDataset()
2288:                                .setConnectionExpression("");
2289:                        currentCrosstabReportElement.getDataset()
2290:                                .setDataSourceExpression("");
2291:                        currentCrosstabReportElement.getDataset()
2292:                                .setUseConnection(false);
2293:
2294:                        javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableDatasetParameters
2295:                                .getModel();
2296:                        dtm.setRowCount(0);
2297:                        this .jComboBoxDatasetConnectionType.setSelectedIndex(0);
2298:                        this .jRTextExpressionAreaTextConnectionExpression
2299:                                .setEnabled(false);
2300:                        this .jRTextExpressionAreaTextConnectionExpression
2301:                                .setBackground(Color.LIGHT_GRAY);
2302:                        this .jRTextExpressionAreaTextConnectionExpression
2303:                                .setText("");
2304:                        jRTextExpressionAreaMapExpression.setText("");
2305:
2306:                        jTabbedPane2.setVisible(false);
2307:                        jTabbedPane2.updateUI();
2308:                    }
2309:                }
2310:                notifyChange();
2311:            }//GEN-LAST:event_jComboBoxSubDatasetActionPerformed
2312:
2313:            /**
2314:             * @param args the command line arguments
2315:             */
2316:            public static void main(String args[]) {
2317:                java.awt.EventQueue.invokeLater(new Runnable() {
2318:                    public void run() {
2319:                        new CrosstabPropertiesDialog(new javax.swing.JFrame(),
2320:                                true).setVisible(true);
2321:                    }
2322:                });
2323:            }
2324:
2325:            // Variables declaration - do not modify//GEN-BEGIN:variables
2326:            private javax.swing.JButton jButtonAddColumnGroup;
2327:            private javax.swing.JButton jButtonAddMeasure;
2328:            private javax.swing.JButton jButtonAddParameter;
2329:            private javax.swing.JButton jButtonAddRowGroup;
2330:            private javax.swing.JButton jButtonCopy;
2331:            private javax.swing.JButton jButtonDownColumnGroup;
2332:            private javax.swing.JButton jButtonDownRowGroup;
2333:            private javax.swing.JButton jButtonModColumnGroup;
2334:            private javax.swing.JButton jButtonModMeasure;
2335:            private javax.swing.JButton jButtonModParameter;
2336:            private javax.swing.JButton jButtonModRowGroup;
2337:            private javax.swing.JButton jButtonPaste;
2338:            private javax.swing.JButton jButtonRemColumnGroup;
2339:            private javax.swing.JButton jButtonRemMeasure;
2340:            private javax.swing.JButton jButtonRemParameter;
2341:            private javax.swing.JButton jButtonRemRowGroup;
2342:            private javax.swing.JButton jButtonUpColumnGroup;
2343:            private javax.swing.JButton jButtonUpRowGroup;
2344:            private javax.swing.JCheckBox jCheckBoxPreSorted;
2345:            private javax.swing.JCheckBox jCheckBoxUseDataset;
2346:            private javax.swing.JComboBox jComboBoxDatasetConnectionType;
2347:            private javax.swing.JComboBox jComboBoxIncrementGroup;
2348:            private javax.swing.JComboBox jComboBoxIncrementType;
2349:            private javax.swing.JComboBox jComboBoxResetGroup;
2350:            private javax.swing.JComboBox jComboBoxResetType;
2351:            private javax.swing.JComboBox jComboBoxSubDataset;
2352:            private javax.swing.JComboBox jComboBoxrunDirection;
2353:            private javax.swing.JLabel jLabel1;
2354:            private javax.swing.JLabel jLabel2;
2355:            private javax.swing.JLabel jLabel26;
2356:            private javax.swing.JLabel jLabel41;
2357:            private javax.swing.JLabel jLabelIncrementGroup;
2358:            private javax.swing.JLabel jLabelIncrementType;
2359:            private javax.swing.JLabel jLabelIncrementType1;
2360:            private javax.swing.JLabel jLabelIncrementWhenExpression;
2361:            private javax.swing.JLabel jLabelResetGroup;
2362:            private javax.swing.JLabel jLabelResetType;
2363:            private javax.swing.JLabel jLabelRunDirection;
2364:            private javax.swing.JPanel jPanel1;
2365:            private javax.swing.JPanel jPanel10;
2366:            private javax.swing.JPanel jPanel11;
2367:            private javax.swing.JPanel jPanel12;
2368:            private javax.swing.JPanel jPanel13;
2369:            private javax.swing.JPanel jPanel14;
2370:            private javax.swing.JPanel jPanel15;
2371:            private javax.swing.JPanel jPanel16;
2372:            private javax.swing.JPanel jPanel17;
2373:            private javax.swing.JPanel jPanel18;
2374:            private javax.swing.JPanel jPanel19;
2375:            private javax.swing.JPanel jPanel2;
2376:            private javax.swing.JPanel jPanel20;
2377:            private javax.swing.JPanel jPanel21;
2378:            private javax.swing.JPanel jPanel22;
2379:            private javax.swing.JPanel jPanel23;
2380:            private javax.swing.JPanel jPanel3;
2381:            private javax.swing.JPanel jPanel4;
2382:            private javax.swing.JPanel jPanel5;
2383:            private javax.swing.JPanel jPanel6;
2384:            private javax.swing.JPanel jPanel7;
2385:            private javax.swing.JPanel jPanel8;
2386:            private javax.swing.JPanel jPanel9;
2387:            private javax.swing.JPanel jPanelDataset;
2388:            private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaFilterExpression;
2389:            private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaMapExpression;
2390:            private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaTextConnectionExpression;
2391:            private javax.swing.JScrollPane jScrollPane2;
2392:            private javax.swing.JScrollPane jScrollPane3;
2393:            private javax.swing.JScrollPane jScrollPane4;
2394:            private javax.swing.JScrollPane jScrollPane5;
2395:            private javax.swing.JTabbedPane jTabbedPane1;
2396:            private javax.swing.JTabbedPane jTabbedPane2;
2397:            private javax.swing.JTable jTableColumnGroups;
2398:            private javax.swing.JTable jTableDatasetParameters;
2399:            private javax.swing.JTable jTableMeasures;
2400:            private javax.swing.JTable jTableRowGroups;
2401:
2402:            // End of variables declaration//GEN-END:variables
2403:
2404:            public boolean isInit() {
2405:                return init;
2406:            }
2407:
2408:            public void setInit(boolean init) {
2409:                this .init = init;
2410:            }
2411:
2412:            public int getDialogResult() {
2413:                return dialogResult;
2414:            }
2415:
2416:            public void setDialogResult(int dialogResult) {
2417:                this .dialogResult = dialogResult;
2418:            }
2419:
2420:            public void jTableDatasetParametersListSelectionValueChanged(
2421:                    javax.swing.event.ListSelectionEvent e) {
2422:                if (this .jTableDatasetParameters.getSelectedRowCount() > 0) {
2423:                    this .jButtonModParameter.setEnabled(true);
2424:                    this .jButtonRemParameter.setEnabled(true);
2425:                } else {
2426:                    this .jButtonModParameter.setEnabled(false);
2427:                    this .jButtonRemParameter.setEnabled(false);
2428:                }
2429:            }
2430:
2431:            public void jTableMeasuresListSelectionValueChanged(
2432:                    javax.swing.event.ListSelectionEvent e) {
2433:                if (this .jTableMeasures.getSelectedRowCount() > 0) {
2434:                    this .jButtonModMeasure.setEnabled(true);
2435:                    this .jButtonRemMeasure.setEnabled(true);
2436:                } else {
2437:                    this .jButtonModMeasure.setEnabled(false);
2438:                    this .jButtonRemMeasure.setEnabled(false);
2439:                }
2440:            }
2441:
2442:            public void jTableRowGroupsListSelectionValueChanged(
2443:                    javax.swing.event.ListSelectionEvent e) {
2444:                if (this .jTableRowGroups.getSelectedRowCount() > 0) {
2445:                    this .jButtonModRowGroup.setEnabled(true);
2446:                    this .jButtonRemRowGroup.setEnabled(true);
2447:                    this .jButtonUpRowGroup.setEnabled(true);
2448:                    this .jButtonDownRowGroup.setEnabled(true);
2449:                } else {
2450:                    this .jButtonModRowGroup.setEnabled(false);
2451:                    this .jButtonRemRowGroup.setEnabled(false);
2452:                    this .jButtonUpRowGroup.setEnabled(false);
2453:                    this .jButtonDownRowGroup.setEnabled(false);
2454:                }
2455:            }
2456:
2457:            public void jTableColumnGroupsListSelectionValueChanged(
2458:                    javax.swing.event.ListSelectionEvent e) {
2459:                if (this .jTableColumnGroups.getSelectedRowCount() > 0) {
2460:                    this .jButtonModColumnGroup.setEnabled(true);
2461:                    this .jButtonRemColumnGroup.setEnabled(true);
2462:                    this .jButtonUpColumnGroup.setEnabled(true);
2463:                    this .jButtonDownColumnGroup.setEnabled(true);
2464:                } else {
2465:                    this .jButtonModColumnGroup.setEnabled(false);
2466:                    this .jButtonRemColumnGroup.setEnabled(false);
2467:                    this .jButtonUpColumnGroup.setEnabled(false);
2468:                    this .jButtonDownColumnGroup.setEnabled(false);
2469:                }
2470:            }
2471:
2472:            public void jRTextExpressionAreaMapExpressionTextChanged() {
2473:                if (this .isInit())
2474:                    return;
2475:                if (currentCrosstabReportElement != null) {
2476:                    currentCrosstabReportElement.getDataset()
2477:                            .setParametersMapExpression(
2478:                                    ""
2479:                                            + jRTextExpressionAreaMapExpression
2480:                                                    .getText());
2481:                    notifyChange();
2482:                }
2483:            }
2484:
2485:            public CrosstabReportElement getCurrentCrosstabReportElement() {
2486:                return currentCrosstabReportElement;
2487:            }
2488:
2489:            public void setCurrentCrosstabReportElement(
2490:                    CrosstabReportElement currentCrosstabReportElement) {
2491:
2492:                setInit(true);
2493:
2494:                try {
2495:
2496:                    this .currentCrosstabReportElement = currentCrosstabReportElement;
2497:
2498:                    jButtonPaste
2499:                            .setEnabled(it.businesslogic.ireport.gui.MainFrame
2500:                                    .getMainInstance()
2501:                                    .getChartDatasetClipBoard() != null);
2502:
2503:                    javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableMeasures
2504:                            .getModel();
2505:                    dtm.setRowCount(0);
2506:
2507:                    javax.swing.table.DefaultTableModel dtmRG = (javax.swing.table.DefaultTableModel) jTableRowGroups
2508:                            .getModel();
2509:                    dtmRG.setRowCount(0);
2510:
2511:                    javax.swing.table.DefaultTableModel dtmCG = (javax.swing.table.DefaultTableModel) jTableColumnGroups
2512:                            .getModel();
2513:                    dtmCG.setRowCount(0);
2514:
2515:                    if (currentCrosstabReportElement == null) {
2516:                        this .jTabbedPane1.setVisible(false);
2517:                    } else {
2518:                        updateGroups();
2519:                        updateSubDatasets();
2520:
2521:                        loadDataset();
2522:
2523:                        Enumeration enum_measures = currentCrosstabReportElement
2524:                                .getMeasures().elements();
2525:
2526:                        while (enum_measures.hasMoreElements()) {
2527:                            Measure measure = (Measure) enum_measures
2528:                                    .nextElement();
2529:                            dtm.addRow(new Object[] { measure,
2530:                                    measure.getClassType() });
2531:                        }
2532:
2533:                        Enumeration enum_groups = currentCrosstabReportElement
2534:                                .getRowGroups().elements();
2535:                        while (enum_groups.hasMoreElements()) {
2536:                            dtmRG.addRow(new Object[] { enum_groups
2537:                                    .nextElement() });
2538:                        }
2539:
2540:                        enum_groups = currentCrosstabReportElement
2541:                                .getColumnGroups().elements();
2542:                        while (enum_groups.hasMoreElements()) {
2543:                            dtmCG.addRow(new Object[] { enum_groups
2544:                                    .nextElement() });
2545:                        }
2546:                    }
2547:
2548:                } catch (Exception ex) {
2549:                    ex.printStackTrace();
2550:                }
2551:                setInit(false);
2552:            }
2553:
2554:            public void jRTextExpressionAreaTextConnectionExpressionTextChanged() {
2555:                if (this .isInit())
2556:                    return;
2557:                if (currentCrosstabReportElement != null) {
2558:                    if (currentCrosstabReportElement.getDataset()
2559:                            .isUseConnection())
2560:                        currentCrosstabReportElement
2561:                                .getDataset()
2562:                                .setConnectionExpression(
2563:                                        ""
2564:                                                + jRTextExpressionAreaTextConnectionExpression
2565:                                                        .getText());
2566:                    else
2567:                        currentCrosstabReportElement
2568:                                .getDataset()
2569:                                .setDataSourceExpression(
2570:                                        ""
2571:                                                + jRTextExpressionAreaTextConnectionExpression
2572:                                                        .getText());
2573:
2574:                    notifyChange();
2575:                }
2576:            }
2577:
2578:            public void jRTextExpressionAreaFilterExpressionTextChanged() {
2579:                if (this .isInit())
2580:                    return;
2581:                if (currentCrosstabReportElement != null) {
2582:                    currentCrosstabReportElement
2583:                            .getDataset()
2584:                            .setIncrementWhenExpression(
2585:                                    ""
2586:                                            + jRTextExpressionAreaFilterExpression
2587:                                                    .getText());
2588:                    notifyChange();
2589:                }
2590:            }
2591:
2592:            /**
2593:             * This method update the comboboxes where is present the goup list.
2594:             */
2595:            public void updateGroups() {
2596:
2597:                if (it.businesslogic.ireport.gui.MainFrame.getMainInstance()
2598:                        .getActiveReportFrame() == null) {
2599:                    jComboBoxResetGroup.removeAllItems();
2600:                    jComboBoxResetGroup.addItem("");
2601:                } else {
2602:                    Misc.updateStringComboBox(jComboBoxResetGroup,
2603:                            it.businesslogic.ireport.gui.MainFrame
2604:                                    .getMainInstance().getActiveReportFrame()
2605:                                    .getReport().getGroups(), true);
2606:                    Misc.updateStringComboBox(jComboBoxIncrementGroup,
2607:                            it.businesslogic.ireport.gui.MainFrame
2608:                                    .getMainInstance().getActiveReportFrame()
2609:                                    .getReport().getGroups(), true);
2610:                }
2611:
2612:            }
2613:
2614:            public void updateSubDatasets() {
2615:
2616:                if (it.businesslogic.ireport.gui.MainFrame.getMainInstance()
2617:                        .getActiveReportFrame() == null) {
2618:                    jComboBoxSubDataset.removeAllItems();
2619:                    jComboBoxSubDataset.addItem("");
2620:                } else {
2621:                    Misc.updateComboBox(jComboBoxSubDataset,
2622:                            it.businesslogic.ireport.gui.MainFrame
2623:                                    .getMainInstance().getActiveReportFrame()
2624:                                    .getReport().getSubDatasets(), true);
2625:                }
2626:            }
2627:
2628:            /**
2629:             * Enable/disable the dataset gui (used when isUseDataset changes)
2630:             */
2631:            public void setDatasetEnabled(boolean enabled) {
2632:                jCheckBoxPreSorted.setEnabled(enabled);
2633:                jLabelIncrementGroup.setEnabled(enabled);
2634:                jLabelIncrementType.setEnabled(enabled);
2635:                jLabelResetType.setEnabled(enabled);
2636:                jLabelResetGroup.setEnabled(enabled);
2637:                jComboBoxResetType.setEnabled(enabled);
2638:                jComboBoxResetGroup.setEnabled(enabled);
2639:                jComboBoxIncrementType.setEnabled(enabled);
2640:                jComboBoxIncrementGroup.setEnabled(enabled);
2641:                jComboBoxIncrementType.setEnabled(enabled);
2642:                jComboBoxSubDataset.setEnabled(enabled);
2643:                jTabbedPane2.setVisible(enabled
2644:                        && jComboBoxSubDataset.getSelectedIndex() > 0);
2645:                jButtonCopy.setEnabled(enabled);
2646:                jButtonPaste.setEnabled(enabled);
2647:
2648:                jLabelIncrementWhenExpression.setEnabled(enabled);
2649:                jRTextExpressionAreaFilterExpression.setEnabled(enabled);
2650:                //Color c = javax.swing.UIManager.getDefaults().getColor("Panel.background");
2651:                //if (c == null) c = jPanel1.getBackground();
2652:                //jRTextExpressionAreaFilterExpression.setBackground((enabled) ? Color.WHITE : c);
2653:            }
2654:
2655:            /**
2656:             * Load the dataset into GUI. Assume init = true.
2657:             */
2658:            public void loadDataset() {
2659:                if (currentCrosstabReportElement == null)
2660:                    return;
2661:                // Set general dataset data...
2662:                Misc.setComboboxSelectedTagValue(jComboBoxIncrementType,
2663:                        currentCrosstabReportElement.getDataset()
2664:                                .getIncrementType());
2665:                jComboBoxIncrementGroup
2666:                        .setSelectedItem(currentCrosstabReportElement
2667:                                .getDataset().getIncrementGroup());
2668:                Misc.setComboboxSelectedTagValue(jComboBoxResetType,
2669:                        currentCrosstabReportElement.getDataset()
2670:                                .getResetType());
2671:                jComboBoxResetGroup
2672:                        .setSelectedItem(currentCrosstabReportElement
2673:                                .getDataset().getResetGroup());
2674:                setDatasetEnabled(currentCrosstabReportElement.isUseDataset());
2675:                jCheckBoxUseDataset.setSelected(currentCrosstabReportElement
2676:                        .isUseDataset());
2677:                Misc.setComboboxSelectedTagValue(jComboBoxrunDirection,
2678:                        currentCrosstabReportElement.getRunDirection());
2679:                jCheckBoxPreSorted.setSelected(currentCrosstabReportElement
2680:                        .isPreSorted());
2681:
2682:                jRTextExpressionAreaFilterExpression
2683:                        .setText(currentCrosstabReportElement.getDataset()
2684:                                .getIncrementWhenExpression());
2685:
2686:                if (currentCrosstabReportElement.getDataset().getSubDataset() != null) {
2687:                    jComboBoxSubDataset
2688:                            .setSelectedItem(currentCrosstabReportElement
2689:                                    .getDataset().getSubDataset());
2690:                    jTabbedPane2.setVisible(true);
2691:
2692:                    jRTextExpressionAreaMapExpression
2693:                            .setText(currentCrosstabReportElement.getDataset()
2694:                                    .getParametersMapExpression());
2695:                    if (!currentCrosstabReportElement.getDataset()
2696:                            .isUseConnection()
2697:                            && Misc.nvl(
2698:                                    currentCrosstabReportElement.getDataset()
2699:                                            .getDataSourceExpression(), "")
2700:                                    .trim().equals("")) {
2701:                        this .jComboBoxDatasetConnectionType.setSelectedIndex(0);
2702:                        this .jRTextExpressionAreaTextConnectionExpression
2703:                                .setEnabled(false);
2704:                        this .jRTextExpressionAreaTextConnectionExpression
2705:                                .setBackground(Color.LIGHT_GRAY);
2706:                        this .jRTextExpressionAreaTextConnectionExpression
2707:                                .setText("");
2708:                    } else if (currentCrosstabReportElement.getDataset()
2709:                            .isUseConnection()) {
2710:                        this .jComboBoxDatasetConnectionType.setSelectedIndex(1);
2711:                        this .jRTextExpressionAreaTextConnectionExpression
2712:                                .setEnabled(true);
2713:                        this .jRTextExpressionAreaTextConnectionExpression
2714:                                .setBackground(Color.WHITE);
2715:                        this .jRTextExpressionAreaTextConnectionExpression
2716:                                .setText(currentCrosstabReportElement
2717:                                        .getDataset().getConnectionExpression());
2718:                    } else {
2719:                        this .jComboBoxDatasetConnectionType.setSelectedIndex(2);
2720:                        this .jRTextExpressionAreaTextConnectionExpression
2721:                                .setEnabled(true);
2722:                        this .jRTextExpressionAreaTextConnectionExpression
2723:                                .setBackground(Color.WHITE);
2724:                        this .jRTextExpressionAreaTextConnectionExpression
2725:                                .setText(currentCrosstabReportElement
2726:                                        .getDataset().getDataSourceExpression());
2727:                    }
2728:
2729:                    //Add parameters...
2730:                    javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableDatasetParameters
2731:                            .getModel();
2732:                    dtm.setRowCount(0);
2733:
2734:                    java.util.Enumeration enum_parameters = currentCrosstabReportElement
2735:                            .getDataset().getSubreportParameters().elements();
2736:                    while (enum_parameters.hasMoreElements()) {
2737:                        it.businesslogic.ireport.JRSubreportParameter parameter = (it.businesslogic.ireport.JRSubreportParameter) enum_parameters
2738:                                .nextElement();
2739:                        Vector row = new Vector();
2740:                        row.addElement(parameter);
2741:                        row.addElement(parameter.getExpression());
2742:                        dtm.addRow(row);
2743:                    }
2744:
2745:                    jRTextExpressionAreaFilterExpression
2746:                            .setSubDataset(currentCrosstabReportElement
2747:                                    .getDataset().getSubDataset());
2748:                } else {
2749:                    javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) jTableDatasetParameters
2750:                            .getModel();
2751:                    dtm.setRowCount(0);
2752:                    this .jComboBoxDatasetConnectionType.setSelectedIndex(0);
2753:                    this .jRTextExpressionAreaTextConnectionExpression
2754:                            .setEnabled(false);
2755:                    this .jRTextExpressionAreaTextConnectionExpression
2756:                            .setBackground(Color.LIGHT_GRAY);
2757:                    this .jRTextExpressionAreaTextConnectionExpression
2758:                            .setText("");
2759:                    jRTextExpressionAreaMapExpression.setText("");
2760:
2761:                    jComboBoxSubDataset.setSelectedIndex(0);
2762:                    jTabbedPane2.setVisible(false);
2763:                }
2764:            }
2765:
2766:            public void notifyChange() {
2767:                if (getCurrentCrosstabReportElement() != null) {
2768:                    getCurrentCrosstabReportElement().notifyChange();
2769:                }
2770:            }
2771:
2772:            private int openRowGroupWhenVisible = -1;
2773:            private int openColumnGroupWhenVisible = -1;
2774:            private int openMeasureWhenVisible = -1;
2775:            private int highlightThisGroupExpWhenVisible = 0;
2776:
2777:            public void openRowBucket(int index, int expId) {
2778:                openRowGroupWhenVisible = index;
2779:                openColumnGroupWhenVisible = -1;
2780:                openMeasureWhenVisible = -1;
2781:                highlightThisGroupExpWhenVisible = expId;
2782:
2783:                if (isVisible()) {
2784:                    openExtraWindows();
2785:                }
2786:            }
2787:
2788:            public void openColumnBucket(int index, int expId) {
2789:                openRowGroupWhenVisible = -1;
2790:                openColumnGroupWhenVisible = index;
2791:                openMeasureWhenVisible = -1;
2792:                highlightThisGroupExpWhenVisible = expId;
2793:
2794:                if (isVisible()) {
2795:                    openExtraWindows();
2796:                }
2797:            }
2798:
2799:            public void openMeasure(int index, int expId) {
2800:                openRowGroupWhenVisible = -1;
2801:                openColumnGroupWhenVisible = -1;
2802:                openMeasureWhenVisible = index;
2803:                highlightThisGroupExpWhenVisible = expId;
2804:
2805:                if (isVisible()) {
2806:                    openExtraWindows();
2807:                }
2808:            }
2809:
2810:            public void openExtraWindows() {
2811:
2812:                if (openRowGroupWhenVisible >= 0) {
2813:                    if (jTableRowGroups.getRowCount() > openRowGroupWhenVisible) {
2814:                        jTabbedPane1.setSelectedComponent(jPanel9);
2815:                        jTableRowGroups.setRowSelectionInterval(
2816:                                openRowGroupWhenVisible,
2817:                                openRowGroupWhenVisible);
2818:                        jButtonModRowGroupActionPerformed(new ActionEvent(
2819:                                jButtonModRowGroup,
2820:                                highlightThisGroupExpWhenVisible, ""));
2821:                    }
2822:                } else if (openColumnGroupWhenVisible >= 0) {
2823:                    if (jTableColumnGroups.getRowCount() > openColumnGroupWhenVisible) {
2824:                        jTabbedPane1.setSelectedComponent(jPanel9);
2825:                        jTableColumnGroups.setRowSelectionInterval(
2826:                                openColumnGroupWhenVisible,
2827:                                openColumnGroupWhenVisible);
2828:                        jButtonModColumnGroupActionPerformed(new ActionEvent(
2829:                                jButtonModColumnGroup,
2830:                                highlightThisGroupExpWhenVisible, ""));
2831:                    }
2832:                } else if (openMeasureWhenVisible >= 0) {
2833:                    if (jTableMeasures.getRowCount() > openMeasureWhenVisible) {
2834:                        jTabbedPane1.setSelectedComponent(jPanel11);
2835:                        jTableMeasures.setRowSelectionInterval(
2836:                                openMeasureWhenVisible, openMeasureWhenVisible);
2837:                        jButtonModMeasureActionPerformed(new ActionEvent(
2838:                                jButtonModColumnGroup,
2839:                                highlightThisGroupExpWhenVisible, ""));
2840:                    }
2841:                } else if (subdatasetParameterHighlightExpression != null) {
2842:                    jButtonModParameterActionPerformed(new ActionEvent(
2843:                            jButtonModParameter, 0, ""));
2844:                }
2845:                highlightThisGroupExpWhenVisible = -1;
2846:                subdatasetParameterHighlightExpression = null;
2847:            }
2848:
2849:            private Object[] subdatasetParameterHighlightExpression = null;
2850:
2851:            /**
2852:             * This method set the focus on a specific component.
2853:             * 
2854:             */
2855:            public void setFocusedExpression(Object[] expressionInfo) {
2856:                int expID = ((Integer) expressionInfo[0]).intValue();
2857:
2858:                switch (expID) {
2859:                case ChartPropertiesDialog.COMPONENT_INCREMENT_WHEN_EXPRESSION:
2860:                    jTabbedPane1.setSelectedComponent(jPanel8);
2861:                    Misc
2862:                            .selectTextAndFocusArea(jRTextExpressionAreaFilterExpression);
2863:                    break;
2864:                case ChartPropertiesDialog.COMPONENT_DATASETRUN_PARAMETERS:
2865:                    jTabbedPane1.setSelectedComponent(jPanel8);
2866:                    jTabbedPane2.setSelectedComponent(jPanel4);
2867:
2868:                    int index = ((Integer) expressionInfo[1]).intValue();
2869:
2870:                    if (index >= 0
2871:                            && jTableDatasetParameters.getRowCount() > index) {
2872:                        jTableDatasetParameters.setRowSelectionInterval(index,
2873:                                index);
2874:                        subdatasetParameterHighlightExpression = new Object[expressionInfo.length - 2];
2875:                        for (int i = 2; i < expressionInfo.length; ++i)
2876:                            subdatasetParameterHighlightExpression[i - 2] = expressionInfo[i];
2877:                        break;
2878:                    }
2879:
2880:                    break;
2881:                case ChartPropertiesDialog.COMPONENT_DATASETRUN_MAP_EXPRESSION:
2882:                    jTabbedPane1.setSelectedComponent(jPanel8);
2883:                    jTabbedPane2.setSelectedComponent(jPanel5);
2884:                    Misc
2885:                            .selectTextAndFocusArea(jRTextExpressionAreaMapExpression);
2886:                    break;
2887:                case ChartPropertiesDialog.COMPONENT_DATASETRUN_DS_CONN_EXPRESSION:
2888:                    jTabbedPane1.setSelectedComponent(jPanel8);
2889:                    jTabbedPane2.setSelectedComponent(jPanel6);
2890:                    Misc
2891:                            .selectTextAndFocusArea(jRTextExpressionAreaTextConnectionExpression);
2892:                    break;
2893:                }
2894:            }
2895:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.