Source Code Cross Referenced for JRGroupDialog.java in  » Report » iReport-2.0.5 » it » businesslogic » ireport » gui » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Report » iReport 2.0.5 » it.businesslogic.ireport.gui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (C) 2005 - 2008 JasperSoft Corporation.  All rights reserved. 
003:         * http://www.jaspersoft.com.
004:         *
005:         * Unless you have purchased a commercial license agreement from JasperSoft,
006:         * the following license terms apply:
007:         *
008:         * This program is free software; you can redistribute it and/or modify
009:         * it under the terms of the GNU General Public License version 2 as published by
010:         * the Free Software Foundation.
011:         *
012:         * This program is distributed WITHOUT ANY WARRANTY; and without the
013:         * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
014:         * See the GNU General Public License for more details.
015:         *
016:         * You should have received a copy of the GNU General Public License
017:         * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
018:         * or write to:
019:         *
020:         * Free Software Foundation, Inc.,
021:         * 59 Temple Place - Suite 330,
022:         * Boston, MA  USA  02111-1307
023:         *
024:         *
025:         *
026:         *
027:         * JRGroupDialog.java
028:         * 
029:         * Created on 9 maggio 2003, 17.25
030:         *
031:         */
032:
033:        package it.businesslogic.ireport.gui;
034:
035:        import it.businesslogic.ireport.util.*;
036:        import it.businesslogic.ireport.*;
037:        import it.businesslogic.ireport.gui.sheet.ReportBandSheetPanel;
038:        import javax.swing.JDialog;
039:        import javax.swing.JFrame;
040:
041:        /**
042:         *
043:         * @author  Administrator
044:         */
045:        public class JRGroupDialog extends javax.swing.JDialog {
046:            /** Creates new form JRParameterDialog */
047:            private String groupName;
048:            private String expression;
049:            private int minHeightStartNewPage = 0;
050:            private int headerBandHeight = 0;
051:            private int footerBandHeight = 0;
052:            private boolean startNewPage = false;
053:            private boolean startNewColumn = false;
054:            private boolean printHeaderEachPage = false;
055:            private boolean resetPageNumber = false;
056:
057:            private SubDataset subdataset = null;
058:
059:            private Group cachedGroup = null;
060:
061:            public JRGroupDialog(JDialog dialog, boolean modal) {
062:                super (dialog, modal);
063:                initAll();
064:            }
065:
066:            public JRGroupDialog(JFrame frame, boolean modal) {
067:                super (frame, modal);
068:                initAll();
069:            }
070:
071:            public void initAll() {
072:                initComponents();
073:                applyI18n();
074:                this .jRTextExpressionArea.setText("");
075:
076:                javax.swing.KeyStroke escape = javax.swing.KeyStroke
077:                        .getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0,
078:                                false);
079:                javax.swing.Action escapeAction = new javax.swing.AbstractAction() {
080:                    public void actionPerformed(java.awt.event.ActionEvent e) {
081:                        jButtonCancelActionPerformed(e);
082:                    }
083:                };
084:
085:                getRootPane().getInputMap(
086:                        javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW).put(
087:                        escape, "ESCAPE");
088:                getRootPane().getActionMap().put("ESCAPE", escapeAction);
089:
090:                this .pack();
091:                //to make the default button ...
092:                this .getRootPane().setDefaultButton(this .jButtonOK);
093:            }
094:
095:            /** This method is called from within the constructor to
096:             * initialize the form.
097:             * WARNING: Do NOT modify this code. The content of this method is
098:             * always regenerated by the Form Editor.
099:             */
100:            // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
101:            private void initComponents() {
102:                java.awt.GridBagConstraints gridBagConstraints;
103:
104:                jLabel1 = new javax.swing.JLabel();
105:                jTextFieldName = new javax.swing.JTextField();
106:                jCheckBoxStartNewColumn = new javax.swing.JCheckBox();
107:                jLabel3 = new javax.swing.JLabel();
108:                jRTextExpressionArea = new it.businesslogic.ireport.gui.JRTextExpressionArea();
109:                jCheckBoxStartNewPage = new javax.swing.JCheckBox();
110:                jCheckBoxResetPageNumber = new javax.swing.JCheckBox();
111:                jCheckBoxPrintHeaderEachPage = new javax.swing.JCheckBox();
112:                jLabel5 = new javax.swing.JLabel();
113:                jNumberFieldMinStartNewPage = new it.businesslogic.ireport.gui.JNumberField();
114:                jLabel6 = new javax.swing.JLabel();
115:                jNumberFieldHeaderBand = new it.businesslogic.ireport.gui.JNumberField();
116:                jLabel7 = new javax.swing.JLabel();
117:                jNumberFieldFooterBand = new it.businesslogic.ireport.gui.JNumberField();
118:                jPanel1 = new javax.swing.JPanel();
119:                jButtonOK = new javax.swing.JButton();
120:                jButtonCancel = new javax.swing.JButton();
121:
122:                getContentPane().setLayout(new java.awt.GridBagLayout());
123:
124:                setTitle("Add/modify group");
125:                setModal(true);
126:                setResizable(false);
127:                addWindowListener(new java.awt.event.WindowAdapter() {
128:                    public void windowClosing(java.awt.event.WindowEvent evt) {
129:                        closeDialog(evt);
130:                    }
131:                });
132:
133:                jLabel1.setText("Group name");
134:                gridBagConstraints = new java.awt.GridBagConstraints();
135:                gridBagConstraints.gridx = 0;
136:                gridBagConstraints.gridy = 0;
137:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
138:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
139:                getContentPane().add(jLabel1, gridBagConstraints);
140:
141:                gridBagConstraints = new java.awt.GridBagConstraints();
142:                gridBagConstraints.gridx = 0;
143:                gridBagConstraints.gridy = 1;
144:                gridBagConstraints.gridwidth = 2;
145:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
146:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
147:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
148:                getContentPane().add(jTextFieldName, gridBagConstraints);
149:
150:                jCheckBoxStartNewColumn.setText("Start on a new column");
151:                gridBagConstraints = new java.awt.GridBagConstraints();
152:                gridBagConstraints.gridx = 0;
153:                gridBagConstraints.gridy = 2;
154:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
155:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 0, 3);
156:                getContentPane().add(jCheckBoxStartNewColumn,
157:                        gridBagConstraints);
158:
159:                jLabel3.setText("Group expression");
160:                gridBagConstraints = new java.awt.GridBagConstraints();
161:                gridBagConstraints.gridx = 0;
162:                gridBagConstraints.gridy = 5;
163:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
164:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
165:                getContentPane().add(jLabel3, gridBagConstraints);
166:
167:                jRTextExpressionArea.setBorder(javax.swing.BorderFactory
168:                        .createEtchedBorder());
169:                jRTextExpressionArea.setPreferredSize(new java.awt.Dimension(
170:                        300, 70));
171:                gridBagConstraints = new java.awt.GridBagConstraints();
172:                gridBagConstraints.gridx = 0;
173:                gridBagConstraints.gridy = 6;
174:                gridBagConstraints.gridwidth = 2;
175:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
176:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
177:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
178:                getContentPane().add(jRTextExpressionArea, gridBagConstraints);
179:
180:                jCheckBoxStartNewPage.setText("Start on a new page");
181:                gridBagConstraints = new java.awt.GridBagConstraints();
182:                gridBagConstraints.gridx = 0;
183:                gridBagConstraints.gridy = 3;
184:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
185:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 3, 3);
186:                getContentPane().add(jCheckBoxStartNewPage, gridBagConstraints);
187:
188:                jCheckBoxResetPageNumber.setText("Reset page number");
189:                gridBagConstraints = new java.awt.GridBagConstraints();
190:                gridBagConstraints.gridx = 1;
191:                gridBagConstraints.gridy = 2;
192:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
193:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 0, 3);
194:                getContentPane().add(jCheckBoxResetPageNumber,
195:                        gridBagConstraints);
196:
197:                jCheckBoxPrintHeaderEachPage
198:                        .setText("Print header on each page");
199:                gridBagConstraints = new java.awt.GridBagConstraints();
200:                gridBagConstraints.gridx = 1;
201:                gridBagConstraints.gridy = 3;
202:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
203:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 3, 3);
204:                getContentPane().add(jCheckBoxPrintHeaderEachPage,
205:                        gridBagConstraints);
206:
207:                jLabel5.setText("Min height to start new page");
208:                gridBagConstraints = new java.awt.GridBagConstraints();
209:                gridBagConstraints.gridx = 0;
210:                gridBagConstraints.gridy = 4;
211:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
212:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
213:                getContentPane().add(jLabel5, gridBagConstraints);
214:
215:                jNumberFieldMinStartNewPage.setColumns(4);
216:                jNumberFieldMinStartNewPage
217:                        .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
218:                try {
219:                    jNumberFieldMinStartNewPage.setDecimals(0);
220:                } catch (java.beans.PropertyVetoException e1) {
221:                    e1.printStackTrace();
222:                }
223:                gridBagConstraints = new java.awt.GridBagConstraints();
224:                gridBagConstraints.gridx = 1;
225:                gridBagConstraints.gridy = 4;
226:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
227:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
228:                getContentPane().add(jNumberFieldMinStartNewPage,
229:                        gridBagConstraints);
230:
231:                jLabel6.setText("Group header band height");
232:                gridBagConstraints = new java.awt.GridBagConstraints();
233:                gridBagConstraints.gridx = 0;
234:                gridBagConstraints.gridy = 7;
235:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
236:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
237:                getContentPane().add(jLabel6, gridBagConstraints);
238:
239:                jNumberFieldHeaderBand.setColumns(4);
240:                jNumberFieldHeaderBand
241:                        .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
242:                try {
243:                    jNumberFieldHeaderBand.setDecimals(0);
244:                } catch (java.beans.PropertyVetoException e1) {
245:                    e1.printStackTrace();
246:                }
247:                try {
248:                    jNumberFieldHeaderBand.setValue(50.0);
249:                } catch (java.beans.PropertyVetoException e1) {
250:                    e1.printStackTrace();
251:                }
252:                gridBagConstraints = new java.awt.GridBagConstraints();
253:                gridBagConstraints.gridx = 1;
254:                gridBagConstraints.gridy = 7;
255:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
256:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
257:                getContentPane()
258:                        .add(jNumberFieldHeaderBand, gridBagConstraints);
259:
260:                jLabel7.setText("Group footer band height");
261:                gridBagConstraints = new java.awt.GridBagConstraints();
262:                gridBagConstraints.gridx = 0;
263:                gridBagConstraints.gridy = 8;
264:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
265:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
266:                getContentPane().add(jLabel7, gridBagConstraints);
267:
268:                jNumberFieldFooterBand.setColumns(4);
269:                jNumberFieldFooterBand
270:                        .setHorizontalAlignment(javax.swing.JTextField.RIGHT);
271:                try {
272:                    jNumberFieldFooterBand.setDecimals(0);
273:                } catch (java.beans.PropertyVetoException e1) {
274:                    e1.printStackTrace();
275:                }
276:                try {
277:                    jNumberFieldFooterBand.setValue(50.0);
278:                } catch (java.beans.PropertyVetoException e1) {
279:                    e1.printStackTrace();
280:                }
281:                gridBagConstraints = new java.awt.GridBagConstraints();
282:                gridBagConstraints.gridx = 1;
283:                gridBagConstraints.gridy = 8;
284:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
285:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
286:                getContentPane()
287:                        .add(jNumberFieldFooterBand, gridBagConstraints);
288:
289:                jPanel1.setLayout(new java.awt.FlowLayout(
290:                        java.awt.FlowLayout.RIGHT));
291:
292:                jButtonOK.setMnemonic('o');
293:                jButtonOK.setText("OK");
294:                jButtonOK
295:                        .addActionListener(new java.awt.event.ActionListener() {
296:                            public void actionPerformed(
297:                                    java.awt.event.ActionEvent evt) {
298:                                jButtonOKActionPerformed(evt);
299:                            }
300:                        });
301:
302:                jPanel1.add(jButtonOK);
303:
304:                jButtonCancel.setText("Cancel");
305:                jButtonCancel.setMnemonic('c');
306:                jButtonCancel
307:                        .addActionListener(new java.awt.event.ActionListener() {
308:                            public void actionPerformed(
309:                                    java.awt.event.ActionEvent evt) {
310:                                jButtonCancelActionPerformed(evt);
311:                            }
312:                        });
313:
314:                jPanel1.add(jButtonCancel);
315:
316:                gridBagConstraints = new java.awt.GridBagConstraints();
317:                gridBagConstraints.gridx = 0;
318:                gridBagConstraints.gridy = 9;
319:                gridBagConstraints.gridwidth = 2;
320:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
321:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
322:                gridBagConstraints.weightx = 1.0;
323:                gridBagConstraints.weighty = 1.0;
324:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
325:                getContentPane().add(jPanel1, gridBagConstraints);
326:
327:                pack();
328:                java.awt.Dimension screenSize = java.awt.Toolkit
329:                        .getDefaultToolkit().getScreenSize();
330:                java.awt.Dimension dialogSize = getSize();
331:                setLocation((screenSize.width - dialogSize.width) / 2,
332:                        (screenSize.height - dialogSize.height) / 2);
333:            }// </editor-fold>//GEN-END:initComponents
334:
335:            private void jButtonCancelActionPerformed(
336:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelActionPerformed
337:                setVisible(false);
338:                this .setDialogResult(javax.swing.JOptionPane.CANCEL_OPTION);
339:                dispose();
340:            }//GEN-LAST:event_jButtonCancelActionPerformed
341:
342:            private void jButtonOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOKActionPerformed
343:
344:                SubDataset sd = getSubdataset();
345:                if (sd == null) {
346:                    sd = MainFrame.getMainInstance().getActiveReportFrame()
347:                            .getReport();
348:                }
349:
350:                String proposed_name = this .jTextFieldName.getText().trim();
351:                if (proposed_name.length() <= 0 || proposed_name.equals("page")
352:                        || proposed_name.equals("column")
353:                        || proposed_name.equals("lastPage")) {
354:                    javax.swing.JOptionPane
355:                            .showMessageDialog(
356:                                    this ,
357:                                    I18n
358:                                            .getString(
359:                                                    "messages.jRGroupDialog.notValidGroupName",
360:                                                    "Please insert a valid group name!"),
361:                                    I18n
362:                                            .getString(
363:                                                    "messages.jRGroupDialog.notValidGroupNameCaption",
364:                                                    "Invalid name!"),
365:                                    javax.swing.JOptionPane.WARNING_MESSAGE);
366:                    return;
367:                }
368:
369:                if (!ReportBandSheetPanel.isValidGroupName(sd, cachedGroup,
370:                        jTextFieldName.getText().trim())) {
371:                    javax.swing.JOptionPane
372:                            .showMessageDialog(
373:                                    this ,
374:                                    I18n
375:                                            .getString(
376:                                                    "reportGroupWizard.jLabelErrorMessage",
377:                                                    "This group name is already in use."),
378:                                    I18n
379:                                            .getString(
380:                                                    "messages.jRGroupDialog.notValidGroupNameCaption",
381:                                                    "Invalid name!"),
382:                                    javax.swing.JOptionPane.WARNING_MESSAGE);
383:                    return;
384:                }
385:
386:                setGroupName(this .jTextFieldName.getText());
387:                // TODO: Control height!
388:                setHeaderBandHeight((int) this .jNumberFieldHeaderBand
389:                        .getValue());
390:                setFooterBandHeight((int) this .jNumberFieldFooterBand
391:                        .getValue());
392:                setMinHeightStartNewPage((int) this .jNumberFieldMinStartNewPage
393:                        .getValue());
394:
395:                setStartNewColumn(jCheckBoxStartNewColumn.isSelected());
396:                setStartNewPage(jCheckBoxStartNewPage.isSelected());
397:                setPrintHeaderEachPage(jCheckBoxPrintHeaderEachPage
398:                        .isSelected());
399:                setResetPageNumber(jCheckBoxResetPageNumber.isSelected());
400:
401:                setExpression(jRTextExpressionArea.getText());
402:
403:                setVisible(false);
404:                this .setDialogResult(javax.swing.JOptionPane.OK_OPTION);
405:                dispose();
406:            }//GEN-LAST:event_jButtonOKActionPerformed
407:
408:            /** Closes the dialog */
409:            private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
410:                setVisible(false);
411:                this .setDialogResult(javax.swing.JOptionPane.CLOSED_OPTION);
412:                dispose();
413:            }//GEN-LAST:event_closeDialog
414:
415:            /**
416:             * @param args the command line arguments
417:             */
418:            public static void main(String args[]) {
419:                new JRParameterDialog(new javax.swing.JFrame(), true)
420:                        .setVisible(true);
421:            }
422:
423:            /** Setter for property tmpParameter.
424:             * @param tmpParameter New value of property tmpParameter.
425:             *
426:             */
427:            public void setGroup(it.businesslogic.ireport.Group group) {
428:
429:                cachedGroup = group;
430:                this .jTextFieldName.setText(new String(group.getName()));
431:                this .jCheckBoxStartNewPage
432:                        .setSelected(group.isIsStartNewPage());
433:                this .jCheckBoxStartNewColumn.setSelected(group
434:                        .isIsStartNewColumn());
435:                this .jCheckBoxPrintHeaderEachPage.setSelected(group
436:                        .isIsReprintHeaderOnEachPage());
437:                this .jCheckBoxResetPageNumber.setSelected(group
438:                        .isIsResetPageNumber());
439:                this .jRTextExpressionArea.setText(new String(group
440:                        .getGroupExpression().trim()));
441:
442:                try {
443:                    this .jNumberFieldMinStartNewPage.setValue(group
444:                            .getMinHeightToStartNewPage());
445:                    this .jNumberFieldHeaderBand.setValue(group.getGroupHeader()
446:                            .getHeight());
447:                    this .jNumberFieldFooterBand.setValue(group.getGroupFooter()
448:                            .getHeight());
449:                } catch (Exception ex) {
450:                }
451:            }
452:
453:            /** Getter for property dialogResult.
454:             * @return Value of property dialogResult.
455:             *
456:             */
457:            public int getDialogResult() {
458:                return dialogResult;
459:            }
460:
461:            /** Setter for property dialogResult.
462:             * @param dialogResult New value of property dialogResult.
463:             *
464:             */
465:            public void setDialogResult(int dialogResult) {
466:                this .dialogResult = dialogResult;
467:            }
468:
469:            /** Getter for property expression.
470:             * @return Value of property expression.
471:             *
472:             */
473:            public java.lang.String getExpression() {
474:                return expression;
475:            }
476:
477:            /** Setter for property expression.
478:             * @param expression New value of property expression.
479:             *
480:             */
481:            public void setExpression(java.lang.String expression) {
482:                this .expression = expression;
483:            }
484:
485:            /** Getter for property footerBandHeight.
486:             * @return Value of property footerBandHeight.
487:             *
488:             */
489:            public int getFooterBandHeight() {
490:                return footerBandHeight;
491:            }
492:
493:            /** Setter for property footerBandHeight.
494:             * @param footerBandHeight New value of property footerBandHeight.
495:             *
496:             */
497:            public void setFooterBandHeight(int footerBandHeight) {
498:                this .footerBandHeight = footerBandHeight;
499:            }
500:
501:            /** Getter for property groupName.
502:             * @return Value of property groupName.
503:             *
504:             */
505:            public java.lang.String getGroupName() {
506:                return groupName;
507:            }
508:
509:            /** Setter for property groupName.
510:             * @param groupName New value of property groupName.
511:             *
512:             */
513:            public void setGroupName(java.lang.String groupName) {
514:                this .groupName = groupName;
515:            }
516:
517:            /** Getter for property headerBandHeight.
518:             * @return Value of property headerBandHeight.
519:             *
520:             */
521:            public int getHeaderBandHeight() {
522:                return headerBandHeight;
523:            }
524:
525:            /** Setter for property headerBandHeight.
526:             * @param headerBandHeight New value of property headerBandHeight.
527:             *
528:             */
529:            public void setHeaderBandHeight(int headerBandHeight) {
530:                this .headerBandHeight = headerBandHeight;
531:            }
532:
533:            /** Getter for property minHeightStartNewPage.
534:             * @return Value of property minHeightStartNewPage.
535:             *
536:             */
537:            public int getMinHeightStartNewPage() {
538:                return minHeightStartNewPage;
539:            }
540:
541:            /** Setter for property minHeightStartNewPage.
542:             * @param minHeightStartNewPage New value of property minHeightStartNewPage.
543:             *
544:             */
545:            public void setMinHeightStartNewPage(int minHeightStartNewPage) {
546:                this .minHeightStartNewPage = minHeightStartNewPage;
547:            }
548:
549:            /** Getter for property printHeaderEachPage.
550:             * @return Value of property printHeaderEachPage.
551:             *
552:             */
553:            public boolean isPrintHeaderEachPage() {
554:                return printHeaderEachPage;
555:            }
556:
557:            /** Setter for property printHeaderEachPage.
558:             * @param printHeaderEachPage New value of property printHeaderEachPage.
559:             *
560:             */
561:            public void setPrintHeaderEachPage(boolean printHeaderEachPage) {
562:                this .printHeaderEachPage = printHeaderEachPage;
563:            }
564:
565:            /** Getter for property resetPageNumber.
566:             * @return Value of property resetPageNumber.
567:             *
568:             */
569:            public boolean isResetPageNumber() {
570:                return resetPageNumber;
571:            }
572:
573:            /** Setter for property resetPageNumber.
574:             * @param resetPageNumber New value of property resetPageNumber.
575:             *
576:             */
577:            public void setResetPageNumber(boolean resetPageNumber) {
578:                this .resetPageNumber = resetPageNumber;
579:            }
580:
581:            /** Getter for property startNewColumn.
582:             * @return Value of property startNewColumn.
583:             *
584:             */
585:            public boolean isStartNewColumn() {
586:                return startNewColumn;
587:            }
588:
589:            /** Setter for property startNewColumn.
590:             * @param startNewColumn New value of property startNewColumn.
591:             *
592:             */
593:            public void setStartNewColumn(boolean startNewColumn) {
594:                this .startNewColumn = startNewColumn;
595:            }
596:
597:            /** Getter for property startNewPage.
598:             * @return Value of property startNewPage.
599:             *
600:             */
601:            public boolean isStartNewPage() {
602:                return startNewPage;
603:            }
604:
605:            /** Setter for property startNewPage.
606:             * @param startNewPage New value of property startNewPage.
607:             *
608:             */
609:            public void setStartNewPage(boolean startNewPage) {
610:                this .startNewPage = startNewPage;
611:            }
612:
613:            // Variables declaration - do not modify//GEN-BEGIN:variables
614:            private javax.swing.JButton jButtonCancel;
615:            private javax.swing.JButton jButtonOK;
616:            private javax.swing.JCheckBox jCheckBoxPrintHeaderEachPage;
617:            private javax.swing.JCheckBox jCheckBoxResetPageNumber;
618:            private javax.swing.JCheckBox jCheckBoxStartNewColumn;
619:            private javax.swing.JCheckBox jCheckBoxStartNewPage;
620:            private javax.swing.JLabel jLabel1;
621:            private javax.swing.JLabel jLabel3;
622:            private javax.swing.JLabel jLabel5;
623:            private javax.swing.JLabel jLabel6;
624:            private javax.swing.JLabel jLabel7;
625:            private it.businesslogic.ireport.gui.JNumberField jNumberFieldFooterBand;
626:            private it.businesslogic.ireport.gui.JNumberField jNumberFieldHeaderBand;
627:            private it.businesslogic.ireport.gui.JNumberField jNumberFieldMinStartNewPage;
628:            private javax.swing.JPanel jPanel1;
629:            private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionArea;
630:            private javax.swing.JTextField jTextFieldName;
631:            // End of variables declaration//GEN-END:variables
632:
633:            private int dialogResult;
634:
635:            public void applyI18n() {
636:                // Start autogenerated code ----------------------
637:                jCheckBoxPrintHeaderEachPage.setText(I18n.getString(
638:                        "jRGroupDialog.checkBoxPrintHeaderEachPage",
639:                        "Print header on each page"));
640:                jCheckBoxResetPageNumber.setText(I18n.getString(
641:                        "jRGroupDialog.checkBoxResetPageNumber",
642:                        "Reset page number"));
643:                jCheckBoxStartNewColumn.setText(I18n.getString(
644:                        "jRGroupDialog.checkBoxStartNewColumn",
645:                        "Start on a new column"));
646:                jCheckBoxStartNewPage.setText(I18n.getString(
647:                        "jRGroupDialog.checkBoxStartNewPage",
648:                        "Start on a new page"));
649:                // End autogenerated code ----------------------
650:                // Start autogenerated code ----------------------
651:                jButtonCancel.setText(I18n.getString(
652:                        "jRGroupDialog.buttonCancel", "Cancel"));
653:                jButtonOK.setText(I18n
654:                        .getString("jRGroupDialog.buttonOK", "OK"));
655:                jLabel1.setText(I18n.getString("jRGroupDialog.label1",
656:                        "Group name"));
657:                jLabel3.setText(I18n.getString("jRGroupDialog.label3",
658:                        "Group expression"));
659:                jLabel5.setText(I18n.getString("jRGroupDialog.label5",
660:                        "Min height to start new page"));
661:                jLabel6.setText(I18n.getString("jRGroupDialog.label6",
662:                        "Group header band height"));
663:                jLabel7.setText(I18n.getString("jRGroupDialog.label7",
664:                        "Group footer band height"));
665:                // End autogenerated code ----------------------
666:
667:                this .setTitle(I18n.getString("jRGroupDialog.title",
668:                        "Add/modify group"));
669:                jButtonCancel.setMnemonic(I18n.getString(
670:                        "jRGroupDialog.buttonCancelMnemonic", "c").charAt(0));
671:                jButtonOK.setMnemonic(I18n.getString(
672:                        "jRGroupDialog.buttonOKMnemonic", "o").charAt(0));
673:            }
674:
675:            public SubDataset getSubdataset() {
676:                return subdataset;
677:            }
678:
679:            public void setSubdataset(SubDataset subdataset) {
680:                this .subdataset = subdataset;
681:                jRTextExpressionArea.setSubDataset(getSubdataset());
682:            }
683:
684:            public static final int COMPONENT_NONE = 0;
685:            public static final int COMPONENT_GROUP_EXPRESSION = 1;
686:
687:            /**
688:             * This method set the focus on a specific component.
689:             * Valid constants are something like:
690:             * FIELD_XXX
691:             */
692:            public void setFocusedExpression(int expID) {
693:                switch (expID) {
694:                case COMPONENT_GROUP_EXPRESSION:
695:                    Misc.selectTextAndFocusArea(jRTextExpressionArea);
696:                    break;
697:                }
698:
699:            }
700:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.