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

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


0001:        /*
0002:         * Copyright (C) 2005 - 2008 JasperSoft Corporation.  All rights reserved.
0003:         * http://www.jaspersoft.com.
0004:         *
0005:         * Unless you have purchased a commercial license agreement from JasperSoft,
0006:         * the following license terms apply:
0007:         *
0008:         * This program is free software; you can redistribute it and/or modify
0009:         * it under the terms of the GNU General Public License version 2 as published by
0010:         * the Free Software Foundation.
0011:         *
0012:         * This program is distributed WITHOUT ANY WARRANTY; and without the
0013:         * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
0014:         * See the GNU General Public License for more details.
0015:         *
0016:         * You should have received a copy of the GNU General Public License
0017:         * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
0018:         * or write to:
0019:         *
0020:         * Free Software Foundation, Inc.,
0021:         * 59 Temple Place - Suite 330,
0022:         * Boston, MA  USA  02111-1307
0023:         *
0024:         *
0025:         *
0026:         *
0027:         * OptionsDialog.java
0028:         *
0029:         * Created on 1 giugno 2003, 14.22
0030:         *
0031:         */
0032:
0033:        package it.businesslogic.ireport.gui;
0034:
0035:        import it.businesslogic.ireport.ReportElement;
0036:        import it.businesslogic.ireport.gui.sheet.HexColorChooserPanel;
0037:        import it.businesslogic.ireport.util.*;
0038:        import java.awt.Color;
0039:        import java.io.File;
0040:        import javax.swing.*;
0041:        import it.businesslogic.ireport.gui.event.*;
0042:        import it.businesslogic.ireport.gui.sheet.*;
0043:        import java.util.*;
0044:
0045:        import java.util.Locale;
0046:
0047:        /**
0048:         *
0049:         * @author  Administrator
0050:         */
0051:        public class OptionsDialog extends javax.swing.JDialog implements 
0052:                LanguageChangedListener, SheetPropertyValueChangedListener {
0053:
0054:            MainFrame mf = null;
0055:            it.businesslogic.ireport.util.Unit[] units;
0056:            java.util.List listOfLanguages;
0057:            java.util.List listOfPLAF;
0058:
0059:            private CategorySheetPanel categorySheetPanel = null;
0060:
0061:            /** Creates new form OptionsDialog */
0062:            public OptionsDialog(java.awt.Frame parent, boolean modal) {
0063:                super (parent, modal);
0064:                this .mf = (MainFrame) parent;
0065:                initComponents();
0066:                javax.swing.event.DocumentListener listener = new javax.swing.event.DocumentListener() {
0067:                    public void changedUpdate(
0068:                            javax.swing.event.DocumentEvent evt) {
0069:                        enableApplyAndOk();
0070:                    }
0071:
0072:                    public void insertUpdate(javax.swing.event.DocumentEvent evt) {
0073:                        enableApplyAndOk();
0074:                    }
0075:
0076:                    public void removeUpdate(javax.swing.event.DocumentEvent evt) {
0077:                        enableApplyAndOk();
0078:                    }
0079:                };
0080:
0081:                this .jTextFieldBackupDirectory.getDocument()
0082:                        .addDocumentListener(listener);
0083:                this .jTextFieldCSVViewer.getDocument().addDocumentListener(
0084:                        listener);
0085:                this .jTextFieldCompilationDir.getDocument()
0086:                        .addDocumentListener(listener);
0087:                this .jTextFieldEditor.getDocument().addDocumentListener(
0088:                        listener);
0089:                this .jTextFieldHTMLViewer.getDocument().addDocumentListener(
0090:                        listener);
0091:                this .jTextFieldPDFViewer.getDocument().addDocumentListener(
0092:                        listener);
0093:                this .jTextFieldTemplate.getDocument().addDocumentListener(
0094:                        listener);
0095:                this .jTextFieldXLSViewer.getDocument().addDocumentListener(
0096:                        listener);
0097:                this .jTextFieldVirtualizerDir.getDocument()
0098:                        .addDocumentListener(listener);
0099:                this .jTextFieldTXTViewer.getDocument().addDocumentListener(
0100:                        listener);
0101:                this .jTextFieldRTFViewer.getDocument().addDocumentListener(
0102:                        listener);
0103:                this .jTextFieldODFViewer.getDocument().addDocumentListener(
0104:                        listener);
0105:
0106:                jComboBoxVirtualizer.addItem(new Tag("JRFileVirtualizer", I18n
0107:                        .getString("virtualizer.file", "File virtualizer")));
0108:                jComboBoxVirtualizer.addItem(new Tag("JRSwapFileVirtualizer",
0109:                        I18n.getString("virtualizer.swap",
0110:                                "Single swap/file virtualizer")));
0111:                jComboBoxVirtualizer.addItem(new Tag("JRGzipVirtualizer", I18n
0112:                        .getString("virtualizer.gzip",
0113:                                "GZIP in-memory virtualizer")));
0114:
0115:                units = it.businesslogic.ireport.util.Unit.getStandardUnits();
0116:
0117:                jSpinnerVirtualizerSize
0118:                        .setModel(new javax.swing.SpinnerNumberModel(100, 1,
0119:                                100000000, 10));
0120:                jSpinnerVirtualizerBlockSize
0121:                        .setModel(new javax.swing.SpinnerNumberModel(100, 1,
0122:                                100000000, 10));
0123:                jSpinnerVirtualizerGrownCount
0124:                        .setModel(new javax.swing.SpinnerNumberModel(1, 1,
0125:                                100000000, 10));
0126:
0127:                // Apply locale....
0128:                //System.out.println("Apply i18n cc...");
0129:                //applyI18n();
0130:                I18n.addOnLanguageChangedListener(this );
0131:
0132:                categorySheetPanel = new CategorySheetPanel();
0133:                categorySheetPanel.setShowResetButton(false);
0134:
0135:                createSheet();
0136:                applyI18n();
0137:                jPanel8.add("Center", categorySheetPanel);
0138:
0139:                javax.swing.KeyStroke escape = javax.swing.KeyStroke
0140:                        .getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0,
0141:                                false);
0142:                javax.swing.Action escapeAction = new javax.swing.AbstractAction() {
0143:                    public void actionPerformed(java.awt.event.ActionEvent e) {
0144:                        jButtonCancelActionPerformed(e);
0145:                    }
0146:                };
0147:
0148:                getRootPane().getInputMap(
0149:                        javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW).put(
0150:                        escape, "ESCAPE");
0151:                getRootPane().getActionMap().put("ESCAPE", escapeAction);
0152:
0153:                //to make the default button ...
0154:                this .getRootPane().setDefaultButton(this .jButtonOK);
0155:
0156:                pack();
0157:
0158:            }
0159:
0160:            private void createSheet() {
0161:                if (categorySheetPanel == null)
0162:                    return;
0163:                // Adding all properties...
0164:                categorySheetPanel.removeAllProperties();
0165:                String category_name = it.businesslogic.ireport.util.I18n
0166:                        .getString("gui.OptionsDialog.TabGeneral", "General");
0167:                categorySheetPanel
0168:                        .addSheetProperty(
0169:                                category_name,
0170:                                new SheetProperty(
0171:                                        "RecentFilesLength",
0172:                                        it.businesslogic.ireport.util.I18n
0173:                                                .getString(
0174:                                                        "gui.OptionsDialog.LabelRecentFileListLength",
0175:                                                        "Num of recent files in file menu"),
0176:                                        SheetProperty.INTEGER));
0177:                units = it.businesslogic.ireport.util.Unit.getStandardUnits();
0178:                SheetProperty sp = new SheetProperty("DefaultUnit",
0179:                        it.businesslogic.ireport.util.I18n.getString(
0180:                                "gui.OptionsDialog.LabelDefaultUnit",
0181:                                "Default unit"), SheetProperty.COMBOBOX);
0182:                Vector tags = new Vector();
0183:                for (int i = 0; i < units.length; ++i) {
0184:                    Tag t = new Tag(units[i].getKeyName(), units[i] + "");
0185:                    tags.add(t);
0186:                }
0187:                sp.setTags(tags);
0188:                categorySheetPanel.addSheetProperty(category_name, sp);
0189:
0190:                categorySheetPanel.addSheetProperty(category_name,
0191:                        new SheetProperty("showGrid",
0192:                                it.businesslogic.ireport.util.I18n.getString(
0193:                                        "gui.OptionsDialog.LabelViewGrid",
0194:                                        "View grid"), SheetProperty.BOOLEAN));
0195:                categorySheetPanel.addSheetProperty(category_name,
0196:                        new SheetProperty("ViewRules",
0197:                                it.businesslogic.ireport.util.I18n.getString(
0198:                                        "gui.OptionsDialog.LabelViewRules",
0199:                                        "View rules"), SheetProperty.BOOLEAN));
0200:                categorySheetPanel.addSheetProperty(category_name,
0201:                        new SheetProperty("GridSize",
0202:                                it.businesslogic.ireport.util.I18n.getString(
0203:                                        "gui.OptionsDialog.LabelGridSize",
0204:                                        "Grid size"), SheetProperty.INTEGER));
0205:                categorySheetPanel
0206:                        .addSheetProperty(
0207:                                category_name,
0208:                                new SheetProperty(
0209:                                        "ViewBorderForTextElements",
0210:                                        it.businesslogic.ireport.util.I18n
0211:                                                .getString(
0212:                                                        "gui.OptionsDialog.LabelViewBorderForTextElements",
0213:                                                        "View border for text elements"),
0214:                                        SheetProperty.BOOLEAN));
0215:                categorySheetPanel
0216:                        .addSheetProperty(
0217:                                category_name,
0218:                                new SheetProperty(
0219:                                        "NewViewBorderColor",
0220:                                        it.businesslogic.ireport.util.I18n
0221:                                                .getString(
0222:                                                        "gui.OptionsDialog.LabelTextBorderColor",
0223:                                                        "Text border color"),
0224:                                        SheetProperty.COLOR));
0225:                categorySheetPanel.addSheetProperty(category_name,
0226:                        new SheetProperty("Antialias",
0227:                                it.businesslogic.ireport.util.I18n.getString(
0228:                                        "gui.OptionsDialog.LabelAntialias",
0229:                                        "Use antialiasing"),
0230:                                SheetProperty.BOOLEAN));
0231:                categorySheetPanel
0232:                        .addSheetProperty(
0233:                                category_name,
0234:                                new SheetProperty(
0235:                                        "ShowToolTipsInDesign",
0236:                                        it.businesslogic.ireport.util.I18n
0237:                                                .getString(
0238:                                                        "gui.OptionsDialog.LabelShowToolTipsInDesign",
0239:                                                        "Show ToolTips in design"),
0240:                                        SheetProperty.BOOLEAN));
0241:                categorySheetPanel.addSheetProperty(category_name,
0242:                        new SheetProperty("MagneticPower",
0243:                                it.businesslogic.ireport.util.I18n.getString(
0244:                                        "gui.OptionsDialog.magneticPower",
0245:                                        "Magnetic power"),
0246:                                SheetProperty.INTEGER));
0247:                categorySheetPanel.addSheetProperty(category_name,
0248:                        new SheetProperty("RealTimeValidation",
0249:                                it.businesslogic.ireport.util.I18n.getString(
0250:                                        "gui.OptionsDialog.RealTimeValidation",
0251:                                        "Enable real time validation"),
0252:                                SheetProperty.BOOLEAN));
0253:
0254:                categorySheetPanel.addSheetProperty(category_name,
0255:                        new SheetProperty("enableRMIServer",
0256:                                it.businesslogic.ireport.util.I18n.getString(
0257:                                        "gui.OptionsDialog.startRMIServer",
0258:                                        "Enable RMI server"),
0259:                                SheetProperty.BOOLEAN));
0260:                categorySheetPanel.addSheetProperty(category_name,
0261:                        new SheetProperty("RMIServerPort",
0262:                                it.businesslogic.ireport.util.I18n.getString(
0263:                                        "gui.OptionsDialog.RMIServerPort",
0264:                                        "RMI server port"),
0265:                                SheetProperty.INTEGER));
0266:
0267:                SheetProperty sp_language = new SheetProperty("Language",
0268:                        it.businesslogic.ireport.util.I18n.getString(
0269:                                "gui.OptionsDialog.LabelLanguage", "Language"),
0270:                        SheetProperty.COMBOBOX);
0271:                Vector tags_language = new Vector();
0272:
0273:                //Fill choosable Languages and select last selected language
0274:                listOfLanguages = it.businesslogic.ireport.util.I18n
0275:                        .getListOfAvailLanguages();
0276:
0277:                listOfLanguages.add(0, Locale.getDefault());
0278:
0279:                it.businesslogic.ireport.Language languageModel = null;
0280:
0281:                String selectedLanguage = mf.getProperties().getProperty(
0282:                        "Language");
0283:                String selectedCountry = mf.getProperties().getProperty(
0284:                        "Country");
0285:                // => added by RL, june 3, 2005
0286:                String selectedVariant = mf.getProperties().getProperty(
0287:                        "Variant");
0288:                // <=
0289:
0290:                String def_language = "";
0291:                for (int i = 0; i < listOfLanguages.size(); ++i) {
0292:                    Locale lang = (Locale) listOfLanguages.get(i);
0293:                    LocaleAdapter adapter = new LocaleAdapter(lang);
0294:                    Tag t = new Tag("" + adapter);
0295:                    tags_language.add(t);
0296:                    if (lang.getCountry().equals(selectedCountry)
0297:                            && lang.getLanguage().equals(selectedLanguage)
0298:                            && lang.getVariant().equals(selectedVariant)) {
0299:                        def_language = "" + adapter;
0300:                    }
0301:                }
0302:                sp_language.setTags(tags_language);
0303:                if (def_language.length() > 0) {
0304:                    sp_language.setValue(def_language);
0305:                } else {
0306:                    sp_language.setValue(""
0307:                            + new LocaleAdapter(Locale.getDefault()));
0308:                }
0309:                categorySheetPanel.addSheetProperty(category_name, sp_language);
0310:
0311:                //categorySheetPanel.addSheetProperty(category_name, new SheetProperty("UseAutoRegiesterFields",it.businesslogic.ireport.util.I18n.getString("gui.OptionsDialog.LabelAutoRegisterFields","Auto register SQL fields"), SheetProperty.BOOLEAN));
0312:                categorySheetPanel
0313:                        .addSheetProperty(
0314:                                category_name,
0315:                                new SheetProperty(
0316:                                        "EnableTextResizeClick",
0317:                                        it.businesslogic.ireport.util.I18n
0318:                                                .getString(
0319:                                                        "gui.OptionsDialog.LabelEnableTextResizeClick",
0320:                                                        "Enable text fields resize click"),
0321:                                        SheetProperty.BOOLEAN));
0322:                categorySheetPanel
0323:                        .addSheetProperty(
0324:                                category_name,
0325:                                new SheetProperty(
0326:                                        "SynchronizeReportName",
0327:                                        it.businesslogic.ireport.util.I18n
0328:                                                .getString(
0329:                                                        "gui.OptionsDialog.LabelSynchronizeReportName",
0330:                                                        "Synchronize report name with file name"),
0331:                                        SheetProperty.BOOLEAN));
0332:                categorySheetPanel
0333:                        .addSheetProperty(
0334:                                category_name,
0335:                                new SheetProperty(
0336:                                        "AutoReload",
0337:                                        it.businesslogic.ireport.util.I18n
0338:                                                .getString(
0339:                                                        "gui.OptionsDialog.AutoReload",
0340:                                                        "Reload externally modified files without ask"),
0341:                                        SheetProperty.BOOLEAN));
0342:                categorySheetPanel
0343:                        .addSheetProperty(
0344:                                category_name,
0345:                                new SheetProperty(
0346:                                        "AskToSave",
0347:                                        it.businesslogic.ireport.util.I18n
0348:                                                .getString(
0349:                                                        "gui.OptionsDialog.AskToSave",
0350:                                                        "Ask to save modified files before close them"),
0351:                                        SheetProperty.BOOLEAN));
0352:                categorySheetPanel
0353:                        .addSheetProperty(
0354:                                category_name,
0355:                                new SheetProperty(
0356:                                        "showCompatibilityMessage",
0357:                                        it.businesslogic.ireport.util.I18n
0358:                                                .getString(
0359:                                                        "gui.OptionsDialog.LabelShowWarningForCompatibility",
0360:                                                        "Show warning for version compatibility on save"),
0361:                                        SheetProperty.BOOLEAN));
0362:                categorySheetPanel
0363:                        .addSheetProperty(
0364:                                category_name,
0365:                                new SheetProperty(
0366:                                        "showCompatibilityMessageLoad",
0367:                                        it.businesslogic.ireport.util.I18n
0368:                                                .getString(
0369:                                                        "gui.OptionsDialog.LabelShowWarningForCompatibilityLoad",
0370:                                                        "Show warning for version compatibility on load"),
0371:                                        SheetProperty.BOOLEAN));
0372:                categorySheetPanel.addSheetProperty(category_name,
0373:                        new SheetProperty("LoadFontOnStartup",
0374:                                it.businesslogic.ireport.util.I18n.getString(
0375:                                        "gui.OptionsDialog.LoadFontOnStartup",
0376:                                        "Load font files on startup"),
0377:                                SheetProperty.BOOLEAN));
0378:
0379:                categorySheetPanel
0380:                        .addSheetProperty(
0381:                                category_name,
0382:                                new SheetProperty(
0383:                                        "RestoreLayout",
0384:                                        it.businesslogic.ireport.util.I18n
0385:                                                .getString(
0386:                                                        "gui.OptionsDialog.RestoreLayoutOnStartup",
0387:                                                        "Restore layout on startup"),
0388:                                        SheetProperty.BOOLEAN));
0389:
0390:                category_name = it.businesslogic.ireport.util.I18n.getString(
0391:                        "gui.OptionsDialog.ReportDefaults", "Report defaults");
0392:                SheetProperty sp_script_language = new SheetProperty(
0393:                        "DefaultScriptingLanguage",
0394:                        it.businesslogic.ireport.util.I18n.getString(
0395:                                "gui.OptionsDialog.DefaultScriptingLanguage",
0396:                                "Default language for expressions"),
0397:                        SheetProperty.COMBOBOX);
0398:                Vector tags_script_languages = new Vector();
0399:                tags_script_languages.add(new Tag("groovy", "Groovy"));
0400:                tags_script_languages.add(new Tag("java", "Java"));
0401:                sp_script_language.setTags(tags_script_languages);
0402:                categorySheetPanel.addSheetProperty(category_name,
0403:                        sp_script_language);
0404:
0405:                SheetProperty sp_default_style = new SheetProperty(
0406:                        "DefaultStyle", it.businesslogic.ireport.util.I18n
0407:                                .getString("gui.OptionsDialog.DefaultStyle",
0408:                                        "Default style"),
0409:                        SheetProperty.COMBOBOX);
0410:                Vector tags_default_style = new Vector();
0411:                tags_default_style
0412:                        .add(new Tag("", it.businesslogic.ireport.util.I18n
0413:                                .getString(
0414:                                        "gui.OptionsDialog.DefaultStyle.none",
0415:                                        "None")));
0416:                Vector libStyles = MainFrame.getMainInstance()
0417:                        .getStyleLibrarySet();
0418:                for (int i = 0; i < libStyles.size(); ++i) {
0419:                    String styleName = "" + libStyles.get(i);
0420:                    Tag t = new Tag(styleName);
0421:                    tags_default_style.add(t);
0422:                }
0423:                sp_default_style.setTags(tags_default_style);
0424:                categorySheetPanel.addSheetProperty(category_name,
0425:                        sp_default_style);
0426:
0427:                category_name = I18n.getString("optionsDialog.tabLookAndFeel",
0428:                        "LookAndFeel");
0429:
0430:                SheetProperty sp_laf = new SheetProperty("LookAndFeel",
0431:                        it.businesslogic.ireport.util.I18n.getString(
0432:                                "gui.OptionsDialog.LabelLookAndFeel",
0433:                                "Look & Feel"), SheetProperty.COMBOBOX);
0434:                Vector tags_laf = new Vector();
0435:
0436:                listOfPLAF = it.businesslogic.ireport.util.Misc
0437:                        .getAvailablePLAF();
0438:                String selectedPAF = mf.getProperties().getProperty(
0439:                        "LookAndFeel");
0440:                for (int i = 0; i < listOfPLAF.size(); ++i) {
0441:                    String pnf = (String) listOfPLAF.get(i);
0442:                    Tag t = new Tag(pnf + "");
0443:                    tags_laf.add(t);
0444:                }
0445:                sp_laf.setTags(tags_laf);
0446:                sp_laf.setValue(selectedPAF);
0447:
0448:                categorySheetPanel.addSheetProperty(category_name, sp_laf);
0449:
0450:                categorySheetPanel
0451:                        .addSheetProperty(
0452:                                category_name,
0453:                                new SheetProperty(
0454:                                        "overrideDefaultFont",
0455:                                        it.businesslogic.ireport.util.I18n
0456:                                                .getString(
0457:                                                        "gui.OptionsDialog.OverrideDefaultFont",
0458:                                                        "Override default font"),
0459:                                        SheetProperty.BOOLEAN));
0460:                NumberComboBoxSheetProperty spFontSize = null;
0461:                spFontSize = new NumberComboBoxSheetProperty(
0462:                        "overrideDefaultFontSize",
0463:                        it.businesslogic.ireport.util.I18n.getString(
0464:                                "gui.elementpropertiessheet.fontSize",
0465:                                "Font size"));
0466:                spFontSize.addEntry("3", 3);
0467:                spFontSize.addEntry("5", 5);
0468:                spFontSize.addEntry("8", 8);
0469:                spFontSize.addEntry("10", 10);
0470:                spFontSize.addEntry("11", 11);
0471:                spFontSize.addEntry("12", 13);
0472:                spFontSize.addEntry("13", 13);
0473:                spFontSize.addEntry("14", 14);
0474:                spFontSize.addEntry("15", 15);
0475:                spFontSize.addEntry("16", 16);
0476:
0477:                SheetProperty spFontName = new SheetProperty(
0478:                        "overrideDefaultFontName",
0479:                        it.businesslogic.ireport.util.I18n.getString(
0480:                                "gui.elementpropertiessheet.fontName", "Font"),
0481:                        SheetProperty.COMBOBOX);
0482:                Vector fontsVec = new Vector();
0483:                String[] fontFamilies = java.awt.GraphicsEnvironment
0484:                        .getLocalGraphicsEnvironment()
0485:                        .getAvailableFontFamilyNames();
0486:                for (int i = 0; i < fontFamilies.length; ++i) {
0487:                    fontsVec.add(new Tag(fontFamilies[i]));
0488:                }
0489:                spFontName.setTags(fontsVec);
0490:                spFontName.setDefaultValue("Tahoma");
0491:
0492:                categorySheetPanel.addSheetProperty(category_name, spFontName);
0493:                categorySheetPanel.addSheetProperty(category_name, spFontSize);
0494:                categorySheetPanel.addSheetProperty(category_name,
0495:                        new SheetProperty("overrideDefaultFontAttrs",
0496:                                it.businesslogic.ireport.util.I18n.getString(
0497:                                        "gui.elementpropertiessheet.Bold",
0498:                                        "Bold"), SheetProperty.BOOLEAN));
0499:
0500:                categorySheetPanel.setShowResetButton(false);
0501:                categorySheetPanel.recreateSheet();
0502:
0503:                categorySheetPanel.addSheetPropertyValueChangedListener(this );
0504:            }
0505:
0506:            /**
0507:             *
0508:             */
0509:            public void applyI18n() {
0510:                // Start autogenerated code ----------------------
0511:                jCheckBoxDontUseTemplateFromMenu
0512:                        .setText(I18n
0513:                                .getString(
0514:                                        "optionsDialog.checkBoxDontUseTemplateFromMenu",
0515:                                        "Don't use the template when using menu File > New report"));
0516:                jCheckBoxKeepJavaFile.setText(I18n.getString(
0517:                        "optionsDialog.checkBoxKeepJavaFile",
0518:                        "keep .java file (if available)"));
0519:                // End autogenerated code ----------------------
0520:                // Start autogenerated code ----------------------
0521:                jLabel1.setText(I18n.getString("optionsDialog.label1",
0522:                        "Use this virtualizer"));
0523:                jLabelReportVirtualizerMinGrowCount.setText(I18n.getString(
0524:                        "optionsDialog.labelReportVirtualizerMinGrowCount",
0525:                        "Min. grow count"));
0526:                jLabelReportVirtualizerSize1.setText(I18n.getString(
0527:                        "optionsDialog.labelReportVirtualizerSize1",
0528:                        "Block size"));
0529:                // End autogenerated code ----------------------
0530:                // TODO: Set in order of appearance
0531:
0532:                //jMenuFile.setText(it.businesslogic.ireport.util.I18n.getString("file","File"));
0533:                jLabelTemplateForNewDocs
0534:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0535:                                "gui.OptionsDialog.LabelTemplateForNewDocs",
0536:                                "Use this file as template for new documents"));
0537:
0538:                //Compiler
0539:
0540:                //Backup
0541:
0542:                jButtonTemplate.setText(it.businesslogic.ireport.util.I18n
0543:                        .getString("gui.OptionsDialog.Browse", "Browse"));
0544:                jButtonOK.setText(it.businesslogic.ireport.util.I18n.getString(
0545:                        "gui.OptionsDialog.ButtonSave", "Save"));
0546:                jButtonApply.setText(it.businesslogic.ireport.util.I18n
0547:                        .getString("gui.OptionsDialog.ButtonApply", "Apply"));
0548:                jButtonCancel.setText(it.businesslogic.ireport.util.I18n
0549:                        .getString("gui.OptionsDialog.ButtonCancel", "Cancel"));
0550:                jTabbedPane1.setTitleAt(0, it.businesslogic.ireport.util.I18n
0551:                        .getString("gui.OptionsDialog.TabGeneral", "General"));
0552:                jTabbedPane1
0553:                        .setTitleAt(1, it.businesslogic.ireport.util.I18n
0554:                                .getString("gui.OptionsDialog.TabCompiler",
0555:                                        "Compiler"));
0556:                ((javax.swing.border.TitledBorder) jPanelCompileDir.getBorder())
0557:                        .setTitle(it.businesslogic.ireport.util.I18n.getString(
0558:                                "gui.OptionsDialog.DefaultCompileDir",
0559:                                "Default compilation directory"));
0560:                jCheckBoxUseCurrentFilesDirectoryForCompiles
0561:                        .setText(it.businesslogic.ireport.util.I18n
0562:                                .getString(
0563:                                        "gui.OptionsDialog.UseCurrentFilesDirectoryForCompiles",
0564:                                        "Use the reports directory for compiles"));
0565:                jCheckBoxAutosave.setText(it.businesslogic.ireport.util.I18n
0566:                        .getString("gui.OptionsDialog.Autosave",
0567:                                "Autosave before compiling"));
0568:                jButtonCompilationDir
0569:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0570:                                "gui.OptionsDialog.Browse", "Browse"));
0571:                jTabbedPane1.setTitleAt(2, it.businesslogic.ireport.util.I18n
0572:                        .getString("gui.OptionsDialog.TabBackup", "Backup"));
0573:                jTabbedPane1.setTitleAt(3, it.businesslogic.ireport.util.I18n
0574:                        .getString("gui.OptionsDialog.TabExternalPrograms",
0575:                                "External programs"));
0576:                ((javax.swing.border.TitledBorder) jPanel6.getBorder())
0577:                        .setTitle(it.businesslogic.ireport.util.I18n.getString(
0578:                                "gui.OptionsDialog.BackupFilesOnSave",
0579:                                "Backup files on save"));
0580:                jRadioButton1_NoBackup
0581:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0582:                                "gui.OptionsDialog.NoBackup", "No backup"));
0583:                jRadioButton2_ReplaceExtension
0584:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0585:                                "gui.OptionsDialog.ReplaceExtension",
0586:                                "Replace extension with .bak"));
0587:                jRadioButton3_AppendExtension
0588:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0589:                                "gui.OptionsDialog.AppendExtension",
0590:                                "Append .bak to existing extension"));
0591:                jLabelDefaultBackupDir
0592:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0593:                                "gui.OptionsDialog.LabelDefaultBackupDir",
0594:                                "Default backup directory"));
0595:                jButtonBackupDirectory
0596:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0597:                                "gui.OptionsDialog.Browse", "Browse"));
0598:                jButtonBrowseEditor.setText(it.businesslogic.ireport.util.I18n
0599:                        .getString("gui.OptionsDialog.Browse", "Browse"));
0600:                jButtonBrowseEditor1.setText(it.businesslogic.ireport.util.I18n
0601:                        .getString("gui.OptionsDialog.Browse", "Browse"));
0602:                jButtonBrowseEditor2.setText(it.businesslogic.ireport.util.I18n
0603:                        .getString("gui.OptionsDialog.Browse", "Browse"));
0604:                jButtonBrowseEditor3.setText(it.businesslogic.ireport.util.I18n
0605:                        .getString("gui.OptionsDialog.Browse", "Browse"));
0606:                jButtonBrowseEditor4.setText(it.businesslogic.ireport.util.I18n
0607:                        .getString("gui.OptionsDialog.Browse", "Browse"));
0608:                jButtonBrowseEditor5.setText(it.businesslogic.ireport.util.I18n
0609:                        .getString("gui.OptionsDialog.Browse", "Browse"));
0610:                jButtonBrowseEditor6.setText(it.businesslogic.ireport.util.I18n
0611:                        .getString("gui.OptionsDialog.Browse", "Browse"));
0612:                ((javax.swing.border.TitledBorder) jPanelExternalEditor
0613:                        .getBorder())
0614:                        .setTitle(it.businesslogic.ireport.util.I18n.getString(
0615:                                "gui.OptionsDialog.ExternalEditor",
0616:                                "External editor"));
0617:                ((javax.swing.border.TitledBorder) jPanelViewers.getBorder())
0618:                        .setTitle(it.businesslogic.ireport.util.I18n.getString(
0619:                                "gui.OptionsDialog.Viewers", "Viewers"));
0620:
0621:                //External programs
0622:                jLabelPDFViewer
0623:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0624:                                "gui.OptionsDialog.PDFViewer", "PDF Viewer"));
0625:                jLabelCSVViewer
0626:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0627:                                "gui.OptionsDialog.CSVViewer", "CSV Viewer"));
0628:                jLabelHTMLViewer.setText(it.businesslogic.ireport.util.I18n
0629:                        .getString("gui.OptionsDialog.HTMLViewer",
0630:                                "HTML Viewer"));
0631:                jLabelXLSViewer
0632:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0633:                                "gui.OptionsDialog.XLSViewer", "XLS Viewer"));
0634:                jLabelTXTViewer
0635:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0636:                                "gui.OptionsDialog.TXTViewer", "TXT Viewer"));
0637:                jLabelRTFViewer
0638:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0639:                                "gui.OptionsDialog.RTFViewer", "RTF Viewer"));
0640:
0641:                jButtonVirtualizerDirBrowse
0642:                        .setText(it.businesslogic.ireport.util.I18n.getString(
0643:                                "gui.OptionsDialog.Browse", "Browse"));
0644:                jLabelReportVirtualizerDirectory
0645:                        .setText(it.businesslogic.ireport.util.I18n
0646:                                .getString(
0647:                                        "gui.OptionsDialog.ReportVirtualizerDir",
0648:                                        "Directory where the paged out data is to be stored"));
0649:                jLabelReportVirtualizerSize
0650:                        .setText(it.businesslogic.ireport.util.I18n
0651:                                .getString(
0652:                                        "gui.OptionsDialog.ReportVirtualizerSize",
0653:                                        "Maximum size (in JRVirtualizable objects) of the paged in cache"));
0654:
0655:                jTabbedPane1.setTitleAt(0, I18n.getString(
0656:                        "optionsDialog.tab.General", "General"));
0657:                jTabbedPane1.setTitleAt(1, I18n.getString(
0658:                        "optionsDialog.tab.Compiler", "Compiler"));
0659:                jTabbedPane1.setTitleAt(2, I18n.getString(
0660:                        "optionsDialog.tab.Backup", "Backup"));
0661:                jTabbedPane1.setTitleAt(3, I18n.getString(
0662:                        "optionsDialog.tab.ExternalPrograms",
0663:                        "External programs"));
0664:
0665:                ((javax.swing.border.TitledBorder) jPanelCompileDir.getBorder())
0666:                        .setTitle(it.businesslogic.ireport.util.I18n
0667:                                .getString(
0668:                                        "optionsDialog.panelBorder.DefaultCompilationDirectory",
0669:                                        "Default compilation directory"));
0670:                ((javax.swing.border.TitledBorder) jPanelCompileDir1
0671:                        .getBorder())
0672:                        .setTitle(it.businesslogic.ireport.util.I18n.getString(
0673:                                "optionsDialog.panelBorder.Compiler",
0674:                                "Compiler"));
0675:                ((javax.swing.border.TitledBorder) jPanelCompileDir2
0676:                        .getBorder())
0677:                        .setTitle(it.businesslogic.ireport.util.I18n.getString(
0678:                                "optionsDialog.panelBorder.ReportVirtualizer",
0679:                                "Report Virtualizer"));
0680:                ((javax.swing.border.TitledBorder) jPanel7.getBorder())
0681:                        .setTitle(it.businesslogic.ireport.util.I18n.getString(
0682:                                "optionsDialog.panelBorder.SwapFile",
0683:                                "Swap file"));
0684:                ((javax.swing.border.TitledBorder) jPanel6.getBorder())
0685:                        .setTitle(it.businesslogic.ireport.util.I18n.getString(
0686:                                "optionsDialog.panelBorder.BackupFilesOnSave",
0687:                                "Backup files on save"));
0688:                ((javax.swing.border.TitledBorder) jPanelExternalEditor
0689:                        .getBorder())
0690:                        .setTitle(it.businesslogic.ireport.util.I18n.getString(
0691:                                "optionsDialog.panelBorder.ExternalEditor",
0692:                                "External editor"));
0693:                ((javax.swing.border.TitledBorder) jPanelViewers.getBorder())
0694:                        .setTitle(it.businesslogic.ireport.util.I18n.getString(
0695:                                "optionsDialog.panelBorder.Viewers", "Viewers"));
0696:
0697:                createSheet();
0698:                loadConfiguration();
0699:                this .setTitle("iReport - "
0700:                        + it.businesslogic.ireport.util.I18n.getString(
0701:                                "gui.OptionsDialog.title", "Options"));
0702:                this .getRootPane().updateUI();
0703:
0704:            }
0705:
0706:            /**
0707:             *This method populate the frame element according with iReport properties...
0708:             */
0709:            public void loadConfiguration() {
0710:                if (mf == null || mf.getProperties() == null) {
0711:                    return;
0712:                }
0713:                try {
0714:                    this .categorySheetPanel.setPropertyValue("Antialias", Misc
0715:                            .nvl(mf.getProperties().getProperty("Antialias"),
0716:                                    "true"));
0717:                    this .categorySheetPanel
0718:                            .setPropertyValue("RealTimeValidation", Misc.nvl(mf
0719:                                    .getProperties().getProperty(
0720:                                            "RealTimeValidation"), "true"));
0721:
0722:                    this .categorySheetPanel.setPropertyValue(
0723:                            "ShowToolTipsInDesign", Misc.nvl(mf.getProperties()
0724:                                    .getProperty("ShowToolTipsInDesign"),
0725:                                    "false"));
0726:                    this .categorySheetPanel.setPropertyValue("MagneticPower",
0727:                            Misc.nvl(mf.getProperties().getProperty(
0728:                                    "MagneticPower"), "5"));
0729:
0730:                    this .categorySheetPanel.setPropertyValue(
0731:                            "RecentFilesLength", Misc.nvl(mf.getProperties()
0732:                                    .getProperty("RecentFilesLength"), "10"));
0733:                    this .categorySheetPanel.setPropertyValue("DefaultUnit",
0734:                            Misc.nvl(mf.getProperties().getProperty(
0735:                                    "DefaultUnit"), "cm"));
0736:                    this .categorySheetPanel.setPropertyValue("showGrid", Misc
0737:                            .nvl(mf.getProperties().getProperty("showGrid"),
0738:                                    "false"));
0739:                    this .categorySheetPanel.setPropertyValue("ViewRules", Misc
0740:                            .nvl(mf.getProperties().getProperty("ViewRules"),
0741:                                    "true"));
0742:                    this .categorySheetPanel.setPropertyValue(
0743:                            "ViewBorderForTextElements", Misc.nvl(mf
0744:                                    .getProperties().getProperty(
0745:                                            "ViewBorderForTextElements"),
0746:                                    "true"));
0747:
0748:                    this .categorySheetPanel.setPropertyValue("AutoReload", Misc
0749:                            .nvl(mf.getProperties().getProperty("AutoReload"),
0750:                                    "false"));
0751:                    this .categorySheetPanel.setPropertyValue("AskToSave", Misc
0752:                            .nvl(mf.getProperties().getProperty("AskToSave"),
0753:                                    "true"));
0754:                    this .categorySheetPanel.setPropertyValue(
0755:                            "showCompatibilityMessage",
0756:                            Misc.nvl(mf.getProperties().getProperty(
0757:                                    "showCompatibilityMessage"), "true"));
0758:                    this .categorySheetPanel.setPropertyValue(
0759:                            "showCompatibilityMessageLoad", Misc.nvl(mf
0760:                                    .getProperties().getProperty(
0761:                                            "showCompatibilityMessageLoad"),
0762:                                    "true"));
0763:
0764:                    this .categorySheetPanel.setPropertyValue(
0765:                            "LoadFontOnStartup", Misc.nvl(mf.getProperties()
0766:                                    .getProperty("LoadFontOnStartup"), "true"));
0767:
0768:                    this .categorySheetPanel.setPropertyValue("RestoreLayout",
0769:                            Misc.nvl(mf.getProperties().getProperty(
0770:                                    "RestoreLayout"), "true"));
0771:
0772:                    java.awt.Color color = new java.awt.Color(Integer
0773:                            .parseInt(Misc.nvl(mf.getProperties().getProperty(
0774:                                    "NewViewBorderColor"), Color.lightGray
0775:                                    .getRGB()
0776:                                    + "")));
0777:                    String color_str = HexColorChooserPanel
0778:                            .getEncodedColor(color);
0779:                    //"[" + color.getRed() + "," + color.getGreen() + "," +  color.getBlue()+ "]";
0780:                    this .categorySheetPanel.setPropertyValue(
0781:                            "NewViewBorderColor", color_str);
0782:
0783:                    String size = Misc.nvl(mf.getProperties().getProperty(
0784:                            "GridSize"), "10");
0785:                    if (size.equals("null") || size.trim().length() == 0)
0786:                        size = "10";
0787:                    this .categorySheetPanel.setPropertyValue("GridSize", size);
0788:                    //this.categorySheetPanel.setPropertyValue("UseAutoRegiesterFields",  Misc.nvl(mf.getProperties().getProperty("UseAutoRegiesterFields"),"true") );
0789:                    this .categorySheetPanel.setPropertyValue(
0790:                            "EnableTextResizeClick", Misc.nvl(mf
0791:                                    .getProperties().getProperty(
0792:                                            "EnableTextResizeClick"), "true"));
0793:                    this .categorySheetPanel.setPropertyValue(
0794:                            "SynchronizeReportName", Misc.nvl(mf
0795:                                    .getProperties().getProperty(
0796:                                            "SynchronizeReportName"), "true"));
0797:                    this .categorySheetPanel.setPropertyValue(
0798:                            "DefaultScriptingLanguage",
0799:                            Misc.nvl(mf.getProperties().getProperty(
0800:                                    "DefaultScriptingLanguage"), "java"));
0801:                    this .categorySheetPanel.setPropertyValue("DefaultStyle",
0802:                            Misc.nvl(mf.getProperties().getProperty(
0803:                                    "DefaultStyle"), ""));
0804:
0805:                    this .categorySheetPanel.setPropertyValue(
0806:                            "overrideDefaultFont", Misc
0807:                                    .nvl(mf.getProperties().getProperty(
0808:                                            "overrideDefaultFont"), "true"));
0809:                    this .categorySheetPanel.setPropertyValue(
0810:                            "overrideDefaultFontSize", Misc.nvl(mf
0811:                                    .getProperties().getProperty(
0812:                                            "overrideDefaultFontSize", "11"),
0813:                                    "11"));
0814:                    this .categorySheetPanel.setPropertyValue(
0815:                            "overrideDefaultFontName", mf.getProperties()
0816:                                    .getProperty("overrideDefaultFontName",
0817:                                            "Tahoma"));
0818:                    this .categorySheetPanel
0819:                            .setPropertyValue(
0820:                                    "overrideDefaultFontAttrs",
0821:                                    ""
0822:                                            + Misc
0823:                                                    .nvl(
0824:                                                            mf
0825:                                                                    .getProperties()
0826:                                                                    .getProperty(
0827:                                                                            "overrideDefaultFontAttrs"),
0828:                                                            "0").equals("1"));
0829:
0830:                    this .jTextFieldTemplate.setText(Misc.nvl(mf.getProperties()
0831:                            .getProperty("DefaultTemplate"), ""));
0832:
0833:                    this .categorySheetPanel.setPropertyValue("enableRMIServer",
0834:                            Misc.nvl(mf.getProperties().getProperty(
0835:                                    "enableRMIServer"), "false"));
0836:                    this .categorySheetPanel.setPropertyValue("RMIServerPort",
0837:                            Misc.nvl(mf.getProperties().getProperty(
0838:                                    "RMIServerPort"), "2100"));
0839:
0840:                    // Compiler
0841:                    this .jTextFieldCompilationDir.setText(mf
0842:                            .getDefaultCompilationDirectory());
0843:                    this .jCheckBoxUseCurrentFilesDirectoryForCompiles
0844:                            .setSelected(mf
0845:                                    .isUsingCurrentFilesDirectoryForCompiles());
0846:                    this .jCheckBoxAutosave.setSelected(Misc.nvl(
0847:                            mf.getProperties().getProperty(
0848:                                    "SaveBeforeCompiling"), "true").equals(
0849:                            "true"));
0850:                    this .jComboBox1.setSelectedIndex(Integer.parseInt(Misc.nvl(
0851:                            mf.getProperties().getProperty("DefaultCompiler"),
0852:                            "0")));
0853:                    this .jCheckBoxKeepJavaFile.setSelected(Misc.nvl(
0854:                            mf.getProperties().getProperty("KeepJavaFile"),
0855:                            "true").equals("true"));
0856:
0857:                    // Backup
0858:                    this .jTextFieldBackupDirectory.setText(Misc.nvl(mf
0859:                            .getProperties().getProperty(
0860:                                    "DefaultBackupDirectory"), ""));
0861:                    this .jRadioButton1_NoBackup.setSelected(Misc
0862:                            .nvl(
0863:                                    mf.getProperties().getProperty(
0864:                                            "BackupPolicy"), "3").equals("1"));
0865:                    this .jRadioButton2_ReplaceExtension.setSelected(Misc
0866:                            .nvl(
0867:                                    mf.getProperties().getProperty(
0868:                                            "BackupPolicy"), "3").equals("2"));
0869:                    this .jRadioButton3_AppendExtension.setSelected(Misc
0870:                            .nvl(
0871:                                    mf.getProperties().getProperty(
0872:                                            "BackupPolicy"), "3").equals("3"));
0873:                    if (mf.isUsingCurrentFilesDirectoryForCompiles()) {
0874:                        this .disableCompileDirectoryBrowse();
0875:                    }
0876:
0877:                    // External programs
0878:                    this .jTextFieldEditor.setText(Misc.nvl(mf.getProperties()
0879:                            .getProperty("ExternalEditor"), ""));
0880:                    this .jTextFieldPDFViewer.setText(Misc.nvl(mf
0881:                            .getProperties().getProperty("ExternalPDFViewer"),
0882:                            ""));
0883:                    this .jTextFieldHTMLViewer.setText(Misc.nvl(mf
0884:                            .getProperties().getProperty("ExternalHTMLViewer"),
0885:                            ""));
0886:                    this .jTextFieldXLSViewer.setText(Misc.nvl(mf
0887:                            .getProperties().getProperty("ExternalXLSViewer"),
0888:                            ""));
0889:                    this .jTextFieldCSVViewer.setText(Misc.nvl(mf
0890:                            .getProperties().getProperty("ExternalCSVViewer"),
0891:                            ""));
0892:                    this .jTextFieldTXTViewer.setText(Misc.nvl(mf
0893:                            .getProperties().getProperty("ExternalTXTViewer"),
0894:                            ""));
0895:                    this .jTextFieldRTFViewer.setText(Misc.nvl(mf
0896:                            .getProperties().getProperty("ExternalRTFViewer"),
0897:                            ""));
0898:                    this .jTextFieldODFViewer.setText(Misc.nvl(mf
0899:                            .getProperties().getProperty("ExternalODFViewer"),
0900:                            ""));
0901:
0902:                    this .jTextFieldVirtualizerDir.setText(mf.getProperties()
0903:                            .getProperty("ReportVirtualizerDirectory",
0904:                                    mf.getDefaultCompilationDirectory()));
0905:                    this .jSpinnerVirtualizerSize.setValue(new Integer(mf
0906:                            .getProperties().getProperty(
0907:                                    "ReportVirtualizerSize", "100")));
0908:                    Misc.setComboboxSelectedTagValue(jComboBoxVirtualizer, mf
0909:                            .getProperties().getProperty("ReportVirtualizer",
0910:                                    "JRFileVirtualizer"));
0911:                    this .jSpinnerVirtualizerBlockSize.setValue(new Integer(mf
0912:                            .getProperties().getProperty(
0913:                                    "ReportVirtualizerBlockSize", "100")));
0914:                    this .jSpinnerVirtualizerGrownCount.setValue(new Integer(mf
0915:                            .getProperties().getProperty(
0916:                                    "ReportVirtualizerMinGrownCount", "100")));
0917:
0918:                    this .jCheckBoxDontUseTemplateFromMenu.setSelected(Misc.nvl(
0919:                            mf.getProperties().getProperty(
0920:                                    "DontUseTemplateFromMenu"), "true").equals(
0921:                            "true"));
0922:
0923:                    //this.jCheckBoxUseMultiLineScripts.setSelected( mf.isUsingMultiLineExpressions() );
0924:                    //         this.jComboBoxLanguage.setSelectedItem( it.businesslogic.ireport.util.I18n.getLanguage(mf.getProperties().getProperty("Language")) );
0925:
0926:                } catch (Exception ex) {
0927:                    ex.printStackTrace();
0928:                }
0929:
0930:                this .disableApplyAndOk();
0931:                pack();
0932:            }
0933:
0934:            /** This method is called from within the constructor to
0935:             * initialize the form.
0936:             * WARNING: Do NOT modify this code. The content of this method is
0937:             * always regenerated by the Form Editor.
0938:             */
0939:            // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
0940:            private void initComponents() {
0941:                java.awt.GridBagConstraints gridBagConstraints;
0942:
0943:                buttonGroup1 = new javax.swing.ButtonGroup();
0944:                jTabbedPane1 = new javax.swing.JTabbedPane();
0945:                jPanelGeneral = new javax.swing.JPanel();
0946:                jPanel8 = new javax.swing.JPanel();
0947:                jPanel2 = new javax.swing.JPanel();
0948:                jLabelTemplateForNewDocs = new javax.swing.JLabel();
0949:                jTextFieldTemplate = new javax.swing.JTextField();
0950:                jButtonTemplate = new javax.swing.JButton();
0951:                jCheckBoxDontUseTemplateFromMenu = new javax.swing.JCheckBox();
0952:                jPanelComper = new javax.swing.JPanel();
0953:                jPanelCompileDir = new javax.swing.JPanel();
0954:                jTextFieldCompilationDir = new javax.swing.JTextField();
0955:                jButtonCompilationDir = new javax.swing.JButton();
0956:                jCheckBoxAutosave = new javax.swing.JCheckBox();
0957:                jCheckBoxUseCurrentFilesDirectoryForCompiles = new javax.swing.JCheckBox();
0958:                jCheckBoxKeepJavaFile = new javax.swing.JCheckBox();
0959:                jPanelCompileDir1 = new javax.swing.JPanel();
0960:                jComboBox1 = new javax.swing.JComboBox();
0961:                jPanelCompileDir2 = new javax.swing.JPanel();
0962:                jLabel1 = new javax.swing.JLabel();
0963:                jComboBoxVirtualizer = new javax.swing.JComboBox();
0964:                jPanel4 = new javax.swing.JPanel();
0965:                jLabelReportVirtualizerDirectory = new javax.swing.JLabel();
0966:                jTextFieldVirtualizerDir = new javax.swing.JTextField();
0967:                jButtonVirtualizerDirBrowse = new javax.swing.JButton();
0968:                jLabelReportVirtualizerSize = new javax.swing.JLabel();
0969:                jSpinnerVirtualizerSize = new javax.swing.JSpinner();
0970:                jPanel7 = new javax.swing.JPanel();
0971:                jLabelReportVirtualizerSize1 = new javax.swing.JLabel();
0972:                jSpinnerVirtualizerBlockSize = new javax.swing.JSpinner();
0973:                jLabelReportVirtualizerMinGrowCount = new javax.swing.JLabel();
0974:                jSpinnerVirtualizerGrownCount = new javax.swing.JSpinner();
0975:                jPanel3 = new javax.swing.JPanel();
0976:                jPanelBackup = new javax.swing.JPanel();
0977:                jPanel6 = new javax.swing.JPanel();
0978:                jTextFieldBackupDirectory = new javax.swing.JTextField();
0979:                jButtonBackupDirectory = new javax.swing.JButton();
0980:                jRadioButton1_NoBackup = new javax.swing.JRadioButton();
0981:                jRadioButton2_ReplaceExtension = new javax.swing.JRadioButton();
0982:                jRadioButton3_AppendExtension = new javax.swing.JRadioButton();
0983:                jLabelDefaultBackupDir = new javax.swing.JLabel();
0984:                jPanelExternalPrograms = new javax.swing.JPanel();
0985:                jPanelExternalEditor = new javax.swing.JPanel();
0986:                jTextFieldEditor = new javax.swing.JTextField();
0987:                jButtonBrowseEditor = new javax.swing.JButton();
0988:                jPanelViewers = new javax.swing.JPanel();
0989:                jTextFieldPDFViewer = new javax.swing.JTextField();
0990:                jButtonBrowseEditor1 = new javax.swing.JButton();
0991:                jTextFieldHTMLViewer = new javax.swing.JTextField();
0992:                jButtonBrowseEditor2 = new javax.swing.JButton();
0993:                jTextFieldXLSViewer = new javax.swing.JTextField();
0994:                jButtonBrowseEditor3 = new javax.swing.JButton();
0995:                jLabelPDFViewer = new javax.swing.JLabel();
0996:                jLabelHTMLViewer = new javax.swing.JLabel();
0997:                jLabelXLSViewer = new javax.swing.JLabel();
0998:                jLabelCSVViewer = new javax.swing.JLabel();
0999:                jTextFieldCSVViewer = new javax.swing.JTextField();
1000:                jButtonBrowseEditor4 = new javax.swing.JButton();
1001:                jLabelTXTViewer = new javax.swing.JLabel();
1002:                jTextFieldTXTViewer = new javax.swing.JTextField();
1003:                jButtonBrowseEditor5 = new javax.swing.JButton();
1004:                jLabelRTFViewer = new javax.swing.JLabel();
1005:                jTextFieldRTFViewer = new javax.swing.JTextField();
1006:                jButtonBrowseEditor6 = new javax.swing.JButton();
1007:                jLabelODFViewer = new javax.swing.JLabel();
1008:                jTextFieldODFViewer = new javax.swing.JTextField();
1009:                jButtonBrowseEditor7 = new javax.swing.JButton();
1010:                jPanel1 = new javax.swing.JPanel();
1011:                jButtonOK = new javax.swing.JButton();
1012:                jButtonApply = new javax.swing.JButton();
1013:                jButtonCancel = new javax.swing.JButton();
1014:
1015:                setTitle("iReport Options");
1016:                addWindowListener(new java.awt.event.WindowAdapter() {
1017:                    public void windowClosing(java.awt.event.WindowEvent evt) {
1018:                        closeDialog(evt);
1019:                    }
1020:                });
1021:
1022:                jTabbedPane1.setMinimumSize(new java.awt.Dimension(332, 430));
1023:                jTabbedPane1.setPreferredSize(new java.awt.Dimension(505, 430));
1024:                jPanelGeneral.setLayout(new java.awt.BorderLayout());
1025:
1026:                jPanel8.setLayout(new java.awt.BorderLayout());
1027:
1028:                jPanel8.setMinimumSize(new java.awt.Dimension(250, 325));
1029:                jPanel8.setPreferredSize(new java.awt.Dimension(500, 330));
1030:                jPanelGeneral.add(jPanel8, java.awt.BorderLayout.CENTER);
1031:
1032:                jPanel2.setLayout(new java.awt.GridBagLayout());
1033:
1034:                jLabelTemplateForNewDocs
1035:                        .setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
1036:                jLabelTemplateForNewDocs
1037:                        .setText("Use this file as template for new documents");
1038:                gridBagConstraints = new java.awt.GridBagConstraints();
1039:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1040:                gridBagConstraints.insets = new java.awt.Insets(0, 7, 0, 0);
1041:                jPanel2.add(jLabelTemplateForNewDocs, gridBagConstraints);
1042:
1043:                jTextFieldTemplate
1044:                        .addActionListener(new java.awt.event.ActionListener() {
1045:                            public void actionPerformed(
1046:                                    java.awt.event.ActionEvent evt) {
1047:                                jTextFieldTemplateActionPerformed(evt);
1048:                            }
1049:                        });
1050:                jTextFieldTemplate
1051:                        .addInputMethodListener(new java.awt.event.InputMethodListener() {
1052:                            public void caretPositionChanged(
1053:                                    java.awt.event.InputMethodEvent evt) {
1054:                            }
1055:
1056:                            public void inputMethodTextChanged(
1057:                                    java.awt.event.InputMethodEvent evt) {
1058:                                jTextFieldTemplateInputMethodTextChanged(evt);
1059:                            }
1060:                        });
1061:
1062:                gridBagConstraints = new java.awt.GridBagConstraints();
1063:                gridBagConstraints.gridx = 0;
1064:                gridBagConstraints.gridy = 1;
1065:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1066:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1067:                gridBagConstraints.weightx = 1000.0;
1068:                gridBagConstraints.insets = new java.awt.Insets(0, 7, 3, 0);
1069:                jPanel2.add(jTextFieldTemplate, gridBagConstraints);
1070:
1071:                jButtonTemplate.setText("Browse");
1072:                jButtonTemplate.setMargin(new java.awt.Insets(2, 2, 2, 2));
1073:                jButtonTemplate
1074:                        .addActionListener(new java.awt.event.ActionListener() {
1075:                            public void actionPerformed(
1076:                                    java.awt.event.ActionEvent evt) {
1077:                                jButtonTemplateActionPerformed(evt);
1078:                            }
1079:                        });
1080:
1081:                gridBagConstraints = new java.awt.GridBagConstraints();
1082:                gridBagConstraints.gridx = 1;
1083:                gridBagConstraints.gridy = 1;
1084:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1085:                gridBagConstraints.weightx = 1.0;
1086:                gridBagConstraints.weighty = 1.0;
1087:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 3, 6);
1088:                jPanel2.add(jButtonTemplate, gridBagConstraints);
1089:
1090:                jCheckBoxDontUseTemplateFromMenu
1091:                        .setText("Don't use the template when using menu File > New report");
1092:                jCheckBoxDontUseTemplateFromMenu
1093:                        .setBorder(javax.swing.BorderFactory.createEmptyBorder(
1094:                                0, 0, 0, 0));
1095:                jCheckBoxDontUseTemplateFromMenu.setMargin(new java.awt.Insets(
1096:                        0, 0, 0, 0));
1097:                jCheckBoxDontUseTemplateFromMenu
1098:                        .addActionListener(new java.awt.event.ActionListener() {
1099:                            public void actionPerformed(
1100:                                    java.awt.event.ActionEvent evt) {
1101:                                jCheckBoxDontUseTemplateFromMenuActionPerformed(evt);
1102:                            }
1103:                        });
1104:
1105:                gridBagConstraints = new java.awt.GridBagConstraints();
1106:                gridBagConstraints.gridx = 0;
1107:                gridBagConstraints.gridwidth = 2;
1108:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1109:                gridBagConstraints.insets = new java.awt.Insets(0, 8, 4, 8);
1110:                jPanel2.add(jCheckBoxDontUseTemplateFromMenu,
1111:                        gridBagConstraints);
1112:
1113:                jPanelGeneral.add(jPanel2, java.awt.BorderLayout.SOUTH);
1114:
1115:                jTabbedPane1.addTab("General", jPanelGeneral);
1116:
1117:                jPanelComper.setLayout(new java.awt.GridBagLayout());
1118:
1119:                jPanelCompileDir.setLayout(new java.awt.GridBagLayout());
1120:
1121:                jPanelCompileDir.setBorder(javax.swing.BorderFactory
1122:                        .createTitledBorder(javax.swing.BorderFactory
1123:                                .createEtchedBorder(),
1124:                                "Default compilation directory"));
1125:                gridBagConstraints = new java.awt.GridBagConstraints();
1126:                gridBagConstraints.gridx = 0;
1127:                gridBagConstraints.gridy = 0;
1128:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1129:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1130:                gridBagConstraints.weightx = 1000.0;
1131:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1132:                jPanelCompileDir.add(jTextFieldCompilationDir,
1133:                        gridBagConstraints);
1134:
1135:                jButtonCompilationDir.setText("Browse");
1136:                jButtonCompilationDir
1137:                        .setMargin(new java.awt.Insets(2, 2, 2, 2));
1138:                jButtonCompilationDir
1139:                        .addActionListener(new java.awt.event.ActionListener() {
1140:                            public void actionPerformed(
1141:                                    java.awt.event.ActionEvent evt) {
1142:                                jButtonCompilationDirActionPerformed(evt);
1143:                            }
1144:                        });
1145:
1146:                gridBagConstraints = new java.awt.GridBagConstraints();
1147:                gridBagConstraints.gridx = 1;
1148:                gridBagConstraints.gridy = 0;
1149:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1150:                gridBagConstraints.weightx = 1.0;
1151:                gridBagConstraints.weighty = 1.0;
1152:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1153:                jPanelCompileDir.add(jButtonCompilationDir, gridBagConstraints);
1154:
1155:                gridBagConstraints = new java.awt.GridBagConstraints();
1156:                gridBagConstraints.gridx = 0;
1157:                gridBagConstraints.gridy = 0;
1158:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1159:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1160:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
1161:                jPanelComper.add(jPanelCompileDir, gridBagConstraints);
1162:
1163:                jCheckBoxAutosave.setText("Autosave before compiling");
1164:                jCheckBoxAutosave
1165:                        .addActionListener(new java.awt.event.ActionListener() {
1166:                            public void actionPerformed(
1167:                                    java.awt.event.ActionEvent evt) {
1168:                                jCheckBoxAutosaveActionPerformed(evt);
1169:                            }
1170:                        });
1171:
1172:                gridBagConstraints = new java.awt.GridBagConstraints();
1173:                gridBagConstraints.gridx = 0;
1174:                gridBagConstraints.gridy = 2;
1175:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1176:                gridBagConstraints.weightx = 1.0;
1177:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 3, 3);
1178:                jPanelComper.add(jCheckBoxAutosave, gridBagConstraints);
1179:
1180:                jCheckBoxUseCurrentFilesDirectoryForCompiles
1181:                        .setText("Use the reports directory for compiles");
1182:                jCheckBoxUseCurrentFilesDirectoryForCompiles
1183:                        .addActionListener(new java.awt.event.ActionListener() {
1184:                            public void actionPerformed(
1185:                                    java.awt.event.ActionEvent evt) {
1186:                                jCheckBoxUseCurrentFilesDirectoryForCompilesActionPerformed(evt);
1187:                            }
1188:                        });
1189:
1190:                gridBagConstraints = new java.awt.GridBagConstraints();
1191:                gridBagConstraints.gridx = 0;
1192:                gridBagConstraints.gridy = 1;
1193:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1194:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 0, 3);
1195:                jPanelComper.add(jCheckBoxUseCurrentFilesDirectoryForCompiles,
1196:                        gridBagConstraints);
1197:
1198:                jCheckBoxKeepJavaFile.setSelected(true);
1199:                jCheckBoxKeepJavaFile.setText("keep .java file (if available)");
1200:                jCheckBoxKeepJavaFile
1201:                        .addActionListener(new java.awt.event.ActionListener() {
1202:                            public void actionPerformed(
1203:                                    java.awt.event.ActionEvent evt) {
1204:                                jCheckBoxKeepJavaFileActionPerformed(evt);
1205:                            }
1206:                        });
1207:
1208:                gridBagConstraints = new java.awt.GridBagConstraints();
1209:                gridBagConstraints.gridx = 0;
1210:                gridBagConstraints.gridy = 4;
1211:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1212:                gridBagConstraints.weightx = 1.0;
1213:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 3, 3);
1214:                jPanelComper.add(jCheckBoxKeepJavaFile, gridBagConstraints);
1215:
1216:                jPanelCompileDir1.setLayout(new java.awt.GridBagLayout());
1217:
1218:                jPanelCompileDir1.setBorder(javax.swing.BorderFactory
1219:                        .createTitledBorder(javax.swing.BorderFactory
1220:                                .createEtchedBorder(), "Compiler"));
1221:                jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(
1222:                        new String[] { "JasperReports default",
1223:                                "Java Compiler (need tools.jar)",
1224:                                "JDT Compiler  (need jdt-compiler.jar)",
1225:                                "Bean shell compiler (need bsh-1.3.0.jar)",
1226:                                "Jikes compiler (need jikes command)" }));
1227:                jComboBox1
1228:                        .addActionListener(new java.awt.event.ActionListener() {
1229:                            public void actionPerformed(
1230:                                    java.awt.event.ActionEvent evt) {
1231:                                jComboBox1ActionPerformed(evt);
1232:                            }
1233:                        });
1234:
1235:                gridBagConstraints = new java.awt.GridBagConstraints();
1236:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1237:                gridBagConstraints.weightx = 1.0;
1238:                jPanelCompileDir1.add(jComboBox1, gridBagConstraints);
1239:
1240:                gridBagConstraints = new java.awt.GridBagConstraints();
1241:                gridBagConstraints.gridx = 0;
1242:                gridBagConstraints.gridy = 3;
1243:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1244:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1245:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
1246:                jPanelComper.add(jPanelCompileDir1, gridBagConstraints);
1247:
1248:                jPanelCompileDir2.setLayout(new java.awt.GridBagLayout());
1249:
1250:                jPanelCompileDir2.setBorder(javax.swing.BorderFactory
1251:                        .createTitledBorder(javax.swing.BorderFactory
1252:                                .createEtchedBorder(), "Report Virtualizer"));
1253:                jLabel1.setText("Use this virtualizer");
1254:                gridBagConstraints = new java.awt.GridBagConstraints();
1255:                gridBagConstraints.gridx = 0;
1256:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1257:                gridBagConstraints.weightx = 1.0;
1258:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1259:                jPanelCompileDir2.add(jLabel1, gridBagConstraints);
1260:
1261:                jComboBoxVirtualizer
1262:                        .addActionListener(new java.awt.event.ActionListener() {
1263:                            public void actionPerformed(
1264:                                    java.awt.event.ActionEvent evt) {
1265:                                jComboBoxVirtualizerActionPerformed(evt);
1266:                            }
1267:                        });
1268:
1269:                gridBagConstraints = new java.awt.GridBagConstraints();
1270:                gridBagConstraints.gridx = 0;
1271:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1272:                gridBagConstraints.weightx = 1.0;
1273:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 8, 3);
1274:                jPanelCompileDir2.add(jComboBoxVirtualizer, gridBagConstraints);
1275:
1276:                jPanel4.setLayout(new java.awt.GridBagLayout());
1277:
1278:                jLabelReportVirtualizerDirectory
1279:                        .setText("Directory where the paged out data is to be stored");
1280:                gridBagConstraints = new java.awt.GridBagConstraints();
1281:                gridBagConstraints.gridx = 0;
1282:                gridBagConstraints.gridy = 0;
1283:                gridBagConstraints.gridwidth = 2;
1284:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1285:                gridBagConstraints.insets = new java.awt.Insets(0, 4, 0, 4);
1286:                jPanel4.add(jLabelReportVirtualizerDirectory,
1287:                        gridBagConstraints);
1288:
1289:                jTextFieldVirtualizerDir
1290:                        .addActionListener(new java.awt.event.ActionListener() {
1291:                            public void actionPerformed(
1292:                                    java.awt.event.ActionEvent evt) {
1293:                                jTextFieldVirtualizerDirActionPerformed(evt);
1294:                            }
1295:                        });
1296:
1297:                gridBagConstraints = new java.awt.GridBagConstraints();
1298:                gridBagConstraints.gridx = 0;
1299:                gridBagConstraints.gridy = 1;
1300:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1301:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1302:                gridBagConstraints.weightx = 1000.0;
1303:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1304:                jPanel4.add(jTextFieldVirtualizerDir, gridBagConstraints);
1305:
1306:                jButtonVirtualizerDirBrowse.setText("Browse");
1307:                jButtonVirtualizerDirBrowse.setMargin(new java.awt.Insets(2, 2,
1308:                        2, 2));
1309:                jButtonVirtualizerDirBrowse
1310:                        .addActionListener(new java.awt.event.ActionListener() {
1311:                            public void actionPerformed(
1312:                                    java.awt.event.ActionEvent evt) {
1313:                                jButtonVirtualizerDirBrowseActionPerformed(evt);
1314:                            }
1315:                        });
1316:
1317:                gridBagConstraints = new java.awt.GridBagConstraints();
1318:                gridBagConstraints.gridx = 1;
1319:                gridBagConstraints.gridy = 1;
1320:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1321:                gridBagConstraints.weightx = 1.0;
1322:                gridBagConstraints.weighty = 1.0;
1323:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1324:                jPanel4.add(jButtonVirtualizerDirBrowse, gridBagConstraints);
1325:
1326:                jLabelReportVirtualizerSize
1327:                        .setText("Maximum size (in JRVirtualizable objects) of the paged in cache");
1328:                gridBagConstraints = new java.awt.GridBagConstraints();
1329:                gridBagConstraints.gridx = 0;
1330:                gridBagConstraints.gridy = 3;
1331:                gridBagConstraints.gridwidth = 2;
1332:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1333:                gridBagConstraints.insets = new java.awt.Insets(2, 4, 0, 4);
1334:                jPanel4.add(jLabelReportVirtualizerSize, gridBagConstraints);
1335:
1336:                jSpinnerVirtualizerSize.setMinimumSize(new java.awt.Dimension(
1337:                        127, 20));
1338:                jSpinnerVirtualizerSize
1339:                        .setPreferredSize(new java.awt.Dimension(127, 20));
1340:                jSpinnerVirtualizerSize
1341:                        .addChangeListener(new javax.swing.event.ChangeListener() {
1342:                            public void stateChanged(
1343:                                    javax.swing.event.ChangeEvent evt) {
1344:                                jSpinnerVirtualizerSizeStateChanged(evt);
1345:                            }
1346:                        });
1347:
1348:                gridBagConstraints = new java.awt.GridBagConstraints();
1349:                gridBagConstraints.gridy = 4;
1350:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1351:                gridBagConstraints.insets = new java.awt.Insets(0, 4, 0, 0);
1352:                jPanel4.add(jSpinnerVirtualizerSize, gridBagConstraints);
1353:
1354:                gridBagConstraints = new java.awt.GridBagConstraints();
1355:                gridBagConstraints.gridx = 0;
1356:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1357:                gridBagConstraints.weightx = 1.0;
1358:                gridBagConstraints.weighty = 1.0;
1359:                jPanelCompileDir2.add(jPanel4, gridBagConstraints);
1360:
1361:                jPanel7.setLayout(new java.awt.GridBagLayout());
1362:
1363:                jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(
1364:                        javax.swing.BorderFactory.createEtchedBorder(),
1365:                        "Swap file"));
1366:                jLabelReportVirtualizerSize1.setText("Block size");
1367:                gridBagConstraints = new java.awt.GridBagConstraints();
1368:                gridBagConstraints.gridx = 0;
1369:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1370:                gridBagConstraints.weightx = 0.5;
1371:                gridBagConstraints.insets = new java.awt.Insets(0, 4, 0, 4);
1372:                jPanel7.add(jLabelReportVirtualizerSize1, gridBagConstraints);
1373:
1374:                jSpinnerVirtualizerBlockSize
1375:                        .setMinimumSize(new java.awt.Dimension(127, 20));
1376:                jSpinnerVirtualizerBlockSize
1377:                        .setPreferredSize(new java.awt.Dimension(127, 20));
1378:                jSpinnerVirtualizerBlockSize
1379:                        .addChangeListener(new javax.swing.event.ChangeListener() {
1380:                            public void stateChanged(
1381:                                    javax.swing.event.ChangeEvent evt) {
1382:                                jSpinnerVirtualizerSizeStateChanged2(evt);
1383:                            }
1384:                        });
1385:
1386:                gridBagConstraints = new java.awt.GridBagConstraints();
1387:                gridBagConstraints.gridx = 0;
1388:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1389:                gridBagConstraints.weightx = 0.5;
1390:                gridBagConstraints.insets = new java.awt.Insets(0, 4, 0, 0);
1391:                jPanel7.add(jSpinnerVirtualizerBlockSize, gridBagConstraints);
1392:
1393:                jLabelReportVirtualizerMinGrowCount.setText("Min. grow count");
1394:                gridBagConstraints = new java.awt.GridBagConstraints();
1395:                gridBagConstraints.gridx = 1;
1396:                gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
1397:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1398:                gridBagConstraints.weightx = 0.5;
1399:                gridBagConstraints.insets = new java.awt.Insets(0, 4, 0, 4);
1400:                jPanel7.add(jLabelReportVirtualizerMinGrowCount,
1401:                        gridBagConstraints);
1402:
1403:                jSpinnerVirtualizerGrownCount
1404:                        .setMinimumSize(new java.awt.Dimension(127, 20));
1405:                jSpinnerVirtualizerGrownCount
1406:                        .setPreferredSize(new java.awt.Dimension(127, 20));
1407:                jSpinnerVirtualizerGrownCount
1408:                        .addChangeListener(new javax.swing.event.ChangeListener() {
1409:                            public void stateChanged(
1410:                                    javax.swing.event.ChangeEvent evt) {
1411:                                jSpinnerVirtualizerSize1jSpinnerVirtualizerSizeStateChanged2(evt);
1412:                            }
1413:                        });
1414:
1415:                gridBagConstraints = new java.awt.GridBagConstraints();
1416:                gridBagConstraints.gridx = 1;
1417:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1418:                gridBagConstraints.weightx = 0.5;
1419:                gridBagConstraints.insets = new java.awt.Insets(0, 4, 0, 0);
1420:                jPanel7.add(jSpinnerVirtualizerGrownCount, gridBagConstraints);
1421:
1422:                gridBagConstraints = new java.awt.GridBagConstraints();
1423:                gridBagConstraints.gridx = 0;
1424:                gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1425:                gridBagConstraints.weightx = 1.0;
1426:                gridBagConstraints.weighty = 1.0;
1427:                gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
1428:                jPanelCompileDir2.add(jPanel7, gridBagConstraints);
1429:
1430:                gridBagConstraints = new java.awt.GridBagConstraints();
1431:                gridBagConstraints.gridx = 0;
1432:                gridBagConstraints.gridy = 5;
1433:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1434:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1435:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
1436:                jPanelComper.add(jPanelCompileDir2, gridBagConstraints);
1437:
1438:                gridBagConstraints = new java.awt.GridBagConstraints();
1439:                gridBagConstraints.gridy = 99;
1440:                gridBagConstraints.weighty = 1.0;
1441:                jPanelComper.add(jPanel3, gridBagConstraints);
1442:
1443:                jTabbedPane1.addTab("Compiler", jPanelComper);
1444:
1445:                jPanelBackup.setLayout(new java.awt.GridBagLayout());
1446:
1447:                jPanel6.setLayout(new java.awt.GridBagLayout());
1448:
1449:                jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(
1450:                        javax.swing.BorderFactory.createEtchedBorder(),
1451:                        "Backup files on save"));
1452:                gridBagConstraints = new java.awt.GridBagConstraints();
1453:                gridBagConstraints.gridx = 0;
1454:                gridBagConstraints.gridy = 4;
1455:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1456:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1457:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
1458:                jPanel6.add(jTextFieldBackupDirectory, gridBagConstraints);
1459:
1460:                jButtonBackupDirectory.setText("Browse");
1461:                jButtonBackupDirectory
1462:                        .setMargin(new java.awt.Insets(2, 2, 2, 2));
1463:                jButtonBackupDirectory
1464:                        .addActionListener(new java.awt.event.ActionListener() {
1465:                            public void actionPerformed(
1466:                                    java.awt.event.ActionEvent evt) {
1467:                                jButtonBackupDirectoryActionPerformed(evt);
1468:                            }
1469:                        });
1470:
1471:                gridBagConstraints = new java.awt.GridBagConstraints();
1472:                gridBagConstraints.gridx = 1;
1473:                gridBagConstraints.gridy = 4;
1474:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1475:                gridBagConstraints.weightx = 1.0;
1476:                gridBagConstraints.weighty = 1.0;
1477:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
1478:                jPanel6.add(jButtonBackupDirectory, gridBagConstraints);
1479:
1480:                buttonGroup1.add(jRadioButton1_NoBackup);
1481:                jRadioButton1_NoBackup.setText("No backup");
1482:                jRadioButton1_NoBackup
1483:                        .addActionListener(new java.awt.event.ActionListener() {
1484:                            public void actionPerformed(
1485:                                    java.awt.event.ActionEvent evt) {
1486:                                jRadioButton1_NoBackupActionPerformed(evt);
1487:                            }
1488:                        });
1489:
1490:                gridBagConstraints = new java.awt.GridBagConstraints();
1491:                gridBagConstraints.gridx = 0;
1492:                gridBagConstraints.gridy = 0;
1493:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1494:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1495:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 0, 3);
1496:                jPanel6.add(jRadioButton1_NoBackup, gridBagConstraints);
1497:
1498:                buttonGroup1.add(jRadioButton2_ReplaceExtension);
1499:                jRadioButton2_ReplaceExtension
1500:                        .setText("Replace extension with .bak");
1501:                jRadioButton2_ReplaceExtension
1502:                        .addActionListener(new java.awt.event.ActionListener() {
1503:                            public void actionPerformed(
1504:                                    java.awt.event.ActionEvent evt) {
1505:                                jRadioButton2_ReplaceExtensionActionPerformed(evt);
1506:                            }
1507:                        });
1508:
1509:                gridBagConstraints = new java.awt.GridBagConstraints();
1510:                gridBagConstraints.gridx = 0;
1511:                gridBagConstraints.gridy = 1;
1512:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1513:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1514:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1515:                jPanel6.add(jRadioButton2_ReplaceExtension, gridBagConstraints);
1516:
1517:                buttonGroup1.add(jRadioButton3_AppendExtension);
1518:                jRadioButton3_AppendExtension.setSelected(true);
1519:                jRadioButton3_AppendExtension
1520:                        .setText("Append .bak to existing extension");
1521:                jRadioButton3_AppendExtension
1522:                        .addActionListener(new java.awt.event.ActionListener() {
1523:                            public void actionPerformed(
1524:                                    java.awt.event.ActionEvent evt) {
1525:                                jRadioButton3_AppendExtensionActionPerformed(evt);
1526:                            }
1527:                        });
1528:
1529:                gridBagConstraints = new java.awt.GridBagConstraints();
1530:                gridBagConstraints.gridx = 0;
1531:                gridBagConstraints.gridy = 2;
1532:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1533:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1534:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 5, 3);
1535:                jPanel6.add(jRadioButton3_AppendExtension, gridBagConstraints);
1536:
1537:                jLabelDefaultBackupDir.setText("Default backup directory");
1538:                gridBagConstraints = new java.awt.GridBagConstraints();
1539:                gridBagConstraints.gridx = 0;
1540:                gridBagConstraints.gridy = 3;
1541:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1542:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1543:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1544:                jPanel6.add(jLabelDefaultBackupDir, gridBagConstraints);
1545:
1546:                gridBagConstraints = new java.awt.GridBagConstraints();
1547:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1548:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1549:                gridBagConstraints.weightx = 1.0;
1550:                gridBagConstraints.weighty = 1.0;
1551:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
1552:                jPanelBackup.add(jPanel6, gridBagConstraints);
1553:
1554:                jTabbedPane1.addTab("Backup", jPanelBackup);
1555:
1556:                jPanelExternalPrograms.setLayout(new java.awt.GridBagLayout());
1557:
1558:                jPanelExternalEditor.setLayout(new java.awt.GridBagLayout());
1559:
1560:                jPanelExternalEditor.setBorder(javax.swing.BorderFactory
1561:                        .createTitledBorder(javax.swing.BorderFactory
1562:                                .createEtchedBorder(), "External editor"));
1563:                gridBagConstraints = new java.awt.GridBagConstraints();
1564:                gridBagConstraints.gridx = 0;
1565:                gridBagConstraints.gridy = 0;
1566:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1567:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1568:                gridBagConstraints.weightx = 1000.0;
1569:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1570:                jPanelExternalEditor.add(jTextFieldEditor, gridBagConstraints);
1571:
1572:                jButtonBrowseEditor.setText("Browse");
1573:                jButtonBrowseEditor.setMargin(new java.awt.Insets(2, 2, 2, 2));
1574:                jButtonBrowseEditor
1575:                        .addActionListener(new java.awt.event.ActionListener() {
1576:                            public void actionPerformed(
1577:                                    java.awt.event.ActionEvent evt) {
1578:                                jButtonBrowseEditorActionPerformed(evt);
1579:                            }
1580:                        });
1581:
1582:                gridBagConstraints = new java.awt.GridBagConstraints();
1583:                gridBagConstraints.gridx = 1;
1584:                gridBagConstraints.gridy = 0;
1585:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1586:                gridBagConstraints.weightx = 1.0;
1587:                gridBagConstraints.weighty = 1.0;
1588:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1589:                jPanelExternalEditor.add(jButtonBrowseEditor,
1590:                        gridBagConstraints);
1591:
1592:                gridBagConstraints = new java.awt.GridBagConstraints();
1593:                gridBagConstraints.gridx = 0;
1594:                gridBagConstraints.gridy = 0;
1595:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1596:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1597:                gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3);
1598:                jPanelExternalPrograms.add(jPanelExternalEditor,
1599:                        gridBagConstraints);
1600:
1601:                jPanelViewers.setLayout(new java.awt.GridBagLayout());
1602:
1603:                jPanelViewers.setBorder(javax.swing.BorderFactory
1604:                        .createTitledBorder(javax.swing.BorderFactory
1605:                                .createEtchedBorder(), "Viewers"));
1606:                gridBagConstraints = new java.awt.GridBagConstraints();
1607:                gridBagConstraints.gridx = 0;
1608:                gridBagConstraints.gridy = 1;
1609:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1610:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1611:                gridBagConstraints.weightx = 1000.0;
1612:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1613:                jPanelViewers.add(jTextFieldPDFViewer, gridBagConstraints);
1614:
1615:                jButtonBrowseEditor1.setText("Browse");
1616:                jButtonBrowseEditor1.setMargin(new java.awt.Insets(2, 2, 2, 2));
1617:                jButtonBrowseEditor1
1618:                        .addActionListener(new java.awt.event.ActionListener() {
1619:                            public void actionPerformed(
1620:                                    java.awt.event.ActionEvent evt) {
1621:                                jButtonBrowseEditor1ActionPerformed(evt);
1622:                            }
1623:                        });
1624:
1625:                gridBagConstraints = new java.awt.GridBagConstraints();
1626:                gridBagConstraints.gridx = 1;
1627:                gridBagConstraints.gridy = 1;
1628:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1629:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1630:                jPanelViewers.add(jButtonBrowseEditor1, gridBagConstraints);
1631:
1632:                gridBagConstraints = new java.awt.GridBagConstraints();
1633:                gridBagConstraints.gridx = 0;
1634:                gridBagConstraints.gridy = 3;
1635:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1636:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1637:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1638:                jPanelViewers.add(jTextFieldHTMLViewer, gridBagConstraints);
1639:
1640:                jButtonBrowseEditor2.setText("Browse");
1641:                jButtonBrowseEditor2.setMargin(new java.awt.Insets(2, 2, 2, 2));
1642:                jButtonBrowseEditor2
1643:                        .addActionListener(new java.awt.event.ActionListener() {
1644:                            public void actionPerformed(
1645:                                    java.awt.event.ActionEvent evt) {
1646:                                jButtonBrowseEditor2ActionPerformed(evt);
1647:                            }
1648:                        });
1649:
1650:                gridBagConstraints = new java.awt.GridBagConstraints();
1651:                gridBagConstraints.gridx = 1;
1652:                gridBagConstraints.gridy = 3;
1653:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1654:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1655:                jPanelViewers.add(jButtonBrowseEditor2, gridBagConstraints);
1656:
1657:                gridBagConstraints = new java.awt.GridBagConstraints();
1658:                gridBagConstraints.gridx = 0;
1659:                gridBagConstraints.gridy = 5;
1660:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1661:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1662:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1663:                jPanelViewers.add(jTextFieldXLSViewer, gridBagConstraints);
1664:
1665:                jButtonBrowseEditor3.setText("Browse");
1666:                jButtonBrowseEditor3.setMargin(new java.awt.Insets(2, 2, 2, 2));
1667:                jButtonBrowseEditor3
1668:                        .addActionListener(new java.awt.event.ActionListener() {
1669:                            public void actionPerformed(
1670:                                    java.awt.event.ActionEvent evt) {
1671:                                jButtonBrowseEditor3ActionPerformed(evt);
1672:                            }
1673:                        });
1674:
1675:                gridBagConstraints = new java.awt.GridBagConstraints();
1676:                gridBagConstraints.gridx = 1;
1677:                gridBagConstraints.gridy = 5;
1678:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1679:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1680:                jPanelViewers.add(jButtonBrowseEditor3, gridBagConstraints);
1681:
1682:                jLabelPDFViewer.setText("PDF viewer");
1683:                gridBagConstraints = new java.awt.GridBagConstraints();
1684:                gridBagConstraints.gridx = 0;
1685:                gridBagConstraints.gridy = 0;
1686:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1687:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1688:                gridBagConstraints.weightx = 1.0;
1689:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1690:                jPanelViewers.add(jLabelPDFViewer, gridBagConstraints);
1691:
1692:                jLabelHTMLViewer.setText("HTML viewer");
1693:                gridBagConstraints = new java.awt.GridBagConstraints();
1694:                gridBagConstraints.gridx = 0;
1695:                gridBagConstraints.gridy = 2;
1696:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1697:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1698:                gridBagConstraints.weightx = 1.0;
1699:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1700:                jPanelViewers.add(jLabelHTMLViewer, gridBagConstraints);
1701:
1702:                jLabelXLSViewer.setText("XLS viewer");
1703:                gridBagConstraints = new java.awt.GridBagConstraints();
1704:                gridBagConstraints.gridx = 0;
1705:                gridBagConstraints.gridy = 4;
1706:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1707:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1708:                gridBagConstraints.weightx = 1.0;
1709:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1710:                jPanelViewers.add(jLabelXLSViewer, gridBagConstraints);
1711:
1712:                jLabelCSVViewer.setText("CSV viewer");
1713:                gridBagConstraints = new java.awt.GridBagConstraints();
1714:                gridBagConstraints.gridx = 0;
1715:                gridBagConstraints.gridy = 6;
1716:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1717:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1718:                gridBagConstraints.weightx = 1.0;
1719:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1720:                jPanelViewers.add(jLabelCSVViewer, gridBagConstraints);
1721:
1722:                gridBagConstraints = new java.awt.GridBagConstraints();
1723:                gridBagConstraints.gridx = 0;
1724:                gridBagConstraints.gridy = 7;
1725:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1726:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1727:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1728:                jPanelViewers.add(jTextFieldCSVViewer, gridBagConstraints);
1729:
1730:                jButtonBrowseEditor4.setText("Browse");
1731:                jButtonBrowseEditor4.setMargin(new java.awt.Insets(2, 2, 2, 2));
1732:                jButtonBrowseEditor4
1733:                        .addActionListener(new java.awt.event.ActionListener() {
1734:                            public void actionPerformed(
1735:                                    java.awt.event.ActionEvent evt) {
1736:                                jButtonBrowseEditor4ActionPerformed(evt);
1737:                            }
1738:                        });
1739:
1740:                gridBagConstraints = new java.awt.GridBagConstraints();
1741:                gridBagConstraints.gridx = 1;
1742:                gridBagConstraints.gridy = 7;
1743:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1744:                gridBagConstraints.weightx = 1.0;
1745:                gridBagConstraints.weighty = 1.0;
1746:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1747:                jPanelViewers.add(jButtonBrowseEditor4, gridBagConstraints);
1748:
1749:                jLabelTXTViewer.setText("Text viewer");
1750:                gridBagConstraints = new java.awt.GridBagConstraints();
1751:                gridBagConstraints.gridx = 0;
1752:                gridBagConstraints.gridy = 8;
1753:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1754:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1755:                gridBagConstraints.weightx = 1.0;
1756:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1757:                jPanelViewers.add(jLabelTXTViewer, gridBagConstraints);
1758:
1759:                gridBagConstraints = new java.awt.GridBagConstraints();
1760:                gridBagConstraints.gridx = 0;
1761:                gridBagConstraints.gridy = 9;
1762:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1763:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1764:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1765:                jPanelViewers.add(jTextFieldTXTViewer, gridBagConstraints);
1766:
1767:                jButtonBrowseEditor5.setText("Browse");
1768:                jButtonBrowseEditor5.setMargin(new java.awt.Insets(2, 2, 2, 2));
1769:                jButtonBrowseEditor5
1770:                        .addActionListener(new java.awt.event.ActionListener() {
1771:                            public void actionPerformed(
1772:                                    java.awt.event.ActionEvent evt) {
1773:                                jButtonBrowseEditor5ActionPerformed(evt);
1774:                            }
1775:                        });
1776:
1777:                gridBagConstraints = new java.awt.GridBagConstraints();
1778:                gridBagConstraints.gridx = 1;
1779:                gridBagConstraints.gridy = 9;
1780:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1781:                gridBagConstraints.weightx = 1.0;
1782:                gridBagConstraints.weighty = 1.0;
1783:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1784:                jPanelViewers.add(jButtonBrowseEditor5, gridBagConstraints);
1785:
1786:                jLabelRTFViewer.setText("CSV viewer");
1787:                gridBagConstraints = new java.awt.GridBagConstraints();
1788:                gridBagConstraints.gridx = 0;
1789:                gridBagConstraints.gridy = 10;
1790:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1791:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1792:                gridBagConstraints.weightx = 1.0;
1793:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1794:                jPanelViewers.add(jLabelRTFViewer, gridBagConstraints);
1795:
1796:                gridBagConstraints = new java.awt.GridBagConstraints();
1797:                gridBagConstraints.gridx = 0;
1798:                gridBagConstraints.gridy = 11;
1799:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1800:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1801:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1802:                jPanelViewers.add(jTextFieldRTFViewer, gridBagConstraints);
1803:
1804:                jButtonBrowseEditor6.setText("Browse");
1805:                jButtonBrowseEditor6.setMargin(new java.awt.Insets(2, 2, 2, 2));
1806:                jButtonBrowseEditor6
1807:                        .addActionListener(new java.awt.event.ActionListener() {
1808:                            public void actionPerformed(
1809:                                    java.awt.event.ActionEvent evt) {
1810:                                jButtonBrowseEditor6ActionPerformed(evt);
1811:                            }
1812:                        });
1813:
1814:                gridBagConstraints = new java.awt.GridBagConstraints();
1815:                gridBagConstraints.gridx = 1;
1816:                gridBagConstraints.gridy = 11;
1817:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1818:                gridBagConstraints.weightx = 1.0;
1819:                gridBagConstraints.weighty = 1.0;
1820:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1821:                jPanelViewers.add(jButtonBrowseEditor6, gridBagConstraints);
1822:
1823:                jLabelODFViewer.setText("OpenOffice (ODF) viewer");
1824:                gridBagConstraints = new java.awt.GridBagConstraints();
1825:                gridBagConstraints.gridx = 0;
1826:                gridBagConstraints.gridy = 12;
1827:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1828:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1829:                gridBagConstraints.weightx = 1.0;
1830:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1831:                jPanelViewers.add(jLabelODFViewer, gridBagConstraints);
1832:
1833:                gridBagConstraints = new java.awt.GridBagConstraints();
1834:                gridBagConstraints.gridx = 0;
1835:                gridBagConstraints.gridy = 13;
1836:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1837:                gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
1838:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1839:                jPanelViewers.add(jTextFieldODFViewer, gridBagConstraints);
1840:
1841:                jButtonBrowseEditor7.setText("Browse");
1842:                jButtonBrowseEditor7.setMargin(new java.awt.Insets(2, 2, 2, 2));
1843:                jButtonBrowseEditor7
1844:                        .addActionListener(new java.awt.event.ActionListener() {
1845:                            public void actionPerformed(
1846:                                    java.awt.event.ActionEvent evt) {
1847:                                jButtonBrowseEditor6ActionPerformed1(evt);
1848:                            }
1849:                        });
1850:
1851:                gridBagConstraints = new java.awt.GridBagConstraints();
1852:                gridBagConstraints.gridx = 1;
1853:                gridBagConstraints.gridy = 13;
1854:                gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1855:                gridBagConstraints.weightx = 1.0;
1856:                gridBagConstraints.weighty = 1.0;
1857:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3);
1858:                jPanelViewers.add(jButtonBrowseEditor7, gridBagConstraints);
1859:
1860:                gridBagConstraints = new java.awt.GridBagConstraints();
1861:                gridBagConstraints.gridx = 0;
1862:                gridBagConstraints.gridy = 1;
1863:                gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1864:                gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1865:                gridBagConstraints.weightx = 1.0;
1866:                gridBagConstraints.weighty = 1.0;
1867:                gridBagConstraints.insets = new java.awt.Insets(0, 3, 6, 3);
1868:                jPanelExternalPrograms.add(jPanelViewers, gridBagConstraints);
1869:
1870:                jTabbedPane1
1871:                        .addTab("External programs", jPanelExternalPrograms);
1872:
1873:                getContentPane()
1874:                        .add(jTabbedPane1, java.awt.BorderLayout.CENTER);
1875:
1876:                jPanel1.setLayout(new java.awt.FlowLayout(
1877:                        java.awt.FlowLayout.RIGHT));
1878:
1879:                jPanel1.setMinimumSize(new java.awt.Dimension(10, 30));
1880:                jButtonOK.setMnemonic('s');
1881:                jButtonOK.setText("Save");
1882:                jButtonOK.setEnabled(false);
1883:                jButtonOK
1884:                        .addActionListener(new java.awt.event.ActionListener() {
1885:                            public void actionPerformed(
1886:                                    java.awt.event.ActionEvent evt) {
1887:                                jButtonOKActionPerformed(evt);
1888:                            }
1889:                        });
1890:
1891:                jPanel1.add(jButtonOK);
1892:
1893:                jButtonApply.setMnemonic('a');
1894:                jButtonApply.setText("Apply");
1895:                jButtonApply.setEnabled(false);
1896:                jButtonApply
1897:                        .addActionListener(new java.awt.event.ActionListener() {
1898:                            public void actionPerformed(
1899:                                    java.awt.event.ActionEvent evt) {
1900:                                jButtonApplyActionPerformed(evt);
1901:                            }
1902:                        });
1903:
1904:                jPanel1.add(jButtonApply);
1905:
1906:                jButtonCancel.setMnemonic('c');
1907:                jButtonCancel.setText("Cancel");
1908:                jButtonCancel
1909:                        .addActionListener(new java.awt.event.ActionListener() {
1910:                            public void actionPerformed(
1911:                                    java.awt.event.ActionEvent evt) {
1912:                                jButtonCancelActionPerformed(evt);
1913:                            }
1914:                        });
1915:
1916:                jPanel1.add(jButtonCancel);
1917:
1918:                getContentPane().add(jPanel1, java.awt.BorderLayout.SOUTH);
1919:
1920:                pack();
1921:                java.awt.Dimension screenSize = java.awt.Toolkit
1922:                        .getDefaultToolkit().getScreenSize();
1923:                java.awt.Dimension dialogSize = getSize();
1924:                setLocation((screenSize.width - dialogSize.width) / 2,
1925:                        (screenSize.height - dialogSize.height) / 2);
1926:            }// </editor-fold>//GEN-END:initComponents
1927:
1928:            private void jButtonBrowseEditor6ActionPerformed1(
1929:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBrowseEditor6ActionPerformed1
1930:                javax.swing.JFileChooser jfc = new javax.swing.JFileChooser();
1931:
1932:                //jfc.setDialogTitle("Choose a RTF viewer...");//it.businesslogic.ireport.util.I18n.getString("redo","Redo")
1933:                jfc.setDialogTitle(it.businesslogic.ireport.util.I18n
1934:                        .getString("chooseODF",
1935:                                "Choose the OpenOffice (ODF) viewer..."));
1936:                jfc.setMultiSelectionEnabled(false);
1937:                if (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
1938:                    jTextFieldODFViewer
1939:                            .setText(jfc.getSelectedFile().getPath());
1940:                }
1941:            }//GEN-LAST:event_jButtonBrowseEditor6ActionPerformed1
1942:
1943:            private void jCheckBoxDontUseTemplateFromMenuActionPerformed(
1944:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxDontUseTemplateFromMenuActionPerformed
1945:                this .enableApplyAndOk();
1946:            }//GEN-LAST:event_jCheckBoxDontUseTemplateFromMenuActionPerformed
1947:
1948:            private void jComboBoxVirtualizerActionPerformed(
1949:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxVirtualizerActionPerformed
1950:                this .enableApplyAndOk();
1951:            }//GEN-LAST:event_jComboBoxVirtualizerActionPerformed
1952:
1953:            private void jSpinnerVirtualizerSize1jSpinnerVirtualizerSizeStateChanged2(
1954:                    javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSpinnerVirtualizerSize1jSpinnerVirtualizerSizeStateChanged2
1955:                this .enableApplyAndOk();
1956:            }//GEN-LAST:event_jSpinnerVirtualizerSize1jSpinnerVirtualizerSizeStateChanged2
1957:
1958:            private void jSpinnerVirtualizerSizeStateChanged2(
1959:                    javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSpinnerVirtualizerSizeStateChanged2
1960:                this .enableApplyAndOk();
1961:            }//GEN-LAST:event_jSpinnerVirtualizerSizeStateChanged2
1962:
1963:            private void jButtonBrowseEditor6ActionPerformed(
1964:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBrowseEditor6ActionPerformed
1965:                javax.swing.JFileChooser jfc = new javax.swing.JFileChooser();
1966:
1967:                //jfc.setDialogTitle("Choose a RTF viewer...");//it.businesslogic.ireport.util.I18n.getString("redo","Redo")
1968:                jfc.setDialogTitle(it.businesslogic.ireport.util.I18n
1969:                        .getString("chooseRTF", "Choose a RTF viewer..."));
1970:                jfc.setMultiSelectionEnabled(false);
1971:                if (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
1972:                    jTextFieldRTFViewer
1973:                            .setText(jfc.getSelectedFile().getPath());
1974:                }
1975:            }//GEN-LAST:event_jButtonBrowseEditor6ActionPerformed
1976:
1977:            private void jButtonBrowseEditor5ActionPerformed(
1978:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBrowseEditor5ActionPerformed
1979:                javax.swing.JFileChooser jfc = new javax.swing.JFileChooser();
1980:
1981:                //jfc.setDialogTitle("Choose an Text viewer...");
1982:                jfc.setDialogTitle(it.businesslogic.ireport.util.I18n
1983:                        .getString("chooseText", "Choose a Text viewer..."));
1984:                jfc.setMultiSelectionEnabled(false);
1985:                if (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
1986:                    jTextFieldTXTViewer
1987:                            .setText(jfc.getSelectedFile().getPath());
1988:                }
1989:            }//GEN-LAST:event_jButtonBrowseEditor5ActionPerformed
1990:
1991:            private void jTextFieldVirtualizerDirActionPerformed(
1992:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldVirtualizerDirActionPerformed
1993:                this .enableApplyAndOk();
1994:            }//GEN-LAST:event_jTextFieldVirtualizerDirActionPerformed
1995:
1996:            private void jSpinnerVirtualizerSizeStateChanged(
1997:                    javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jSpinnerVirtualizerSizeStateChanged
1998:                this .enableApplyAndOk();
1999:            }//GEN-LAST:event_jSpinnerVirtualizerSizeStateChanged
2000:
2001:            private void jButtonVirtualizerDirBrowseActionPerformed(
2002:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonVirtualizerDirBrowseActionPerformed
2003:                JFileChooser jfc = new JFileChooser();
2004:                jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
2005:                if (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
2006:                    jTextFieldVirtualizerDir.setText(jfc.getSelectedFile()
2007:                            .getPath());
2008:                }
2009:                this .enableApplyAndOk();
2010:            }//GEN-LAST:event_jButtonVirtualizerDirBrowseActionPerformed
2011:
2012:            private void jCheckBoxKeepJavaFileActionPerformed(
2013:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxKeepJavaFileActionPerformed
2014:                this .enableApplyAndOk();
2015:            }//GEN-LAST:event_jCheckBoxKeepJavaFileActionPerformed
2016:
2017:            private void jComboBox1ActionPerformed(
2018:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed
2019:                this .enableApplyAndOk();
2020:            }//GEN-LAST:event_jComboBox1ActionPerformed
2021:
2022:            private void jCheckBoxUseCurrentFilesDirectoryForCompilesActionPerformed(
2023:                    java.awt.event.ActionEvent evt)//GEN-FIRST:event_jCheckBoxUseCurrentFilesDirectoryForCompilesActionPerformed
2024:            {//GEN-HEADEREND:event_jCheckBoxUseCurrentFilesDirectoryForCompilesActionPerformed
2025:                if (this .jCheckBoxUseCurrentFilesDirectoryForCompiles
2026:                        .isSelected()) {
2027:                    this .disableCompileDirectoryBrowse();
2028:                } else {
2029:                    this .enableCompileDirectoryBrowse();
2030:                }
2031:                this .enableApplyAndOk();
2032:            }//GEN-LAST:event_jCheckBoxUseCurrentFilesDirectoryForCompilesActionPerformed
2033:
2034:            private void jButtonOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOKActionPerformed
2035:                if (jButtonApply.isEnabled())
2036:                    jButtonApplyActionPerformed(evt);
2037:
2038:                if (mf != null)
2039:                    mf.saveiReportConfiguration();
2040:                this .jButtonOK.setEnabled(false);
2041:                this .setVisible(false);
2042:                this .dispose();
2043:            }//GEN-LAST:event_jButtonOKActionPerformed
2044:
2045:            private void jButtonApplyActionPerformed(
2046:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonApplyActionPerformed
2047:                applyConfiguration();
2048:                jButtonApply.setEnabled(false);
2049:            }//GEN-LAST:event_jButtonApplyActionPerformed
2050:
2051:            private void jButtonCancelActionPerformed(
2052:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelActionPerformed
2053:                this .setVisible(false);
2054:                this .dispose();
2055:            }//GEN-LAST:event_jButtonCancelActionPerformed
2056:
2057:            private void jButtonBrowseEditor4ActionPerformed(
2058:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBrowseEditor4ActionPerformed
2059:                javax.swing.JFileChooser jfc = new javax.swing.JFileChooser();
2060:
2061:                //jfc.setDialogTitle("Choose a CSV viewer...");
2062:                jfc.setDialogTitle(it.businesslogic.ireport.util.I18n
2063:                        .getString("chooseCSV", "Choose a CSV viewer..."));
2064:                jfc.setMultiSelectionEnabled(false);
2065:                if (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
2066:                    jTextFieldCSVViewer
2067:                            .setText(jfc.getSelectedFile().getPath());
2068:                }
2069:            }//GEN-LAST:event_jButtonBrowseEditor4ActionPerformed
2070:
2071:            private void jButtonBrowseEditor3ActionPerformed(
2072:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBrowseEditor3ActionPerformed
2073:                javax.swing.JFileChooser jfc = new javax.swing.JFileChooser();
2074:
2075:                //jfc.setDialogTitle("Choose a XLS viewer...");
2076:                jfc.setDialogTitle(it.businesslogic.ireport.util.I18n
2077:                        .getString("chooseXLS", "Choose a XLS viewer..."));
2078:                jfc.setMultiSelectionEnabled(false);
2079:                if (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
2080:                    jTextFieldXLSViewer
2081:                            .setText(jfc.getSelectedFile().getPath());
2082:                }
2083:            }//GEN-LAST:event_jButtonBrowseEditor3ActionPerformed
2084:
2085:            private void jButtonBrowseEditor2ActionPerformed(
2086:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBrowseEditor2ActionPerformed
2087:                javax.swing.JFileChooser jfc = new javax.swing.JFileChooser();
2088:
2089:                //jfc.setDialogTitle("Choose a HTML viewer...");
2090:                jfc.setDialogTitle(it.businesslogic.ireport.util.I18n
2091:                        .getString("chooseHTML", "Choose a HTML viewer..."));
2092:                jfc.setMultiSelectionEnabled(false);
2093:                if (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
2094:                    jTextFieldHTMLViewer.setText(jfc.getSelectedFile()
2095:                            .getPath());
2096:                }
2097:            }//GEN-LAST:event_jButtonBrowseEditor2ActionPerformed
2098:
2099:            private void jButtonBrowseEditor1ActionPerformed(
2100:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBrowseEditor1ActionPerformed
2101:                javax.swing.JFileChooser jfc = new javax.swing.JFileChooser();
2102:
2103:                //jfc.setDialogTitle("Choose a PDF viewer...");
2104:                jfc.setDialogTitle(it.businesslogic.ireport.util.I18n
2105:                        .getString("choosePDF", "Choose a PDF viewer..."));
2106:                jfc.setMultiSelectionEnabled(false);
2107:                if (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
2108:                    jTextFieldPDFViewer
2109:                            .setText(jfc.getSelectedFile().getPath());
2110:                }
2111:            }//GEN-LAST:event_jButtonBrowseEditor1ActionPerformed
2112:
2113:            private void jButtonBrowseEditorActionPerformed(
2114:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBrowseEditorActionPerformed
2115:                javax.swing.JFileChooser jfc = new javax.swing.JFileChooser();
2116:
2117:                //jfc.setDialogTitle("Choose an editor...");
2118:                jfc.setDialogTitle(it.businesslogic.ireport.util.I18n
2119:                        .getString("chooseEditor", "Choose an editor..."));
2120:                jfc.setMultiSelectionEnabled(false);
2121:                if (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
2122:                    jTextFieldEditor.setText(jfc.getSelectedFile().getPath());
2123:                }
2124:
2125:            }//GEN-LAST:event_jButtonBrowseEditorActionPerformed
2126:
2127:            private void jButtonBackupDirectoryActionPerformed(
2128:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBackupDirectoryActionPerformed
2129:                JFileChooser jfc = new JFileChooser();
2130:                jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
2131:                if (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
2132:                    jTextFieldBackupDirectory.setText(jfc.getSelectedFile()
2133:                            .getPath());
2134:                }
2135:            }//GEN-LAST:event_jButtonBackupDirectoryActionPerformed
2136:
2137:            private void jButtonCompilationDirActionPerformed(
2138:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCompilationDirActionPerformed
2139:
2140:                JFileChooser jfc = new JFileChooser();
2141:                jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
2142:                if (jTextFieldCompilationDir.getText().length() > 0) {
2143:                    try {
2144:                        jfc.setCurrentDirectory(new File(
2145:                                jTextFieldCompilationDir.getText()));
2146:
2147:                    } catch (Exception ex) {
2148:                        try {
2149:                            jfc.setCurrentDirectory(new File(MainFrame
2150:                                    .getMainInstance().getCurrentDirectory()));
2151:                        } catch (Exception ex2) {
2152:                        }
2153:                    }
2154:                }
2155:
2156:                if (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
2157:                    jTextFieldCompilationDir.setText(jfc.getSelectedFile()
2158:                            .getPath());
2159:                }
2160:            }//GEN-LAST:event_jButtonCompilationDirActionPerformed
2161:
2162:            private void jButtonTemplateActionPerformed(
2163:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonTemplateActionPerformed
2164:                // jfilechooser...
2165:                JFileChooser jfc = new JFileChooser();
2166:                jfc.setFileFilter(new javax.swing.filechooser.FileFilter() {
2167:                    public boolean accept(java.io.File file) {
2168:                        String filename = file.getName();
2169:                        return (filename.endsWith(".xml") || file.isDirectory());
2170:                    }
2171:
2172:                    public String getDescription() {
2173:                        return "JasperReports XML *.xml";
2174:                    }
2175:                });
2176:                if (jfc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
2177:                    jTextFieldTemplate.setText(jfc.getSelectedFile().getPath());
2178:                }
2179:            }//GEN-LAST:event_jButtonTemplateActionPerformed
2180:
2181:            private void jRadioButton3_AppendExtensionActionPerformed(
2182:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton3_AppendExtensionActionPerformed
2183:                this .enableApplyAndOk();
2184:            }//GEN-LAST:event_jRadioButton3_AppendExtensionActionPerformed
2185:
2186:            private void jRadioButton2_ReplaceExtensionActionPerformed(
2187:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2_ReplaceExtensionActionPerformed
2188:                this .enableApplyAndOk();
2189:            }//GEN-LAST:event_jRadioButton2_ReplaceExtensionActionPerformed
2190:
2191:            private void jRadioButton1_NoBackupActionPerformed(
2192:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1_NoBackupActionPerformed
2193:                this .enableApplyAndOk();
2194:            }//GEN-LAST:event_jRadioButton1_NoBackupActionPerformed
2195:
2196:            private void jCheckBoxAutosaveActionPerformed(
2197:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBoxAutosaveActionPerformed
2198:                this .enableApplyAndOk();
2199:            }//GEN-LAST:event_jCheckBoxAutosaveActionPerformed
2200:
2201:            private void jTextFieldTemplateInputMethodTextChanged(
2202:                    java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_jTextFieldTemplateInputMethodTextChanged
2203:                this .enableApplyAndOk();
2204:            }//GEN-LAST:event_jTextFieldTemplateInputMethodTextChanged
2205:
2206:            private void jTextFieldTemplateActionPerformed(
2207:                    java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldTemplateActionPerformed
2208:                this .enableApplyAndOk();
2209:            }//GEN-LAST:event_jTextFieldTemplateActionPerformed
2210:
2211:            /** Closes the dialog */
2212:            private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
2213:                setVisible(false);
2214:                dispose();
2215:            }//GEN-LAST:event_closeDialog
2216:
2217:            /**
2218:             * @param args the command line arguments
2219:             */
2220:            public static void main(String args[]) {
2221:                new OptionsDialog(new javax.swing.JFrame(), true)
2222:                        .setVisible(true);
2223:            }
2224:
2225:            // Variables declaration - do not modify//GEN-BEGIN:variables
2226:            private javax.swing.ButtonGroup buttonGroup1;
2227:            private javax.swing.JButton jButtonApply;
2228:            private javax.swing.JButton jButtonBackupDirectory;
2229:            private javax.swing.JButton jButtonBrowseEditor;
2230:            private javax.swing.JButton jButtonBrowseEditor1;
2231:            private javax.swing.JButton jButtonBrowseEditor2;
2232:            private javax.swing.JButton jButtonBrowseEditor3;
2233:            private javax.swing.JButton jButtonBrowseEditor4;
2234:            private javax.swing.JButton jButtonBrowseEditor5;
2235:            private javax.swing.JButton jButtonBrowseEditor6;
2236:            private javax.swing.JButton jButtonBrowseEditor7;
2237:            private javax.swing.JButton jButtonCancel;
2238:            private javax.swing.JButton jButtonCompilationDir;
2239:            private javax.swing.JButton jButtonOK;
2240:            private javax.swing.JButton jButtonTemplate;
2241:            private javax.swing.JButton jButtonVirtualizerDirBrowse;
2242:            private javax.swing.JCheckBox jCheckBoxAutosave;
2243:            private javax.swing.JCheckBox jCheckBoxDontUseTemplateFromMenu;
2244:            private javax.swing.JCheckBox jCheckBoxKeepJavaFile;
2245:            private javax.swing.JCheckBox jCheckBoxUseCurrentFilesDirectoryForCompiles;
2246:            private javax.swing.JComboBox jComboBox1;
2247:            private javax.swing.JComboBox jComboBoxVirtualizer;
2248:            private javax.swing.JLabel jLabel1;
2249:            private javax.swing.JLabel jLabelCSVViewer;
2250:            private javax.swing.JLabel jLabelDefaultBackupDir;
2251:            private javax.swing.JLabel jLabelHTMLViewer;
2252:            private javax.swing.JLabel jLabelODFViewer;
2253:            private javax.swing.JLabel jLabelPDFViewer;
2254:            private javax.swing.JLabel jLabelRTFViewer;
2255:            private javax.swing.JLabel jLabelReportVirtualizerDirectory;
2256:            private javax.swing.JLabel jLabelReportVirtualizerMinGrowCount;
2257:            private javax.swing.JLabel jLabelReportVirtualizerSize;
2258:            private javax.swing.JLabel jLabelReportVirtualizerSize1;
2259:            private javax.swing.JLabel jLabelTXTViewer;
2260:            private javax.swing.JLabel jLabelTemplateForNewDocs;
2261:            private javax.swing.JLabel jLabelXLSViewer;
2262:            private javax.swing.JPanel jPanel1;
2263:            private javax.swing.JPanel jPanel2;
2264:            private javax.swing.JPanel jPanel3;
2265:            private javax.swing.JPanel jPanel4;
2266:            private javax.swing.JPanel jPanel6;
2267:            private javax.swing.JPanel jPanel7;
2268:            private javax.swing.JPanel jPanel8;
2269:            private javax.swing.JPanel jPanelBackup;
2270:            private javax.swing.JPanel jPanelComper;
2271:            private javax.swing.JPanel jPanelCompileDir;
2272:            private javax.swing.JPanel jPanelCompileDir1;
2273:            private javax.swing.JPanel jPanelCompileDir2;
2274:            private javax.swing.JPanel jPanelExternalEditor;
2275:            private javax.swing.JPanel jPanelExternalPrograms;
2276:            private javax.swing.JPanel jPanelGeneral;
2277:            private javax.swing.JPanel jPanelViewers;
2278:            private javax.swing.JRadioButton jRadioButton1_NoBackup;
2279:            private javax.swing.JRadioButton jRadioButton2_ReplaceExtension;
2280:            private javax.swing.JRadioButton jRadioButton3_AppendExtension;
2281:            private javax.swing.JSpinner jSpinnerVirtualizerBlockSize;
2282:            private javax.swing.JSpinner jSpinnerVirtualizerGrownCount;
2283:            private javax.swing.JSpinner jSpinnerVirtualizerSize;
2284:            private javax.swing.JTabbedPane jTabbedPane1;
2285:            private javax.swing.JTextField jTextFieldBackupDirectory;
2286:            private javax.swing.JTextField jTextFieldCSVViewer;
2287:            private javax.swing.JTextField jTextFieldCompilationDir;
2288:            private javax.swing.JTextField jTextFieldEditor;
2289:            private javax.swing.JTextField jTextFieldHTMLViewer;
2290:            private javax.swing.JTextField jTextFieldODFViewer;
2291:            private javax.swing.JTextField jTextFieldPDFViewer;
2292:            private javax.swing.JTextField jTextFieldRTFViewer;
2293:            private javax.swing.JTextField jTextFieldTXTViewer;
2294:            private javax.swing.JTextField jTextFieldTemplate;
2295:            private javax.swing.JTextField jTextFieldVirtualizerDir;
2296:            private javax.swing.JTextField jTextFieldXLSViewer;
2297:
2298:            // End of variables declaration//GEN-END:variables
2299:            /*
2300:             public void setVisible(boolean visible)
2301:             {
2302:            if (visible == true && visible != this.isVisible()) loadConfiguration();
2303:            super.setVisible( visible);
2304:             }
2305:             */
2306:
2307:            public void applyConfiguration() {
2308:                if (mf == null || mf.getProperties() == null) {
2309:                    return;
2310:                }
2311:                java.util.Properties prop = mf.getProperties();
2312:                try {
2313:                    // Property sheet
2314:                    prop.put("RecentFilesLength", ""
2315:                            + this .categorySheetPanel
2316:                                    .getPropertyValue("RecentFilesLength"));
2317:                    prop.put("DefaultUnit", ""
2318:                            + this .categorySheetPanel
2319:                                    .getPropertyValue("DefaultUnit"));
2320:                    prop.put("GridSize", ""
2321:                            + this .categorySheetPanel
2322:                                    .getPropertyValue("GridSize"));
2323:                    prop.put("ViewRules", ""
2324:                            + this .categorySheetPanel
2325:                                    .getPropertyValue("ViewRules"));
2326:                    prop.put("showGrid", ""
2327:                            + this .categorySheetPanel
2328:                                    .getPropertyValue("showGrid"));
2329:                    prop.put("Antialias", ""
2330:                            + this .categorySheetPanel
2331:                                    .getPropertyValue("Antialias"));
2332:                    prop.put("RealTimeValidation", ""
2333:                            + this .categorySheetPanel
2334:                                    .getPropertyValue("RealTimeValidation"));
2335:
2336:                    prop.put("AutoReload", ""
2337:                            + this .categorySheetPanel
2338:                                    .getPropertyValue("AutoReload"));
2339:                    prop.put("AskToSave", ""
2340:                            + this .categorySheetPanel
2341:                                    .getPropertyValue("AskToSave"));
2342:                    prop
2343:                            .put(
2344:                                    "showCompatibilityMessage",
2345:                                    ""
2346:                                            + this .categorySheetPanel
2347:                                                    .getPropertyValue("showCompatibilityMessage"));
2348:                    prop
2349:                            .put(
2350:                                    "showCompatibilityMessageLoad",
2351:                                    ""
2352:                                            + this .categorySheetPanel
2353:                                                    .getPropertyValue("showCompatibilityMessageLoad"));
2354:
2355:                    prop.put("LoadFontOnStartup", ""
2356:                            + this .categorySheetPanel
2357:                                    .getPropertyValue("LoadFontOnStartup"));
2358:                    prop.put("RestoreLayout", ""
2359:                            + this .categorySheetPanel
2360:                                    .getPropertyValue("RestoreLayout"));
2361:
2362:                    prop.put("ShowToolTipsInDesign", ""
2363:                            + ""
2364:                            + this .categorySheetPanel
2365:                                    .getPropertyValue("ShowToolTipsInDesign"));
2366:
2367:                    prop.put("MagneticPower", ""
2368:                            + this .categorySheetPanel
2369:                                    .getPropertyValue("MagneticPower"));
2370:
2371:                    prop.put("enableRMIServer", ""
2372:                            + this .categorySheetPanel
2373:                                    .getPropertyValue("enableRMIServer"));
2374:                    prop.put("RMIServerPort", ""
2375:                            + ""
2376:                            + this .categorySheetPanel
2377:                                    .getPropertyValue("RMIServerPort"));
2378:
2379:                    mf.updateAntialiasMode();
2380:
2381:                    prop
2382:                            .put(
2383:                                    "ViewBorderForTextElements",
2384:                                    ""
2385:                                            + ""
2386:                                            + this .categorySheetPanel
2387:                                                    .getPropertyValue("ViewBorderForTextElements"));
2388:
2389:                    java.awt.Color color = null;
2390:                    color = ColorSelectorPanel.parseColorString(""
2391:                            + this .categorySheetPanel
2392:                                    .getPropertyValue("NewViewBorderColor"));
2393:
2394:                    prop.put("NewViewBorderColor", ""
2395:                            + ((color != null) ? color.getRGB()
2396:                                    : java.awt.Color.LIGHT_GRAY.getRGB()));
2397:
2398:                    if (color != null) {
2399:                        ReportElement.lightcolor = color;
2400:                    }
2401:
2402:                    String currentLAF = prop.getProperty("LookAndFeel", "");
2403:
2404:                    prop.put("LookAndFeel", ""
2405:                            + ""
2406:                            + this .categorySheetPanel
2407:                                    .getPropertyValue("LookAndFeel"));
2408:                    //prop.put("UseAutoRegiesterFields",""+""+this.categorySheetPanel.getPropertyValue("UseAutoRegiesterFields"));
2409:                    prop.put("EnableTextResizeClick", ""
2410:                            + ""
2411:                            + this .categorySheetPanel
2412:                                    .getPropertyValue("EnableTextResizeClick"));
2413:                    prop.put("SynchronizeReportName", ""
2414:                            + ""
2415:                            + this .categorySheetPanel
2416:                                    .getPropertyValue("SynchronizeReportName"));
2417:                    prop
2418:                            .put(
2419:                                    "DefaultScriptingLanguage",
2420:                                    ""
2421:                                            + ""
2422:                                            + this .categorySheetPanel
2423:                                                    .getPropertyValue("DefaultScriptingLanguage"));
2424:
2425:                    prop.put("DefaultStyle", ""
2426:                            + ""
2427:                            + this .categorySheetPanel
2428:                                    .getPropertyValue("DefaultStyle"));
2429:
2430:                    String currentOverrideDefaultFont = prop.getProperty(
2431:                            "overrideDefaultFont", "");
2432:                    String currentOverrideDefaultFontSize = prop.getProperty(
2433:                            "overrideDefaultFontSize", "");
2434:
2435:                    prop.put("overrideDefaultFont", ""
2436:                            + this .categorySheetPanel
2437:                                    .getPropertyValue("overrideDefaultFont"));
2438:                    try {
2439:
2440:                        Integer
2441:                                .parseInt(""
2442:                                        + this .categorySheetPanel
2443:                                                .getPropertyValue("overrideDefaultFontSize"));
2444:                        prop
2445:                                .put(
2446:                                        "overrideDefaultFontSize",
2447:                                        ""
2448:                                                + this .categorySheetPanel
2449:                                                        .getPropertyValue("overrideDefaultFontSize"));
2450:
2451:                    } catch (Exception ex) {
2452:                        ex.printStackTrace();
2453:                    }
2454:
2455:                    String currentOverrideDefaultFontName = prop.getProperty(
2456:                            "overrideDefaultFontName", "");
2457:                    String currentOverrideDefaultFontAttrs = prop.getProperty(
2458:                            "overrideDefaultFontAttrs", "");
2459:
2460:                    prop
2461:                            .put(
2462:                                    "overrideDefaultFontName",
2463:                                    ""
2464:                                            + this .categorySheetPanel
2465:                                                    .getPropertyValue("overrideDefaultFontName"));
2466:                    prop
2467:                            .put(
2468:                                    "overrideDefaultFontAttrs",
2469:                                    ""
2470:                                            + this .categorySheetPanel
2471:                                                    .getPropertyValue("overrideDefaultFontAttrs"));
2472:
2473:                    String lang_str = (String) this .categorySheetPanel
2474:                            .getPropertyValue("Language");
2475:
2476:                    Locale selectedLang = null;
2477:
2478:                    for (int i = 0; i < listOfLanguages.size(); ++i) {
2479:                        Locale lang = (Locale) listOfLanguages.get(i);
2480:                        LocaleAdapter adapter = new LocaleAdapter(lang);
2481:                        if (lang_str.equals("" + adapter)) {
2482:                            selectedLang = adapter.getLocale();
2483:                            prop.put("Language", selectedLang.getLanguage());
2484:                            prop.put("Country", selectedLang.getCountry());
2485:                            prop.put("Variant", selectedLang.getVariant());
2486:                            break;
2487:                        }
2488:                    }
2489:
2490:                    // Other tabs...
2491:                    prop.put("DefaultBackupDirectory", ""
2492:                            + this .jTextFieldBackupDirectory.getText());
2493:                    prop.put("ExternalCSVViewer", ""
2494:                            + this .jTextFieldCSVViewer.getText());
2495:                    prop.put("ExternalPDFViewer", ""
2496:                            + this .jTextFieldPDFViewer.getText());
2497:                    prop.put("ExternalXLSViewer", ""
2498:                            + this .jTextFieldXLSViewer.getText());
2499:                    prop.put("ExternalHTMLViewer", ""
2500:                            + this .jTextFieldHTMLViewer.getText());
2501:                    prop.put("ExternalTXTViewer", ""
2502:                            + this .jTextFieldTXTViewer.getText());
2503:                    prop.put("ExternalRTFViewer", ""
2504:                            + this .jTextFieldRTFViewer.getText());
2505:                    prop.put("ExternalODFViewer", ""
2506:                            + this .jTextFieldODFViewer.getText());
2507:                    prop.put("ExternalEditor", ""
2508:                            + this .jTextFieldEditor.getText());
2509:                    prop.put("DefaultTemplate", ""
2510:                            + this .jTextFieldTemplate.getText());
2511:                    prop.put("SaveBeforeCompiling", ""
2512:                            + this .jCheckBoxAutosave.isSelected());
2513:
2514:                    //MainFrame and this code need to implement and use an object that houses the properties
2515:                    //object and have methods for these options.
2516:                    mf.setUsingMultiLineExpressions(false); // this.jCheckBoxUseMultiLineScripts.isSelected());
2517:                    mf
2518:                            .setUsingCurrentFilesDirectoryForCompiles(this .jCheckBoxUseCurrentFilesDirectoryForCompiles
2519:                                    .isSelected());
2520:                    prop.put("useCurrentFilesDirectoryForCompiles",
2521:                            this .jCheckBoxUseCurrentFilesDirectoryForCompiles
2522:                                    .isSelected()
2523:                                    + "");
2524:
2525:                    mf
2526:                            .setDefaultCompilationDirectory(this .jTextFieldCompilationDir
2527:                                    .getText());
2528:                    prop.put("DefaultCompilationDirectory",
2529:                            this .jTextFieldCompilationDir.getText());
2530:
2531:                    String policy = "3";
2532:                    if (this .jRadioButton1_NoBackup.isSelected()) {
2533:                        policy = "1";
2534:                    }
2535:                    if (this .jRadioButton2_ReplaceExtension.isSelected()) {
2536:                        policy = "2";
2537:                    }
2538:                    if (this .jRadioButton3_AppendExtension.isSelected()) {
2539:                        policy = "3";
2540:                    }
2541:
2542:                    prop.put("BackupPolicy", policy);
2543:                    //prop.put("ViewBorderColor",""+this.jButtonBorderTextColor.getBackground().getRGB() );
2544:
2545:                    prop.put("DefaultCompiler", ""
2546:                            + jComboBox1.getSelectedIndex());
2547:                    prop.put("KeepJavaFile", this .jCheckBoxKeepJavaFile
2548:                            .isSelected()
2549:                            + "");
2550:
2551:                    prop.put("ReportVirtualizer", ""
2552:                            + ((Tag) this .jComboBoxVirtualizer
2553:                                    .getSelectedItem()).getValue());
2554:                    prop.put("ReportVirtualizerDirectory", ""
2555:                            + this .jTextFieldVirtualizerDir.getText().trim());
2556:                    prop.put("ReportVirtualizerSize", ""
2557:                            + this .jSpinnerVirtualizerSize.getValue());
2558:                    prop.put("ReportVirtualizerBlockSize", ""
2559:                            + this .jSpinnerVirtualizerBlockSize.getValue());
2560:                    prop.put("ReportVirtualizerMinGrownCount", ""
2561:                            + this .jSpinnerVirtualizerGrownCount.getValue());
2562:
2563:                    prop.put("DontUseTemplateFromMenu",
2564:                            this .jCheckBoxDontUseTemplateFromMenu.isSelected()
2565:                                    + "");
2566:
2567:                    //  TODO Fire Language changed event to make all the existing
2568:                    // forms/dialogs etc, reload their static strings.
2569:
2570:                    if (!currentLAF.equals(prop.getProperty("LookAndFeel", ""))
2571:                            || !currentOverrideDefaultFontName
2572:                                    .equals(prop.getProperty(
2573:                                            "overrideDefaultFontName", ""))
2574:                            || !currentOverrideDefaultFontAttrs
2575:                                    .equals(prop.getProperty(
2576:                                            "overrideDefaultFontAttrs", ""))
2577:                            || !currentOverrideDefaultFont.equals(prop
2578:                                    .getProperty("overrideDefaultFont", ""))
2579:                            || !currentOverrideDefaultFontSize
2580:                                    .equals(prop.getProperty(
2581:                                            "overrideDefaultFontSize", ""))) {
2582:                        Misc.setPLAF(prop.getProperty("LookAndFeel", ""));
2583:                        SwingUtilities.updateComponentTreeUI(this );
2584:                        MainFrame.getMainInstance().upadateLAF();
2585:                        JInternalFrame activeframe = MainFrame
2586:                                .getMainInstance().getJMDIDesktopPane()
2587:                                .getSelectedFrame();
2588:                        if (activeframe != null && activeframe.isMaximum()) {
2589:                            activeframe.setMaximum(false);
2590:                            activeframe.setMaximum(true);
2591:                        }
2592:                    }
2593:
2594:                    if (selectedLang != null) {
2595:                        I18n.setCurrentLocale(selectedLang);
2596:                    }
2597:
2598:                    //update frames...
2599:                    JInternalFrame[] frames = mf.getJMDIDesktopPane()
2600:                            .getAllFrames();
2601:
2602:                    for (int i = 0; i < frames.length; ++i) {
2603:                        JInternalFrame f = frames[i];
2604:                        if (f instanceof  JReportFrame) {
2605:                            JReportFrame jrf = (JReportFrame) f;
2606:                            jrf.repaint();
2607:                            jrf.repaintRules();
2608:                        }
2609:                    }
2610:
2611:                } catch (Exception ex) {
2612:                    ex.printStackTrace();
2613:                }
2614:
2615:                this .jButtonApply.setEnabled(false);
2616:
2617:            }
2618:
2619:            protected void enableCompileDirectoryBrowse() {
2620:                this .jTextFieldCompilationDir.setEnabled(true);
2621:                this .jButtonCompilationDir.setEnabled(true);
2622:            }
2623:
2624:            protected void disableCompileDirectoryBrowse() {
2625:                this .jTextFieldCompilationDir.setEnabled(false);
2626:                this .jButtonCompilationDir.setEnabled(false);
2627:            }
2628:
2629:            protected void disableApplyAndOk() {
2630:                this .jButtonApply.setEnabled(false);
2631:                this .jButtonOK.setEnabled(false);
2632:            }
2633:
2634:            protected void disableApply() {
2635:                this .jButtonOK.setEnabled(false);
2636:            }
2637:
2638:            protected void enableApplyAndOk() {
2639:                this .jButtonApply.setEnabled(true);
2640:                this .jButtonOK.setEnabled(true);
2641:            }
2642:
2643:            protected void enableApply() {
2644:                this .jButtonOK.setEnabled(true);
2645:            }
2646:
2647:            public void languageChanged(LanguageChangedEvent evt) {
2648:                this .applyI18n();
2649:            }
2650:
2651:            public void sheetPropertyValueChanged(
2652:                    SheetPropertyValueChangedEvent evt) {
2653:                this .enableApplyAndOk();
2654:            }
2655:
2656:        }//end class OptionsDialog
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.