KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > it > businesslogic > ireport > gui > MainFrame


1   /*
2  * Copyright (C) 2005 - 2006 JasperSoft Corporation. All rights reserved.
3  * http://www.jaspersoft.com.
4  *
5  * Unless you have purchased a commercial license agreement from JasperSoft,
6  * the following license terms apply:
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as published by
10  * the Free Software Foundation.
11  *
12  * This program is distributed WITHOUT ANY WARRANTY; and without the
13  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
18  * or write to:
19  *
20  * Free Software Foundation, Inc.,
21  * 59 Temple Place - Suite 330,
22  * Boston, MA USA 02111-1307
23  *
24  *
25  *
26  *
27  * MainFrame.java
28  *
29  * Created on 5 febbraio 2003, 12.45
30  *
31  */

32
33 package it.businesslogic.ireport.gui;
34 import it.businesslogic.ireport.TextReportElement;
35 import it.businesslogic.ireport.crosstab.gui.CrosstabMeasuresView;
36 import it.businesslogic.ireport.gui.box.JBoxButton;
37 import it.businesslogic.ireport.gui.docking.DockingContainer;
38 import it.businesslogic.ireport.gui.event.*;
39 import it.businesslogic.ireport.gui.event.ReportElementsSelectionEvent;
40 import it.businesslogic.ireport.gui.fonts.FontLoaderDialog;
41 import it.businesslogic.ireport.gui.fonts.FontsPathDialog;
42 import it.businesslogic.ireport.gui.logpane.*;
43 import it.businesslogic.ireport.gui.library.*;
44 import it.businesslogic.ireport.gui.locale.*;
45 import it.businesslogic.ireport.gui.documentstructure.*;
46 import it.businesslogic.ireport.gui.queryexecuters.QueryExecuterDef;
47 import it.businesslogic.ireport.gui.queryexecuters.QueryExecutersDialog;
48 import it.businesslogic.ireport.gui.sheet.ReportElementSheetPanel;
49 import it.businesslogic.ireport.gui.style.StylesView;
50 import it.businesslogic.ireport.gui.wizard.ReportGroupWizard;
51 import it.businesslogic.ireport.gui.wizard.UserChoicesWizardTemplate;
52 import it.businesslogic.ireport.gui.wizard.UserTemplatesDialog;
53 import it.businesslogic.ireport.rmi.IReportServerImpl;
54 import it.businesslogic.ireport.rmi.IReportTCPServer;
55 import it.businesslogic.ireport.undo.*;
56 import it.businesslogic.ireport.*;
57 import it.businesslogic.ireport.crosstab.gui.CrosstabEditorPanel;
58 import it.businesslogic.ireport.gui.command.FormatCommand;
59 import it.businesslogic.ireport.gui.docking.GenericDragTargetListener;
60 import it.businesslogic.ireport.gui.style.StylesDialog;
61 import it.businesslogic.ireport.gui.subdataset.SubDatasetsDialog;
62 import it.businesslogic.ireport.util.*;
63 import java.lang.reflect.InvocationTargetException JavaDoc;
64 import javax.swing.tree.*;
65 import java.util.*;
66 import java.io.*;
67 import javax.swing.*;
68 import java.awt.event.*;
69 import java.awt.Point JavaDoc;
70 import java.awt.dnd.DropTarget JavaDoc;
71
72 import jcmdline.*;
73 import java.awt.Dimension JavaDoc;
74
75 import org.apache.xerces.parsers.DOMParser;
76 import org.flexdock.dockbar.DockbarManager;
77 import org.flexdock.dockbar.layout.DockbarLayoutManager;
78 import org.flexdock.docking.Dockable;
79 import org.flexdock.docking.DockingPort;
80 import org.flexdock.docking.event.DockingEvent;
81 import org.flexdock.docking.event.DockingListener;
82 import org.flexdock.plaf.PlafManager;
83 import org.w3c.dom.Document JavaDoc;
84 import org.w3c.dom.Node JavaDoc;
85 import org.w3c.dom.NodeList JavaDoc;
86 import org.w3c.dom.NamedNodeMap JavaDoc;
87
88 import java.awt.BorderLayout JavaDoc;
89 import java.awt.Component JavaDoc;
90 import javax.swing.border.LineBorder JavaDoc;
91
92 import org.flexdock.docking.DockingConstants;
93 import org.flexdock.docking.DockingManager;
94 import org.flexdock.util.SwingUtility;
95 import org.flexdock.view.View;
96 import org.flexdock.view.Viewport;
97
98
99 import org.xml.sax.SAXException JavaDoc;
100 /**
101  * This class is the core of the GUI of iReport. From this class we control all
102  * events related to the open and close files, handling of properties files,
103  * handling JMDIDestopPane, Menus....
104  *
105  * @author Administrator
106  */

107 public class MainFrame extends javax.swing.JFrame JavaDoc
108         implements ReportListener, Runnable JavaDoc, LanguageChangedListener, StyleChangedListener, ReportDocumentStatusChangedListener
109 {
110
111     public int docCounter=0;
112
113     private boolean noExit = false;
114
115     private Thread JavaDoc checkModifiedFielsThread = null;
116     /**
117      * "iReport " + version
118      * To get the version, MainFrame.constTitle.substring(8);
119      */

120     public static String JavaDoc constTitle = "iReport 1.3.0 ";
121     private String JavaDoc homeDirectory = ".";
122     private java.util.Vector JavaDoc toolBarControls;
123     private java.util.HashMap JavaDoc pluginEntries;
124     private ElementPropertiesDialog elementPropertiesDialog;
125     private EventsForm eventsForm;
126     private ValuesDialog valuesDialog;
127     private GroupsDialog groupsDialog;
128     private BandsDialog bandsDialog;
129     private FontsDialog fontsDialog;
130     private LocaleResourceFilesDialog localeFilesDialog;
131     private ReportQueryDialog reportQueryDialog;
132     private PluginConfigurationDialog pluginConfigurationDialog = null;
133     private ToolbarFormatPanel jToolbarFormatPanel = null;
134     private ToolbarConnectionPanel jToolbarConnectionPanel = null;
135
136     private Vector ttfFonts;
137     private Vector connections;
138     private Properties properties;
139     private Vector recentFilesList;
140     private Vector favoriteFilesList;
141     private Vector recentProjectsList;
142     private Vector clipboards[];
143     private Vector classpath;
144     private Vector fontspath;
145     
146     private List JavaDoc userChoicesWizardTemplates = null;
147     
148     private it.businesslogic.ireport.ReportElement styleClipboards[];
149     private int activeClipboard = 0;
150     private int activeStyleClipboard = 0;
151     private boolean catchFormActivated = true;
152     private boolean embeddedIreport = false;
153     private boolean usingWS = false;
154
155     private LibraryPanel libraryPanel = null;
156     private CrosstabMeasuresView crosstabMeasuresView = null;
157
158     private DocumentStructurePanel documentStructurePanel = null;
159     private CrosstabStructurePanel crosstabStructurePanel = null;
160     private ReportElementSheetPanel reportElementSheetPanel = null;
161     private StylesView stylesView = null;
162
163
164     public static ReportClassLoader reportClassLoader = null;
165
166     private static MainFrame mainInstance = null;
167
168     private boolean dontHandleEvent;
169
170     private StringBuffer JavaDoc outputBuffer;
171
172     private javax.swing.event.EventListenerList JavaDoc listenerList = null;
173
174     private int rightColumnWidth = 0;
175
176     private Vector chartSeriesClipBoard = new Vector();
177     private it.businesslogic.ireport.chart.Dataset chartDatasetClipBoard = null;
178     private Vector measuresClipBoard = new Vector();
179     private Vector queryExecuters = new Vector();
180
181
182     /**
183      * Variable currentZoomFactor is used to remember the zoomFactor
184      * while reloading a file after changing it from outside or
185      * via the option Edit XML source.
186      */

187     private double currentZoomFactor = 1.0;
188
189     public static String JavaDoc IREPORT_HOME_DIR;
190
191     public static String JavaDoc IREPORT_USER_HOME_DIR;
192
193     public static String JavaDoc IREPORT_TMP_DIR;
194
195     public static String JavaDoc IREPORT_RECENT_FILES_FILE;
196
197     public static String JavaDoc IREPORT_EXPRESSIONS_FILE;
198
199     public static String JavaDoc IREPORT_FAVORITE_FILES_FILE;
200
201     public static String JavaDoc IREPORT_RECENT_PROJECTS_FILE;
202
203     public static String JavaDoc IREPORT_CONFIG_FILE;
204
205     public static String JavaDoc IREPORT_STYLE_LIBRARY;
206
207     public static String JavaDoc IREPORT_DEFAULT_HOME_DIR;
208
209     public static final int IREPORT_JAVA_VIEWER = 1;
210
211     public static final int IREPORT_PDF_VIEWER = 2;
212
213     public static final int IREPORT_HTML_VIEWER = 4;
214
215     public static final int IREPORT_XLS_VIEWER = 8;
216
217     public static final int IREPORT_CSV_VIEWER = 16;
218
219     public static final int IREPORT_JASPER_VIEWER = 32;
220
221     public static final int IREPORT_TXT_VIEWER = 64;
222
223     public static final int IREPORT_TXT_JR_VIEWER = 128;
224
225     public static final int IREPORT_RTF_VIEWER = 256;
226
227     public static final int IREPORT_XLS2_VIEWER = 512;
228
229     private LogPane logPane = null;
230     private JBoxButton jBoxButton = null;
231
232
233
234     /**
235      * Viewes ....
236      */

237     View viewFiles = null;
238     View viewDocumentStructure = null;
239     View viewPropertySheet = null;
240     View viewThreads = null;
241     View viewLibrary = null;
242     View logPaneView = null;
243     View stylesPanleView = null;
244     View crosstabStructureView = null;
245     View crosstabMeasuresPanelView = null;
246
247
248     View desktop = null;
249
250     /**
251      * This is the set of style availables in the library...
252      */

253     private Vector styleLibrarySet = new Vector();
254
255     /**
256      * Return the main instance of the MainFrame. This method assume that there is only
257      * one iReport instanced per JVM, so the first istance of MainFrame is the only possible.
258      */

259     public static MainFrame getMainInstance() {
260         return mainInstance;
261     }
262
263     static {
264
265         reportClassLoader = new ReportClassLoader();
266
267     } //end static section for simple init
268
/*
269          * You can override ireport home setting ireport.home variable or using line command options.
270          *
271          */

272     public void setiReportPaths(String JavaDoc ireport_home, String JavaDoc ireport_user_home, String JavaDoc ireport_tmp_dir) {
273
274         // Setting User home directory
275
if ( ireport_user_home == null) {
276             ireport_user_home = System.getProperty("user.home") + File.separator + ".ireport";
277             IREPORT_USER_HOME_DIR = ireport_user_home;
278
279             //setHomeDirectory(Misc.nvl(System.getProperty("ireport.home"), IREPORT_DEFAULT_HOME_DIR));
280
}
281         else {
282             if (ireport_user_home.endsWith(File.separator)) {
283                 ireport_user_home = ireport_user_home.substring(0, ireport_user_home.length()-1);
284             }
285             IREPORT_USER_HOME_DIR = ireport_user_home;
286         }
287
288         // Setting iReport directory
289
if ( ireport_home == null) {
290             ireport_home = System.getProperty("ireport.home",".");
291             IREPORT_HOME_DIR = ireport_home;
292             setHomeDirectory(IREPORT_HOME_DIR);
293         }
294         else {
295             if (ireport_home.endsWith(File.separator)) {
296                 ireport_home = ireport_home.substring(0, ireport_home.length()-1);
297             }
298             IREPORT_HOME_DIR = ireport_home;
299         }
300
301         // Setting temp dir...
302
if (IREPORT_TMP_DIR == null || IREPORT_TMP_DIR.trim().length() == 0) {
303             if ( ireport_tmp_dir == null) {
304                 ireport_user_home = System.getProperty("user.home") + File.separator + ".ireport";
305                 IREPORT_TMP_DIR = ireport_home;
306
307                 //setHomeDirectory(Misc.nvl(System.getProperty("ireport.home"), IREPORT_DEFAULT_HOME_DIR));
308
}
309             else {
310                 if (ireport_tmp_dir.endsWith(File.separator)) {
311                     ireport_tmp_dir = ireport_tmp_dir.substring(0, ireport_tmp_dir.length()-1);
312                 }
313                 IREPORT_TMP_DIR = ireport_tmp_dir;
314             }
315         }
316
317         IREPORT_DEFAULT_HOME_DIR = IREPORT_HOME_DIR;
318         setHomeDirectory(IREPORT_HOME_DIR);
319
320         IREPORT_RECENT_FILES_FILE = IREPORT_USER_HOME_DIR + File.separator + "recentFiles.xml";
321         IREPORT_EXPRESSIONS_FILE = IREPORT_USER_HOME_DIR + File.separator + "expressions.xml";
322         IREPORT_RECENT_PROJECTS_FILE = IREPORT_USER_HOME_DIR + File.separator + "recentProjects.xml";
323         IREPORT_FAVORITE_FILES_FILE = IREPORT_USER_HOME_DIR + File.separator + "favoriteFiles.xml";
324         IREPORT_CONFIG_FILE = IREPORT_USER_HOME_DIR + File.separator + "config.xml";
325         IREPORT_STYLE_LIBRARY = IREPORT_USER_HOME_DIR + File.separator + "styleLibrary.xml";
326         //System.out.println(IREPORT_DEFAULT_HOME_DIR);
327
//System.out.println(IREPORT_HOME_DIR);
328

329         getReportClassLoader().addNoRelodablePath( IREPORT_USER_HOME_DIR + File.separator + "classes");
330         
331         try {
332             //nothing in here yet.
333
}
334         catch(Throwable JavaDoc e) {
335             e.printStackTrace(System.err);
336         }
337     }
338
339     public MainFrame() {
340         this(new HashMap());
341     }
342     /** Creates new form MainFrame */
343     public MainFrame(final Map JavaDoc args) {
344
345         if (mainInstance==null) {
346             mainInstance = this;
347         }
348
349         //Thread.currentThread().setContextClassLoader(this.getReportClassLoader());
350

351         final SplashDialog sp;
352
353         if (args.get("splash") != null)
354         {
355          sp = (SplashDialog)args.get("splash");
356         }
357         else
358         {
359             sp = null;
360         }
361
362         properties = new Properties();
363         outputBuffer = new StringBuffer JavaDoc();
364         connections = new Vector();
365         recentFilesList = new Vector();
366         favoriteFilesList = new Vector();
367         recentProjectsList = new Vector();
368         pluginEntries = new java.util.HashMap JavaDoc();
369
370         setiReportPaths((String JavaDoc)args.get("ireport-home"),
371         (String JavaDoc)args.get("user-home"),
372         (String JavaDoc)args.get("tmp-dir"));
373
374         if (args.get("embedded") != null &&
375             args.get("embedded").equals("true")) this.setNoExit(true);
376
377         if (args.get("webstart") != null &&
378             args.get("webstart").equals("true")) this.setUsingWS(true);
379
380         //Added by Felix Firgau for I18n on Feb 10th 2006
381
//it.businesslogic.ireport.util.I18n.setCurrentLocale( properties.getProperty("Language"), properties.getProperty("Country") );
382
//Modified by Felix Firgau for I18n on Feb 8th 2006
383

384         // Set the classloader...
385
//Thread.currentThread().setContextClassLoader( reportClassLoader );
386
//Modified by Felix Firgau for I18n on Feb 8th 2006
387
//if (sp!=null) sp.updateLoadingStatus(10,"Loading iReport configuration");
388
if (sp!=null) sp.updateLoadingStatus(10,it.businesslogic.ireport.util.I18n.getString("loadingIReportConfig","Loading iReport configuration"));
389         //Modification end
390

391         if (args.containsKey("config-file")) {
392             loadiReportConfiguration((String JavaDoc)args.get("config-file"));
393         }
394         else {
395             loadiReportConfiguration();
396         }
397         
398         it.businesslogic.ireport.util.I18n.setCurrentLocale( properties.getProperty("Language"), properties.getProperty("Country") );
399         
400         if (args.get("beanClass") != null)
401         {
402             getProperties().put("beanClass",(String JavaDoc)args.get("beanClass"));
403         }
404
405         //Modified by Felix Firgau for I18n on Feb 8th 2006
406
//if (sp!=null) sp.updateLoadingStatus(20,"Setting locale");
407
if (sp!=null) sp.updateLoadingStatus(20,it.businesslogic.ireport.util.I18n.getString("setLocale","Setting locale"));
408         //it.businesslogic.ireport.util.I18n.setCurrentLocale( properties.getProperty("Language"), properties.getProperty("Country") );
409
//Modification end
410

411         Misc.setPLAF( properties.getProperty("LookAndFeel") );
412
413         //Modified by Felix Firgau for faster loading on Oct 11th 2006
414
if (args.get("noPlaf") == null || args.get("noPlaf").equals("false"))
415           PlafManager.setPreferredTheme("win32");
416
417         //Modified by Felix Firgau for I18n on Feb 8th 2006
418
//if (sp!=null) sp.updateLoadingStatus(30,"Init main frame components");
419
if (sp!=null) sp.updateLoadingStatus(30,it.businesslogic.ireport.util.I18n.getString("initMainFrame","Init main frame components"));
420         //Modification end
421

422         jToolbarFormatPanel = new ToolbarFormatPanel(this);
423         jToolbarConnectionPanel = new ToolbarConnectionPanel(this);
424
425         initComponents();
426
427         this.setTitle(this.constTitle);
428         //getDockingContainerRight().setPosition( DockingContainer.POSITION_RIGHT);
429
logPane = new LogPane();
430         //jPanelSouth.add(logPane, java.awt.BorderLayout.CENTER);
431

432         this.jCheckBoxMenuItemGrid.setSelected( properties.getProperty("showGrid","false").equals("true") );
433         this.jCheckBoxMenuItemSnapToGrid.setSelected( properties.getProperty("snapToGrid","false").equals("true") );
434         this.jCheckBoxMenuItemEMM.setSelected( properties.getProperty("EMM","false").equals("true") );
435         this.jCheckBoxMenuItemReportVirtualizer.setSelected( properties.getProperty("ReportVirtualizer","false").equals("true") );
436         this.jCheckBoxMenuItemIgnorePagination.setSelected( properties.getProperty("IgnorePagination","false").equals("true") );
437         this.jListThreads.setModel(new javax.swing.DefaultListModel JavaDoc());
438         I18n.addOnLanguageChangedListener( this );
439
440         //Modified by Felix Firgau for I18n on Feb 8th 2006
441
//if (sp!=null) sp.updateLoadingStatus(60,"Loading fonts");
442

443         if (properties.getProperty("LoadFontOnStartup","true").equals("true") )
444         {
445             if (sp!=null) sp.updateLoadingStatus(60,it.businesslogic.ireport.util.I18n.getString("loadingFonts","Loading fonts"));
446             //Modification end
447
this.ttfFonts = FontListLoader.loadTTFFonts();
448         }
449         if (ttfFonts == null) ttfFonts = new Vector();
450
451         System.setProperty("org.xml.sax.driver","org.apache.xerces.parsers.SAXParser");
452
453         //Modified by Felix Firgau for I18n on Feb 8th 2006
454
//if (sp!=null) sp.updateLoadingStatus(75,"Configuring GUI components");
455
if (sp!=null) sp.updateLoadingStatus(70,it.businesslogic.ireport.util.I18n.getString("configGUIComponents","Configuring GUI components"));
456
457         //Modification end of Felix Firgau
458

459         //jMDIDesktopPane.addInternalFrameActivatedListener(this);
460

461         this.setTitle( constTitle+ " - (c) 2002-2007 by JasperSoft Corp.");
462
463         toolBarControls = new java.util.Vector JavaDoc();
464
465         elementPropertiesDialog = new ElementPropertiesDialog(this,false);
466         elementPropertiesDialog.updateFonts();
467         valuesDialog = new ValuesDialog(this,false);
468         groupsDialog = new GroupsDialog(this,false);
469         bandsDialog = new BandsDialog(this,false);
470         fontsDialog = new FontsDialog(this,false);
471         reportQueryDialog = new ReportQueryDialog(this,false);
472         localeFilesDialog = new LocaleResourceFilesDialog(this,false);
473         eventsForm = new EventsForm();
474
475         jNumberComboBoxZoom.addValueChangedListener(new ValueChangedListener() {
476             public void valueChanged(ValueChangedEvent evt) {
477                 jNumberComboBoxZoomValueChanged(evt);
478             }
479         });
480
481         //user pressed enter
482
jNumberComboBoxZoom.addActionListener(new ActionListener() {
483             public void actionPerformed(ActionEvent evt) {
484                 //simulate focus lost to force zoom update
485
jNumberComboBoxZoom.focusLost(new FocusEvent(MainFrame.this, FocusEvent.COMPONENT_SHOWN));
486             }
487         });
488
489         jMDIDesktopPane.addInternalFrameActivatedListener(new InternalFrameActivatedListener() {
490             public void internalFrameActivated( InternalFrameActivatedEvent evt) {
491                 jMDIDesktopPaneInternalFrameActivated(evt);
492             }
493         });
494
495         getToolBarControls().addElement( this.jButtonNew);
496         getToolBarControls().addElement( this.jButtonOpen);
497         getToolBarControls().addElement( this.jButtonSave);
498         getToolBarControls().addElement( null);
499         getToolBarControls().addElement( this.jButtonCut);
500         getToolBarControls().addElement( this.jButtonCopy);
501         getToolBarControls().addElement( this.jButtonPaste);
502         getToolBarControls().addElement( null);
503         getToolBarControls().addElement( this.jToggleButtonPointer);
504         getToolBarControls().addElement( this.jToggleButtonLineTool);
505         getToolBarControls().addElement( this.jToggleButtonRectTool);
506         //getToolBarControls().addElement( this.jToggleButtonRectRoundTool);
507
getToolBarControls().addElement( this.jToggleButtonEllipseTool);
508         getToolBarControls().addElement( this.jToggleButtonImageTool);
509         getToolBarControls().addElement( this.jToggleButtonStaticTextTool);
510         getToolBarControls().addElement( this.jToggleButtonTextFieldTool);
511         getToolBarControls().addElement( this.jToggleButtonFrameTool);
512         getToolBarControls().addElement( this.jToggleButtonSubreportTool);
513         getToolBarControls().addElement( this.jToggleButtonCrosstabTool);
514         getToolBarControls().addElement( this.jToggleButtonChartTool);
515         getToolBarControls().addElement( this.jToggleButtonBarcodeTool);
516         getToolBarControls().addElement( null);
517         getToolBarControls().addElement( this.jButtonParameters);
518         getToolBarControls().addElement( this.jButtonGroups);
519         getToolBarControls().addElement( this.jButtonBands);
520         getToolBarControls().addElement( this.jButtonDatabase);
521         getToolBarControls().addElement( null);
522         getToolBarControls().addElement( this.jPanelZoom);
523         getToolBarControls().addElement( this.jButtonLens1);
524         getToolBarControls().addElement( this.jButtonLens2);
525         getToolBarControls().addElement( null);
526         getToolBarControls().addElement( this.jButtonCompiler);
527
528         getToolBarControls().addElement(this.jButtonRun1);
529         getToolBarControls().addElement(this.jButtonRun2);
530         getToolBarControls().addElement( null);
531         //toolBarControls.addElement(this.jButtonAlignLeft);
532
//toolBarControls.addElement(this.jButtonAlignCenter);
533
//toolBarControls.addElement(this.jButtonAlignRight);
534
//toolBarControls.addElement(this.jButtonAlignJustify);
535

536         jBoxButton = new JBoxButton();
537         jBoxButton.setMinimumSize(new java.awt.Dimension JavaDoc(36, 22));
538         jBoxButton.setMaximumSize(new java.awt.Dimension JavaDoc(36, 22));
539         jBoxButton.setPreferredSize(new java.awt.Dimension JavaDoc(36, 22));
540         jBoxButton.setEnabled(false);
541         jBoxButton.addActionListener(new java.awt.event.ActionListener JavaDoc() {
542             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
543                 jBoxButtonActionPerformed(evt);
544             }
545         });
546
547         jToolBarText.add(jBoxButton, jToolBarText.getComponentCount()-1);
548
549         jNumberComboBoxZoom.addEntry("50%",50);
550         jNumberComboBoxZoom.addEntry("75%",75);
551         jNumberComboBoxZoom.addEntry("100%",100);
552         jNumberComboBoxZoom.addEntry("150%",150);
553         jNumberComboBoxZoom.addEntry("200%",200);
554         jNumberComboBoxZoom.addEntry("400%",400);
555         jNumberComboBoxZoom.addEntry("800%",800);
556         jNumberComboBoxZoom.addEntry("Width",100);
557         jNumberComboBoxZoom.addEntry("Height",100);
558         jNumberComboBoxZoom.addEntry("Whole page",100);
559         //jNumberComboBoxZoom.addEntry("Fit to page",100); // deactivate since July 16 2004
560

561         //java.awt.Dimension dim = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
562
//this.setSize(dim);
563

564         //Modified by Felix Firgau for I18n on Feb 8th 2006
565
//if (sp!=null) sp.updateLoadingStatus(80,"Loading available font family names");
566
if (sp!=null) sp.updateLoadingStatus(75,it.businesslogic.ireport.util.I18n.getString("loadingAvFontFamNames","Loading available font family names"));
567         //Modification end
568

569         String JavaDoc[] fontFamilies = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
570         jComboBoxFont.addItem("");
571         for (int i=0; i<fontFamilies.length; ++i)
572         {
573             jComboBoxFont.addItem(fontFamilies[i]);
574             if (fontFamilies[i].equalsIgnoreCase("SansSerif"))
575             {
576                 jComboBoxFont.setSelectedIndex(i);
577             }
578         }
579
580         jNumberComboBoxSize.addEntry("3",3);
581         jNumberComboBoxSize.addEntry("5",5);
582         jNumberComboBoxSize.addEntry("8",8);
583         jNumberComboBoxSize.addEntry("10",10);
584         jNumberComboBoxSize.addEntry("12",12);
585         jNumberComboBoxSize.addEntry("14",14);
586         jNumberComboBoxSize.addEntry("18",18);
587         jNumberComboBoxSize.addEntry("24",24);
588         jNumberComboBoxSize.addEntry("36",36);
589         jNumberComboBoxSize.addEntry("48",48);
590
591         jNumberComboBoxSize.setSelectedIndex(5);
592
593         //jPanelToolBarComponentResized(new java.awt.event.ComponentEvent(jPanelToolBar,0));
594

595         java.awt.Image JavaDoc def = Misc.loadImageFromResources("it/businesslogic/ireport/icons/layout/img.gif");
596         try {
597             java.awt.MediaTracker JavaDoc mt = new java.awt.MediaTracker JavaDoc( new javax.swing.JPanel JavaDoc() );
598             mt.addImage(def,0);
599             mt.waitForID(0);
600         } catch (Exception JavaDoc ex) {
601             /* Do nothing */
602         }
603         ImageReportElement.setImgDef(def);
604         //jNumberComboBoxZoom.setPostfix("%");
605
//Modified by Felix Firgau for I18n on Feb 9th 2006
606
javax.swing.tree.DefaultMutableTreeNode JavaDoc root = new javax.swing.tree.DefaultMutableTreeNode JavaDoc(it.businesslogic.ireport.util.I18n.getString("openedFiles", "Opened files"));//End
607
javax.swing.tree.DefaultTreeModel JavaDoc model = new javax.swing.tree.DefaultTreeModel JavaDoc(root);
608
609         javax.swing.ToolTipManager.sharedInstance().registerComponent(jTreeFiles);
610         jTreeFiles.setModel( model );
611         jTreeFiles.setCellRenderer( new ProjectExplorerTreeCellRenderer());
612
613         jTreeFiles.setDropTarget(new DropTarget JavaDoc(jTreeFiles, new GenericDragTargetListener()));
614         //Modified by Felix Firgau for I18n on Feb 8th 2006
615
//--- dockingContainerLeft.addPanel(it.businesslogic.ireport.util.I18n.getString("files", "Files"),jPanelFiles,true);//Modification end
616

617         documentStructurePanel = new DocumentStructurePanel();
618         //Modified by Felix Firgau for I18n on Feb 8th 2006
619
//--- dockingContainerLeft.addPanel(it.businesslogic.ireport.util.I18n.getString("documentStructure", "Documentstructure"),documentStructurePanel,true);//Modification end
620
this.addReportListener( documentStructurePanel );
621
622         crosstabStructurePanel = new CrosstabStructurePanel();
623         //--- jTabbedPaneExplorer.addTab("Document structure",crosstabStructurePanel);
624
this.addReportListener( crosstabStructurePanel );
625
626         reportElementSheetPanel = new ReportElementSheetPanel();
627         reportElementSheetPanel.setResizeWeight(0.1);
628         //dockingContainerRight.addPanel(it.businesslogic.ireport.util.I18n.getString("elementProperties","Element properties"),reportElementSheetPanel, true);
629

630         libraryPanel = new LibraryPanel();
631         //jTabbedPaneRight.addTab("Library",libraryPanel);
632
//Modified by Felix Firgau for I18n on Feb 8th 2006
633
//--- dockingContainerRight.addPanel(it.businesslogic.ireport.util.I18n.getString("library"),libraryPanel,true);//Modification end
634

635         stylesView = new StylesView();
636         //dockingContainerRight.insertPanel(1,it.businesslogic.ireport.util.I18n.getString("stylesLibrary","Styles Library"),stylesView, dockingContainerRight.INSERT_MODE_SHAREDPOSTION, true);
637

638         crosstabMeasuresView = new CrosstabMeasuresView();
639
640
641         // New docking code
642
//DockbarLayoutManager.myComponent = jPanelMaster;
643
//DockbarManager.rootHere = jPanelMaster;
644
final org.flexdock.docking.defaults.DefaultDockingPort defaultDockingPort = new org.flexdock.docking.defaults.DefaultDockingPort();
645
646         desktop = createDesktopPage();
647
648         viewFiles = createView("Files",it.businesslogic.ireport.util.I18n.getString("files", "Files"), true, true, jTreeFiles);
649         viewDocumentStructure = createView("Structure",it.businesslogic.ireport.util.I18n.getString("documentStructure", "Document structure"), true, true, documentStructurePanel);
650         viewPropertySheet = createView("Props",it.businesslogic.ireport.util.I18n.getString("elementProperties","Element properties"), true, true, reportElementSheetPanel);
651         jScrollProcesses.setSize(100,100);
652         viewThreads = createView("Threads",it.businesslogic.ireport.util.I18n.getString("threads","Threads"), true, true, jScrollProcesses);
653         viewLibrary = createView("Library",it.businesslogic.ireport.util.I18n.getString("library","Library"), true, true, libraryPanel);
654         logPaneView = createView("logPane",it.businesslogic.ireport.util.I18n.getString("output","Output"), true, true, logPane);
655         stylesPanleView = createView("Styles",it.businesslogic.ireport.util.I18n.getString("stylesLibrary","Styles Library"), true, true, stylesView);
656         crosstabMeasuresPanelView = createView("crosstabObjects",it.businesslogic.ireport.util.I18n.getString("crosstabObjects","Crosstab objects"), false, true, crosstabMeasuresView);
657         crosstabStructureView = createView("crosstabStructure",it.businesslogic.ireport.util.I18n.getString("crosstabStructure","Crosstab structure"), false, true, crosstabStructurePanel);
658
659         jPanelMaster.add(defaultDockingPort, BorderLayout.CENTER);
660
661         jPanelMaster.updateUI();
662         
663         // ------------- ALL TASK THAT DOES NOT NEED TO BE IN THE EDT
664

665         //if (sp!=null) sp.updateLoadingStatus(80,"Loading styles"); // I18N Done on 6th April 06
666
if (sp!=null) sp.updateLoadingStatus(80,it.businesslogic.ireport.util.I18n.getString("loadingStyles", "Loading styles"));
667         loadStyleLibrary();
668         stylesView.updateStyles();
669
670
671         //if (sp!=null) sp.updateLoadingStatus(85,"Loading file lists"); // I18N Done on 6th April 06
672

673         if (sp!=null) sp.updateLoadingStatus(85, it.businesslogic.ireport.util.I18n.getString("loadingFileLists","Loading Loading file lists"));
674
675         loadFileLists();
676         loadExpressionsList();
677
678         updateRecentFileMenu(jMenuRecentFiles, getRecentFilesList() );
679         //updateRecentProjectMenu(jMenuRecentProjects, getRecentProjectsList());
680

681         //IRCompilerDocument doc = new IRCompilerDocument();
682

683         jMenuItemUndo.setAccelerator( javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyEvent.CTRL_DOWN_MASK));
684         jMenuItemRedo.setAccelerator( javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_Y, KeyEvent.CTRL_DOWN_MASK));
685         jCheckBoxMenuItemEMM.setAccelerator( javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_M, KeyEvent.CTRL_DOWN_MASK));
686         jMenuItemCut.setAccelerator( javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_DOWN_MASK));
687         jMenuItemCopy.setAccelerator( javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_DOWN_MASK));
688         jMenuItemPaste.setAccelerator( javax.swing.KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.CTRL_DOWN_MASK));
689
690         jToolbarConnectionPanel.updateConnections();
691
692         clipboards = new Vector[5];
693         for (int i=0; i<5; ++i) {
694             clipboards[i] = new Vector();
695         }
696
697         styleClipboards = new it.businesslogic.ireport.ReportElement[5];
698         for (int i=0; i<5; ++i) {
699             styleClipboards[i] = null;
700         }
701
702         MainFrame.this.setReportViewer(MainFrame.this.getReportViewer());
703         MainFrame.this.disableSaveAllSpecific();
704         MainFrame.this.disableSaveSpecific();
705
706         String JavaDoc irHomeMessageKey = "messages.ireportHome";
707         String JavaDoc irHomeMessageDefault = "iReport home (ireport.home system property): {0}\n";
708         if (args.containsKey("ireport-home"))
709         {
710             irHomeMessageKey = "messages.ireportHome2";
711             irHomeMessageDefault = "iReport home (from command line): {0}\n";
712         }
713
714
715         logOnConsole(
716                 I18n.getFormattedString(irHomeMessageKey, irHomeMessageDefault, new Object JavaDoc[]{ "" + MainFrame.this.IREPORT_HOME_DIR} ));
717
718         irHomeMessageKey = "messages.userHome";
719         irHomeMessageDefault = "User home (user.home system property): {0}\n";
720         if (args.containsKey("ireport-home"))
721         {
722             irHomeMessageKey = "messages.userHome2";
723             irHomeMessageDefault = "User home (from command line): {0}\n";
724         }
725
726         logOnConsole(
727                 I18n.getFormattedString(irHomeMessageKey, irHomeMessageDefault, new Object JavaDoc[]{ "" + MainFrame.this.IREPORT_USER_HOME_DIR} ));
728
729         logOnConsole(
730                 I18n.getFormattedString("messages.compileDir", "iReport default compile directory: {0}\n", new Object JavaDoc[]{ "" + MainFrame.this.getDefaultCompilationDirectory()} ));
731
732         logOnConsole(
733                 I18n.getFormattedString("messages.userHome3",
734                     "iReport user home directory (iReport compiles here if there are no settings or the user hasn't selected to compile to the report directory): {0}\n",
735                     new Object JavaDoc[]{ "" + IREPORT_DEFAULT_HOME_DIR} ));
736
737         if (isUsingWS())
738         {
739                 logOnConsole(I18n.getString("messages.jwsactive", "JWS mode is active"));
740         }
741                       
742         jToolBarText.setVisible( getProperties().getProperty("toolbarTextVisible","false").equalsIgnoreCase("true") );
743         jToolBarFormat.setVisible( getProperties().getProperty("toolbarFormattingVisible","false").equalsIgnoreCase("true") );
744         jToolBarConnections.setVisible( getProperties().getProperty("toolbarConnectionsVisible","true").equalsIgnoreCase("true") );
745
746         jCheckBoxMenuItemElementsFormatting.setSelected( getProperties().getProperty("toolbarFormattingVisible","false").equalsIgnoreCase("true") );
747         jCheckBoxMenuItemTextFormatting.setSelected( getProperties().getProperty("toolbarTextVisible","false").equalsIgnoreCase("true") );
748
749                 
750         
751         try {
752
753                     
754             
755             SwingUtilities.invokeLater(new Runnable JavaDoc() {
756                 public void run() {
757
758                     jPanelMaster.updateUI();
759                     defaultDockingPort.updateUI();
760                     DockingManager.dock(desktop, (DockingPort)defaultDockingPort);
761                     
762                     boolean createLayout = true;
763                     
764                     try {
765                         if (getProperties().getProperty("RestoreLayout","true").equals("true") && DockingManager.loadLayoutModel(false))
766                         {
767                             createLayout = false;
768                             DockingManager.registerDockable((Dockable)logPaneView);
769                             DockingManager.registerDockable((Dockable)viewThreads);
770                             DockingManager.registerDockable((Dockable)viewPropertySheet);
771                             DockingManager.registerDockable((Dockable)viewDocumentStructure);
772                             DockingManager.registerDockable((Dockable)viewLibrary);
773                             DockingManager.registerDockable((Dockable)stylesPanleView);
774
775                         }
776                     } catch (Exception JavaDoc ex)
777                     {
778                         
779                     }
780                     
781                     if (createLayout)
782                     {
783                     //org.flexdock.docking.DockingManager.dock(desktop, (org.flexdock.docking.DockingPort)defaultDockingPort);
784

785                     
786                     DockingManager.dock((Dockable)logPaneView, (Dockable)desktop, DockingConstants.SOUTH_REGION, 0.3f);
787                     //desktop.dock(logPaneView, DockingConstants.SOUTH_REGION); //, .01f);
788
//org.flexdock.docking.DockingManager.setSplitProportion(desktop.getComponent(), 0.2f);
789

790                     DockingManager.dock((Dockable)viewThreads, (Dockable)logPaneView, DockingConstants.EAST_REGION, 0.2f);
791                     //logPaneView.dock(viewThreads, DockingConstants.EAST_REGION, 0.8f);
792
//org.flexdock.docking.DockingManager.setSplitProportion(viewThreads.getComponent(), 0.8f);
793

794                     DockingManager.dock((Dockable)viewPropertySheet, (Dockable)desktop, DockingConstants.EAST_REGION, 0.25f);
795                     //desktop.dock(viewPropertySheet, DockingConstants.EAST_REGION);
796
//org.flexdock.docking.DockingManager.setSplitProportion(viewPropertySheet.getComponent(), 0.75f);
797

798                     
799                     DockingManager.dock((Dockable)viewFiles, (Dockable)desktop, DockingConstants.WEST_REGION, 0.25f);
800                     //desktop.dock(viewFiles, DockingConstants.WEST_REGION);
801
//org.flexdock.docking.DockingManager.setSplitProportion(viewFiles.getComponent(), 0.1f);
802

803                     DockingManager.dock((Dockable)viewDocumentStructure, (Dockable)viewFiles, DockingConstants.SOUTH_REGION, 0.5f);
804                     //viewFiles.dock(viewDocumentStructure, DockingConstants.SOUTH_REGION);
805
//org.flexdock.docking.DockingManager.setSplitProportion(viewDocumentStructure.getComponent(), 0.5f);
806

807                     DockingManager.dock((Dockable)viewLibrary, (Dockable)viewPropertySheet, DockingConstants.SOUTH_REGION, 0.5f);
808                     //viewPropertySheet.dock(viewLibrary, DockingConstants.SOUTH_REGION);
809
//org.flexdock.docking.DockingManager.setSplitProportion(viewLibrary.getComponent(), 0.5f);
810
//defaultDockingPort.doLayout();
811

812                     DockingManager.dock((Dockable)stylesPanleView, (Dockable)viewLibrary, DockingConstants.CENTER_REGION);
813                     //viewLibrary.dock(stylesPanleView, DockingConstants.CENTER_REGION);
814
}
815                     
816                     DockingManager.setAutoPersist(true);
817                     
818                     viewLibrary.setActive(true);
819                     viewFiles.setActive(true);
820
821                     // -----------
822

823                     //Modified by Felix Firgau for I18n on Feb 8th 2006
824
//if (sp!=null) sp.updateLoadingStatus(90,"Loading plugins");
825
if (sp!=null) sp.updateLoadingStatus(90,it.businesslogic.ireport.util.I18n.getString("loadingPlugIns", "Loading plugins"));
826                     //Modification end
827

828                     loadPlugins(IREPORT_HOME_DIR + File.separator + "plugins" );
829
830                     
831                     //it.businesslogic.ireport.util.I18n.setCurrentLocale( properties.getProperty("Language"), properties.getProperty("Country") );
832

833                     //Modified by Felix Firgau for I18n on Feb 8th 2006
834
//if (sp!=null) sp.updateLoadingStatus(95,"Opening files");
835
if (sp!=null) sp.updateLoadingStatus(95,it.businesslogic.ireport.util.I18n.getString("openingFiles","Opening files"));
836                     //Modification end
837

838                     JReportFrame jrf = null;
839                     if (args.containsKey("files")) {
840                         Iterator iter = ((Collection)args.get("files")).iterator();
841                         while (iter.hasNext()) {
842                             try {
843                                 File f = (File)iter.next();
844                                 //Modified by Felix Firgau for I18n on Feb 8th 2006
845
//if (sp!=null) sp.updateLoadingStatus(98,"Opening " + f.getName());
846
if (sp!=null) sp.updateLoadingStatus(98,it.businesslogic.ireport.util.I18n.getString("opening","Opening ") + f.getName());
847                                 //Modification end
848

849                                 Report report = new Report(f.getPath());
850                                 jrf = openNewReportWindow( report );
851
852                             } catch (Exception JavaDoc ex) { }
853                         }
854                     }
855
856
857                     //jSplitPaneHelp.setDividerSize(6);
858
//if (rightColumnWidth > 0) jSplitPaneHelp.setDividerLocation(jSplitPaneHelp.getWidth()-8-200);
859
//dockingContainerRight.setVisible(true);
860
//dockingContainerRight.setPreferredDividerLocation(jSplitPaneHelp.getDividerLocation());
861

862                     
863
864                     try {
865                         if (jrf != null)
866                         {
867                             jrf.setSelected(true);
868                             setActiveReportForm(jrf);
869                         }
870                         else
871                         {
872                             setActiveReportForm(null);
873                         }
874                     } catch (Exception JavaDoc ex)
875                     {
876                     }
877
878                     if (MainFrame.getMainInstance().getProperties().getProperty( "enableRMIServer" ,"false").equals("true") ||
879                        (args.get("embedded") != null && args.get("embedded").equals("true")))
880                     {
881                         if (sp!=null) sp.updateLoadingStatus(99,it.businesslogic.ireport.util.I18n.getString("runningRMIServer","Running RMI server... "));
882                         IReportServerImpl.runServer();
883                         //IReportTCPServer.runServer();
884
}
885                     setCrosstabActive(null);
886                     it.businesslogic.ireport.util.I18n.setCurrentLocale( properties.getProperty("Language"), properties.getProperty("Country") );
887
888                     
889                     if (sp!=null) sp.setVisible(false);
890                     
891                     // Load previous docking state
892
//try {
893
// DockingManager.loadLayoutModel();
894
// DockingManager.restoreLayout();
895
//} catch(Exception ex) {
896
// ex.printStackTrace();
897
//}
898

899                     
900         
901             }}); // End later invocation
902
//} catch (InvocationTargetException ex) {
903
// ex.printStackTrace();
904
//} catch (InterruptedException ex) {
905
// ex.printStackTrace();
906
//} // End later invocation
907

908         } catch (Exception JavaDoc ex) {
909             ex.printStackTrace();
910         }
911         
912         // Other stuffs....
913
net.sf.jasperreports.engine.util.JRProperties.setProperty("net.sf.jasperreports.query.executer.factory.xmla-mdx",
914                     "net.sf.jasperreports.engine.query.JRXmlaQueryExecuterFactory");
915         
916         
917         this.getRootPane().updateUI();
918     }
919
920     /**
921      * Retrieve the first unused mane like untitled_report_XXX
922      */

923     public String JavaDoc getFirstNameFree() {
924         JInternalFrame[] frames = jMDIDesktopPane.getAllFrames();
925
926         for (int k=1; ; k++) {
927             String JavaDoc name = it.businesslogic.ireport.util.I18n.getString("untitledReport", "untitled_report_") + k;//I18N on April 28th 2006
928
boolean found = false;
929             for (int i=0; i<frames.length ; ++i) {
930                 if (frames[i] instanceof JReportFrame) {
931                     JReportFrame jrf = (JReportFrame)frames[i];
932                     if (jrf.getReport().getName().equalsIgnoreCase(name)) {
933                         found = true;
934                         break;
935                     }
936                 }
937             }
938             if (!found) {
939                 return name;
940             }
941         }
942     }
943
944
945     public void setFileListActivatedFrame(JReportFrame jrf) {
946         // remove the frame from the documnets list....
947
DefaultTreeModel dtm = (DefaultTreeModel)jTreeFiles.getModel();
948         Enumeration opened_entries = ((DefaultMutableTreeNode)dtm.getRoot()).children();
949         while (opened_entries.hasMoreElements()) {
950             DefaultMutableTreeNode documentEntryNode = (DefaultMutableTreeNode)opened_entries.nextElement();
951             if (documentEntryNode.getUserObject() instanceof DocumentTreeEntry) {
952                 DocumentTreeEntry dte = (DocumentTreeEntry)documentEntryNode.getUserObject();
953                 if (dte.getJrf() == jrf) {
954                     jTreeFiles.setSelectionPath(new TreePath(new Object JavaDoc[]
955                     {dtm.getRoot(), documentEntryNode}));
956                     jTreeFiles.updateUI();
957                     break;
958                 }
959             }
960
961         }
962     }
963
964     public void updateMenuWindowList() {
965         // Remove all menus...
966
java.awt.Component JavaDoc[] menus = this.jMenuWindow.getMenuComponents();
967         int i = 0;
968         for (int k = 0; k<menus.length ; ++k) {
969             if (menus[k] instanceof JRadioButtonMenuItemMDIFrame)
970             {
971                 this.jMenuWindow.remove((JMenuItem)menus[k]);
972                 buttonGroupFramesList.remove((JMenuItem)menus[k]);
973             }
974             /*&&
975             ((JRadioButtonMenuItemMDIFrame)menus[k]).getFrame() != null &&
976             ((JRadioButtonMenuItemMDIFrame)menus[k]).getFrame().isValid() &&
977             ((JRadioButtonMenuItemMDIFrame)menus[k]).getFrame().isVisible()) {
978                 JRadioButtonMenuItemMDIFrame menuItem = (JRadioButtonMenuItemMDIFrame)menus[k];
979                 menuItem.setText( (i+1) + ".*** " + menuItem.getFrame().getTitle() );
980                 menuItem.setMnemonic((int)(((i+1)+"").charAt(0)) );
981                 menuItem.setFont(new java.awt.Font("Tahoma", 0, 11));
982                 menuItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke((int)(((i+1)+"").charAt(0)),java.awt.Event.META_MASK));
983                 menuItem.updateUI();
984                 i++;
985
986                 System.out.println("Menu "+ menuItem.getFrame().getTitle());
987             }
988             */

989         }
990
991         i=0;
992         JInternalFrame[] frames = jMDIDesktopPane.getAllFrames();
993         for (int k=0; k<frames.length; ++k)
994         {
995                 JRadioButtonMenuItemMDIFrame menuItem = new JRadioButtonMenuItemMDIFrame((JMDIFrame)frames[k],frames[k].getTitle());
996                 menuItem.setText( (i+1) + ". " + menuItem.getFrame().getTitle() );
997                 menuItem.setMnemonic((int)(((i+1)+"").charAt(0)) );
998                 menuItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke((int)(((i+1)+"").charAt(0)),java.awt.Event.META_MASK));
999                 menuItem.updateUI();
1000                menuItem.setSelected(frames[i].isSelected());
1001                this.jMenuWindow.insert(menuItem, this.jMenuWindow.getMenuComponentCount());
1002                menuItem.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1003                        public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1004                            jMenuWindowListActionPerformed(evt);
1005                        }
1006                    });
1007                buttonGroupFramesList.add(menuItem);
1008                i++;
1009        }
1010
1011    }
1012
1013
1014    public void jMenuWindowListActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1015        if (evt.getSource() != null &&
1016        evt.getSource() instanceof JRadioButtonMenuItemMDIFrame) {
1017            JRadioButtonMenuItemMDIFrame mdm = (JRadioButtonMenuItemMDIFrame)evt.getSource();
1018            try {
1019
1020                mdm.getFrame().setSelected(true);
1021            } catch (Exception JavaDoc ex)
1022            {}
1023        }
1024
1025    }
1026
1027    public void jMDIDesktopPaneInternalFrameActivated(InternalFrameActivatedEvent evt) {
1028        if (evt.getJMDIFrame() != null && evt.getAction() == InternalFrameActivatedEvent.CLOSED) {
1029            // remove the frame from the documnets list....
1030
DefaultTreeModel dtm = (DefaultTreeModel)jTreeFiles.getModel();
1031            Enumeration opened_entries = ((DefaultMutableTreeNode)dtm.getRoot()).children();
1032            while (opened_entries.hasMoreElements()) {
1033                DefaultMutableTreeNode documentEntryNode = (DefaultMutableTreeNode)opened_entries.nextElement();
1034                if (documentEntryNode.getUserObject() instanceof DocumentTreeEntry) {
1035                    DocumentTreeEntry dte = (DocumentTreeEntry)documentEntryNode.getUserObject();
1036                    if (dte.getJrf() == evt.getJMDIFrame()) {
1037                        ((DefaultMutableTreeNode)dtm.getRoot()).remove(documentEntryNode);
1038                        jTreeFiles.updateUI();
1039
1040                        break;
1041                    }
1042                }
1043
1044            }
1045            // Remove from window list...
1046
java.awt.Component JavaDoc[] menus = this.jMenuWindow.getMenuComponents();
1047            for (int k = menus.length-1; k>=0 ; --k) {
1048                if (menus[k] instanceof JRadioButtonMenuItemMDIFrame &&
1049                ((JRadioButtonMenuItemMDIFrame)menus[k]).getFrame() == evt.getJMDIFrame()) {
1050                    this.jMenuWindow.remove(menus[k]);
1051                }
1052            }
1053            updateMenuWindowList();
1054            return;
1055        }
1056
1057        if (evt.getJMDIFrame() == null) {
1058            this.setTitle(constTitle);
1059            setCrosstabActive( null);
1060            setActiveReportForm( null );
1061            updateMenuWindowList();
1062            return;
1063        }
1064
1065
1066        this.setTitle(constTitle + " ["+ evt.getJMDIFrame().getTitle() + "]");
1067        jMDIMenuBar.restoreButtonsPosition();
1068        //System.out.println("Value setted!");
1069
if (evt.getJMDIFrame() instanceof JReportFrame) {
1070
1071            JReportFrame jrf = (JReportFrame)evt.getJMDIFrame();
1072
1073            if (jrf.getSelectedCrosstabEditorPanel() != null)
1074            {
1075                this.jNumberComboBoxZoom.setValue(jrf.getSelectedCrosstabEditorPanel().getZoomFactor()*100);
1076            }
1077            else
1078            {
1079                this.jNumberComboBoxZoom.setValue(jrf.getZoomFactor()*100);
1080            }
1081
1082            // Set the fit to page value...
1083
setFileListActivatedFrame(jrf);
1084            //updateFitToPage(jrf);
1085

1086            // Enable all buttons and menus...
1087
setActiveReportForm( jrf );
1088            if (jrf.getSelectedCrosstabEditorPanel() != null)
1089            {
1090                setCrosstabActive(jrf.getSelectedCrosstabEditorPanel().getCrosstabElement());
1091            }
1092            else
1093            {
1094                setCrosstabActive( null);
1095            }
1096        }
1097        else {
1098            //System.out.println("Chiusetutte lengthfinestre!");
1099
setCrosstabActive( null);
1100            setActiveReportForm( null );
1101        }
1102    }
1103
1104    public void renewTitle(JReportFrame jrf)
1105    {
1106        String JavaDoc title = jrf.getReport().getName() + " "+
1107                jrf.getReport().getWidth()+"x"+jrf.getReport().getHeight()+" "+
1108                "(" + (jrf.getReport().getReportChanges()>0 ?"Modified" : "Unchanged") + ") " +
1109                jrf.getReport().getFilename()+(jrf.getReport().isReadOnly()?" (READ ONLY) ":"");
1110        this.setTitle(constTitle +
1111                " [" + title + "]");
1112    }
1113
1114    public void setActiveReportForm(JReportFrame jrf)
1115    {
1116        boolean enabled = true;
1117        if (jrf == null)
1118        {
1119            enabled = false;
1120        }
1121        else
1122        {
1123            renewTitle(jrf);
1124        }
1125        if(jrf != null && jrf.getReport().isReadOnly())
1126        {
1127            enabled = false;
1128        }
1129
1130
1131
1132        if (jrf != null)
1133        {
1134            java.awt.Component JavaDoc[] menus = this.jMenuWindow.getMenuComponents();
1135            for (int k = menus.length-1; k>=0 ; --k)
1136            {
1137                if (menus[k] instanceof JRadioButtonMenuItemMDIFrame &&
1138                        ((JRadioButtonMenuItemMDIFrame)menus[k]).getFrame() == jrf)
1139                {
1140                    ((JRadioButtonMenuItemMDIFrame)menus[k]).setSelected(true);
1141                }
1142            }
1143
1144        }
1145
1146        this.elementPropertiesDialog.setJReportFrame(jrf);
1147        this.valuesDialog.setJReportFrame(jrf);
1148        this.groupsDialog.setJReportFrame(jrf);
1149        this.bandsDialog.setJReportFrame(jrf);
1150        this.fontsDialog.setJReportFrame(jrf);
1151
1152        if (jrf == null) this.reportQueryDialog.setVisible(false);
1153        else this.reportQueryDialog.setSubDataset(jrf.getReport() );
1154
1155        this.libraryPanel.setJReportFrame(jrf);
1156        this.localeFilesDialog.setJReportFrame(jrf);
1157
1158        getDocumentStructurePanel().updateDocumentStructureTree( jrf);
1159
1160        updateUndoMenu(jrf);
1161        updateCutAndPasteMenu(jrf);
1162        // Toolbar...
1163
this.jButtonBands.setEnabled(enabled);
1164        this.jButtonDatabase.setEnabled(enabled);
1165        this.jMenuItemReportQuery2.setEnabled(enabled);
1166        this.jButtonParameters.setEnabled(enabled);
1167        this.jButtonGroups.setEnabled(enabled);
1168        this.jButtonCompiler.setEnabled(enabled);
1169        this.jButtonRun1.setEnabled(enabled);
1170        this.jButtonRun2.setEnabled(enabled);
1171        
1172        boolean frameOpened = false;
1173        if (jrf != null) frameOpened = true;
1174            
1175        jMenuItemSave.setEnabled(enabled);
1176        jMenuItemSaveAs.setEnabled(frameOpened);
1177        jMenuAdd.setEnabled(enabled);
1178        jMenuItemClose.setEnabled(frameOpened);
1179        jMenuItemCloseAll.setEnabled(frameOpened);
1180        jMenuItemCloseAllExceptThis.setEnabled(frameOpened);
1181        jMenuItemCloseAllExceptThisFromList.setEnabled(frameOpened);
1182        jMenuItemCloseAllFromList.setEnabled(frameOpened);
1183        jMenuItemCloseFromList.setEnabled(frameOpened);
1184        jMenuItemRevertToSaved.setEnabled(enabled);
1185        jMenuItemCompile.setEnabled(frameOpened);
1186        jMenuItemExecute.setEnabled(frameOpened);
1187        jMenuItemExecuteDB.setEnabled(frameOpened);
1188        jMenuWindow.setEnabled(frameOpened);
1189        jButtonLens1.setEnabled(frameOpened);
1190        jButtonLens2.setEnabled(frameOpened);
1191        jNumberComboBoxZoom.setEnabled(frameOpened);
1192        jMenuItemPrint.setEnabled(frameOpened);
1193        
1194        
1195        // Enable or disable all element in toolbars...
1196
for (int cc = 0; cc < jToolBarText.getComponentCount(); ++cc)
1197        {
1198            java.awt.Component JavaDoc component = jToolBarText.getComponentAtIndex(cc);
1199            if (component instanceof javax.swing.JButton JavaDoc)
1200            {
1201                ((javax.swing.JButton JavaDoc)component).setEnabled( enabled );
1202            }
1203            else if (component instanceof javax.swing.JComboBox JavaDoc)
1204            {
1205                ((javax.swing.JComboBox JavaDoc)component).setEnabled( enabled );
1206            }
1207            else if (component instanceof JBoxButton)
1208            {
1209                ((JBoxButton)component).setEnabled( enabled );
1210            }
1211        }
1212
1213        // Enable or disable all element in toolbars...
1214
for (int cc = 0; cc < jToolBarFormat.getComponentCount(); ++cc)
1215        {
1216            java.awt.Component JavaDoc component = jToolBarFormat.getComponentAtIndex(cc);
1217            if (component instanceof javax.swing.JButton JavaDoc)
1218            {
1219                ((javax.swing.JButton JavaDoc)component).setEnabled( enabled );
1220            }
1221            else if (component instanceof javax.swing.JComboBox JavaDoc)
1222            {
1223                ((javax.swing.JComboBox JavaDoc)component).setEnabled( enabled );
1224            }
1225        }
1226        /*
1227        this.jButtonAlignLeft.setEnabled(enabled);
1228        this.jButtonAlignCenter.setEnabled(enabled);
1229        this.jButtonAlignRight.setEnabled(enabled);
1230        this.jButtonAlignJustify.setEnabled(enabled);
1231         */

1232
1233        this.jToggleButtonEllipseTool.setEnabled(enabled);
1234        this.jToggleButtonImageTool.setEnabled(enabled);
1235        this.jToggleButtonLineTool.setEnabled(enabled);
1236
1237        this.jToggleButtonPointer.setEnabled(enabled);
1238       //this.jToggleButtonRectRoundTool.setEnabled(enabled);
1239
this.jToggleButtonRectTool.setEnabled(enabled);
1240        this.jButtonSave.setEnabled(enabled);
1241        this.jToggleButtonStaticTextTool.setEnabled(enabled);
1242        this.jToggleButtonFrameTool.setEnabled(enabled);
1243        this.jToggleButtonSubreportTool.setEnabled(enabled);
1244        this.jToggleButtonCrosstabTool.setEnabled(enabled);
1245        this.jToggleButtonChartTool.setEnabled(enabled);
1246        this.jToggleButtonBarcodeTool.setEnabled(enabled);
1247        this.jToggleButtonTextFieldTool.setEnabled(enabled);
1248        this.jMenuItemXMLSource.setEnabled(enabled);
1249        this.jCheckBoxMenuItemEMM.setEnabled(enabled);
1250        this.jCheckBoxMenuItemReportVirtualizer.setEnabled(enabled);
1251        this.jCheckBoxMenuItemIgnorePagination.setEnabled(enabled);
1252        this.jCheckBoxMenuItemGrid.setEnabled(enabled);
1253        this.jCheckBoxMenuItemSnapToGrid.setEnabled(enabled);
1254        this.jMenuAdd.setEnabled(enabled);
1255
1256        this.jMenuItemInsertPageBreak.setEnabled(enabled);
1257        this.jMenuItemBands.setEnabled(enabled);
1258        this.jMenuItemGroups.setEnabled(enabled);
1259        this.jMenuItemReportProperties.setEnabled(enabled);
1260        this.jMenuItemProperties.setEnabled(enabled);
1261        this.jMenuItemElementProperties.setEnabled(enabled);
1262        this.jMenuItemFields.setEnabled(enabled);
1263        this.jMenuItemAddGroup.setEnabled(enabled);
1264        this.jMenuItemVariables.setEnabled(enabled);
1265        this.jMenuItemSubDataset.setEnabled(enabled);
1266        this.jMenuItemSubDataset1.setEnabled(enabled);
1267        this.jMenuItemParameters.setEnabled(enabled);
1268        this.jMenuItemReportQuery.setEnabled(enabled);
1269        this.jMenuItemReportQuery2.setEnabled(enabled);
1270        this.jMenuItemFonts.setEnabled(enabled);
1271        this.jMenuItemStyles.setEnabled(enabled);
1272        this.jMenuItemScriptletEditor.setEnabled(enabled);
1273        //this.jMenuItemReportSeries.setEnabled(enabled);
1274
this.jMenuItemReportImports.setEnabled(enabled);
1275        this.jMenuInternationalization.setEnabled(enabled);
1276        this.jMenuItemRemoveMargins.setEnabled(enabled);
1277
1278        jMDIDesktopPane.setPreferredSize(new java.awt.Dimension JavaDoc(100,10));
1279        jMDIDesktopPane.setMinimumSize(new java.awt.Dimension JavaDoc(100,10));
1280        //jMDIDesktopPane.setPreferredSize(new Dimension(100,100));
1281
setActiveTool(this.jToggleButtonPointer);
1282        if (!enabled)
1283        {
1284            this.jToggleButtonPointer.setSelected(false);
1285        }
1286        if (jrf != null)
1287        {
1288            Report r = jrf.getReport();
1289            if( r.isModified() )
1290            {
1291                this.enableSaveSpecific();
1292                this.enableSaveAllSpecific();
1293                //end if report modified
1294
}
1295            else
1296            {
1297                this.disableSaveSpecific();
1298                if ( this.isSaveAllRequired() )
1299                {
1300                    this.enableSaveAllSpecific();
1301                }
1302                else
1303                {
1304                    this.disableSaveAllSpecific();
1305                }
1306                //end else report modified
1307
}
1308        }//end if jrf is null
1309

1310        fireReportFrameActivatedListenerReportFrameActivated( new ReportFrameActivatedEvent(this, jrf) );
1311
1312    }//end setActiveReportForm
1313

1314    public boolean isEMMActive()
1315    {
1316        return this.jCheckBoxMenuItemEMM.isSelected();
1317    }
1318
1319    public boolean isUseReportVirtualizer()
1320    {
1321        return this.jCheckBoxMenuItemReportVirtualizer.isSelected();
1322    }
1323    public boolean isIgnorePagination()
1324    {
1325        return this.jCheckBoxMenuItemIgnorePagination.isSelected();
1326    }
1327
1328    public void setActiveTool( int tool )
1329    {
1330        if (tool == 0)
1331            setActiveTool(this.jToggleButtonPointer);
1332    }
1333    private void setActiveTool( java.awt.Component JavaDoc tool )
1334    {
1335        try
1336        {
1337            this.jToggleButtonEllipseTool.setSelected( (tool ==this.jToggleButtonEllipseTool) );
1338            this.jToggleButtonImageTool.setSelected( (tool ==this.jToggleButtonImageTool) );
1339            this.jToggleButtonLineTool.setSelected( (tool ==this.jToggleButtonLineTool) );
1340            this.jToggleButtonPointer.setSelected( (tool ==this.jToggleButtonPointer) );
1341            //this.jToggleButtonRectRoundTool.setSelected( (tool ==this.jToggleButtonRectRoundTool) );
1342
this.jToggleButtonRectTool.setSelected( (tool ==this.jToggleButtonRectTool) );
1343            this.jToggleButtonStaticTextTool.setSelected( (tool ==this.jToggleButtonStaticTextTool) );
1344            this.jToggleButtonFrameTool.setSelected( (tool ==this.jToggleButtonFrameTool) );
1345            this.jToggleButtonSubreportTool.setSelected( (tool ==this.jToggleButtonSubreportTool) );
1346            this.jToggleButtonCrosstabTool.setSelected( (tool ==this.jToggleButtonCrosstabTool) );
1347            this.jToggleButtonChartTool.setSelected( (tool ==this.jToggleButtonChartTool) );
1348            this.jToggleButtonBarcodeTool.setSelected( (tool ==this.jToggleButtonBarcodeTool) );
1349            this.jToggleButtonTextFieldTool.setSelected( (tool ==this.jToggleButtonTextFieldTool) );
1350        }
1351        catch (Exception JavaDoc ex)
1352        {
1353            /* Do nothing */
1354        }
1355    }
1356
1357    // Robert says:
1358
// As Fit To Page is calculated every time is it called,
1359
// There is not need for this method
1360
// Giulio do you agree?
1361

1362    public void updateFitToPage(JReportFrame jrf)
1363    {
1364        int w = jrf.getReport().getWidth();
1365        double s = (jrf.getReportPanel().getWidth()-20)/(double)w;
1366        jNumberComboBoxZoom.addEntry("Fit to page", s*100);
1367    }
1368    /** This method is called from within the constructor to
1369     * initialize the form.
1370     * WARNING: Do NOT modify this code. The content of this method is
1371     * always regenerated by the Form Editor.
1372     */

1373    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
1374
private void initComponents() {
1375        buttonGroupExportType = new javax.swing.ButtonGroup JavaDoc();
1376        buttonGroupFramesList = new javax.swing.ButtonGroup JavaDoc();
1377        jPopupMenuThreads = new javax.swing.JPopupMenu JavaDoc();
1378        jMenuItemKill = new javax.swing.JMenuItem JavaDoc();
1379        jPopupMenuFiles = new javax.swing.JPopupMenu JavaDoc();
1380        jMenuItemSaveFromList = new javax.swing.JMenuItem JavaDoc();
1381        jMenuItemSaveAsFromList = new javax.swing.JMenuItem JavaDoc();
1382        jMenuItemSaveAllFromList = new javax.swing.JMenuItem JavaDoc();
1383        jSeparator24 = new javax.swing.JSeparator JavaDoc();
1384        jMenuItemCloseFromList = new javax.swing.JMenuItem JavaDoc();
1385        jMenuItemCloseAllFromList = new javax.swing.JMenuItem JavaDoc();
1386        jMenuItemCloseAllExceptThisFromList = new javax.swing.JMenuItem JavaDoc();
1387        jSeparator27 = new javax.swing.JSeparator JavaDoc();
1388        jMenuItemRevertToSavedFromList = new javax.swing.JMenuItem JavaDoc();
1389        jPanelFiles = new javax.swing.JPanel JavaDoc();
1390        jScrollPaneFiles = new javax.swing.JScrollPane JavaDoc();
1391        jTreeFiles = new javax.swing.JTree JavaDoc();
1392        jMDIDesktopPane = new it.businesslogic.ireport.gui.JMDIDesktopPane();
1393        jScrollProcesses = new javax.swing.JScrollPane JavaDoc();
1394        jListThreads = new javax.swing.JList JavaDoc();
1395        jPanel1 = new javax.swing.JPanel JavaDoc();
1396        jToolBarText = new javax.swing.JToolBar JavaDoc();
1397        jComboBoxFont = new javax.swing.JComboBox JavaDoc();
1398        jNumberComboBoxSize = new it.businesslogic.ireport.gui.JNumberComboBox();
1399        jButtonIncreaseSize = new javax.swing.JButton JavaDoc();
1400        jButtonDecreaseSize = new javax.swing.JButton JavaDoc();
1401        jButtonBold = new javax.swing.JButton JavaDoc();
1402        jButtonItalic = new javax.swing.JButton JavaDoc();
1403        jButtonUnderline = new javax.swing.JButton JavaDoc();
1404        jButtonStrikethrought = new javax.swing.JButton JavaDoc();
1405        jButtonAlignLeft = new javax.swing.JButton JavaDoc();
1406        jButtonAlignJustify = new javax.swing.JButton JavaDoc();
1407        jButtonAlignCenter = new javax.swing.JButton JavaDoc();
1408        jButtonAlignRight = new javax.swing.JButton JavaDoc();
1409        jButtonAlignTop = new javax.swing.JButton JavaDoc();
1410        jButtonAlignMiddle = new javax.swing.JButton JavaDoc();
1411        jButtonAlignBottom = new javax.swing.JButton JavaDoc();
1412        jToolBarConnections = jToolbarConnectionPanel.getToolBar();
1413        Filler1 = new javax.swing.JButton JavaDoc();
1414        jPanel2 = new javax.swing.JPanel JavaDoc();
1415        jToolBarFormat = jToolbarFormatPanel.getToolBar();
1416        Filler = new javax.swing.JButton JavaDoc();
1417        jPanelMaster = new javax.swing.JPanel JavaDoc();
1418        jToolBar1 = new javax.swing.JToolBar JavaDoc();
1419        jButtonNew = new javax.swing.JButton JavaDoc();
1420        jButtonWizard = new javax.swing.JButton JavaDoc();
1421        jButtonOpen = new javax.swing.JButton JavaDoc();
1422        jButtonSave = new javax.swing.JButton JavaDoc();
1423        jButtonSaveAll = new javax.swing.JButton JavaDoc();
1424        jSeparator22 = new javax.swing.JSeparator JavaDoc();
1425        jButtonCut = new javax.swing.JButton JavaDoc();
1426        jButtonCopy = new javax.swing.JButton JavaDoc();
1427        jButtonPaste = new javax.swing.JButton JavaDoc();
1428        jSeparator23 = new javax.swing.JSeparator JavaDoc();
1429        jToggleButtonPointer = new javax.swing.JToggleButton JavaDoc();
1430        jToggleButtonLineTool = new javax.swing.JToggleButton JavaDoc();
1431        jToggleButtonRectTool = new javax.swing.JToggleButton JavaDoc();
1432        jToggleButtonEllipseTool = new javax.swing.JToggleButton JavaDoc();
1433        jToggleButtonStaticTextTool = new javax.swing.JToggleButton JavaDoc();
1434        jToggleButtonTextFieldTool = new javax.swing.JToggleButton JavaDoc();
1435        jToggleButtonImageTool = new javax.swing.JToggleButton JavaDoc();
1436        jToggleButtonBarcodeTool = new javax.swing.JToggleButton JavaDoc();
1437        jToggleButtonFrameTool = new javax.swing.JToggleButton JavaDoc();
1438        jToggleButtonChartTool = new javax.swing.JToggleButton JavaDoc();
1439        jToggleButtonSubreportTool = new javax.swing.JToggleButton JavaDoc();
1440        jToggleButtonCrosstabTool = new javax.swing.JToggleButton JavaDoc();
1441        jSeparator30 = new javax.swing.JSeparator JavaDoc();
1442        jButtonParameters = new javax.swing.JButton JavaDoc();
1443        jButtonBands = new javax.swing.JButton JavaDoc();
1444        jButtonGroups = new javax.swing.JButton JavaDoc();
1445        jButtonDatabase = new javax.swing.JButton JavaDoc();
1446        jSeparator31 = new javax.swing.JSeparator JavaDoc();
1447        jPanelZoom = new javax.swing.JPanel JavaDoc();
1448        jNumberComboBoxZoom = new it.businesslogic.ireport.gui.JNumberComboBox();
1449        jButtonLens1 = new javax.swing.JButton JavaDoc();
1450        jButtonLens2 = new javax.swing.JButton JavaDoc();
1451        jSeparator32 = new javax.swing.JSeparator JavaDoc();
1452        jButtonCompiler = new javax.swing.JButton JavaDoc();
1453        jButtonRun1 = new javax.swing.JButton JavaDoc();
1454        jButtonRun2 = new javax.swing.JButton JavaDoc();
1455        jMDIMenuBar = new it.businesslogic.ireport.gui.JMDIMenuBar();
1456        jMenuFile = new javax.swing.JMenu JavaDoc();
1457        jMenuItemNewDocument = new javax.swing.JMenuItem JavaDoc();
1458        jMenuItemWizard = new javax.swing.JMenuItem JavaDoc();
1459        jMenuItemOpen = new javax.swing.JMenuItem JavaDoc();
1460        jMenuItemSave = new javax.swing.JMenuItem JavaDoc();
1461        jMenuItemSaveAs = new javax.swing.JMenuItem JavaDoc();
1462        jMenuItemSaveAll = new javax.swing.JMenuItem JavaDoc();
1463        jMenuItemClose = new javax.swing.JMenuItem JavaDoc();
1464        jMenuItemCloseAll = new javax.swing.JMenuItem JavaDoc();
1465        jMenuItemCloseAllExceptThis = new javax.swing.JMenuItem JavaDoc();
1466        jSeparator3 = new javax.swing.JSeparator JavaDoc();
1467        jMenuItemPrint = new javax.swing.JMenuItem JavaDoc();
1468        jMenuItemRevertToSaved = new javax.swing.JMenuItem JavaDoc();
1469        jSeparator16 = new javax.swing.JSeparator JavaDoc();
1470        jMenuRecentFiles = new javax.swing.JMenu JavaDoc();
1471        jSeparator15 = new javax.swing.JSeparator JavaDoc();
1472        jMenuItemQuit = new javax.swing.JMenuItem JavaDoc();
1473        jMenuEdit = new javax.swing.JMenu JavaDoc();
1474        jMenuItemUndo = new javax.swing.JMenuItem JavaDoc();
1475        jMenuItemRedo = new javax.swing.JMenuItem JavaDoc();
1476        jSeparator1 = new javax.swing.JSeparator JavaDoc();
1477        jMenuItemCut = new javax.swing.JMenuItem JavaDoc();
1478        jMenuItemCopy = new javax.swing.JMenuItem JavaDoc();
1479        jMenuItemPaste = new javax.swing.JMenuItem JavaDoc();
1480        jMenuItemDelete = new javax.swing.JMenuItem JavaDoc();
1481        jSeparator2 = new javax.swing.JSeparator JavaDoc();
1482        jMenuItemInsertPageBreak = new javax.swing.JMenuItem JavaDoc();
1483        jMenuAdd = new javax.swing.JMenu JavaDoc();
1484        jMenuItemLine = new javax.swing.JMenuItem JavaDoc();
1485        jMenuItemRectangle = new javax.swing.JMenuItem JavaDoc();
1486        jMenuItemRoundRectangle = new javax.swing.JMenuItem JavaDoc();
1487        jMenuItemEllipse = new javax.swing.JMenuItem JavaDoc();
1488        jMenuItemImage = new javax.swing.JMenuItem JavaDoc();
1489        jMenuItemStaticText = new javax.swing.JMenuItem JavaDoc();
1490        jMenuItemTextField = new javax.swing.JMenuItem JavaDoc();
1491        jMenuItemChart = new javax.swing.JMenuItem JavaDoc();
1492        jMenuItemSubreport = new javax.swing.JMenuItem JavaDoc();
1493        jMenuItemAddGroup = new javax.swing.JMenuItem JavaDoc();
1494        jMenuItemElementProperties = new javax.swing.JMenuItem JavaDoc();
1495        jMenuItemXMLSource = new javax.swing.JMenuItem JavaDoc();
1496        jMenuInternationalization = new javax.swing.JMenu JavaDoc();
1497        jMenuLocaleFiles = new javax.swing.JMenuItem JavaDoc();
1498        jSeparator25 = new javax.swing.JSeparator JavaDoc();
1499        jMenuItemReportProperties = new javax.swing.JMenuItem JavaDoc();
1500        jMenuItemProperties = new javax.swing.JMenuItem JavaDoc();
1501        jMenuItemReportImports = new javax.swing.JMenuItem JavaDoc();
1502        jMenuItemScriptletEditor = new javax.swing.JMenuItem JavaDoc();
1503        jSeparator26 = new javax.swing.JSeparator JavaDoc();
1504        jMenuItemReportQuery = new javax.swing.JMenuItem JavaDoc();
1505        jMenuItemSubDataset = new javax.swing.JMenuItem JavaDoc();
1506        jSeparator28 = new javax.swing.JSeparator JavaDoc();
1507        jMenuItemRemoveMargins = new javax.swing.JMenuItem JavaDoc();
1508        jMenuView = new javax.swing.JMenu JavaDoc();
1509        jCheckBoxMenuItemGrid = new javax.swing.JCheckBoxMenuItem JavaDoc();
1510        jSeparator4 = new javax.swing.JSeparator JavaDoc();
1511        jMenuPanels = new javax.swing.JMenu JavaDoc();
1512        jCheckBoxMenuItemExplorer = new javax.swing.JCheckBoxMenuItem JavaDoc();
1513        jCheckBoxMenuItemDocumentStructure = new javax.swing.JCheckBoxMenuItem JavaDoc();
1514        jCheckBoxMenuItemElementProperties = new javax.swing.JCheckBoxMenuItem JavaDoc();
1515        jCheckBoxMenuItemLibrary = new javax.swing.JCheckBoxMenuItem JavaDoc();
1516        jCheckBoxMenuItemStylesLibrary = new javax.swing.JCheckBoxMenuItem JavaDoc();
1517        jCheckBoxMenuItemOutput = new javax.swing.JCheckBoxMenuItem JavaDoc();
1518        jCheckBoxMenuItemThreadList = new javax.swing.JCheckBoxMenuItem JavaDoc();
1519        jMenuToolBars = new javax.swing.JMenu JavaDoc();
1520        jCheckBoxMenuItemTextFormatting = new javax.swing.JCheckBoxMenuItem JavaDoc();
1521        jCheckBoxMenuItemElementsFormatting = new javax.swing.JCheckBoxMenuItem JavaDoc();
1522        jSeparator12 = new javax.swing.JSeparator JavaDoc();
1523        jMenuItemFields = new javax.swing.JMenuItem JavaDoc();
1524        jMenuItemVariables = new javax.swing.JMenuItem JavaDoc();
1525        jMenuItemParameters = new javax.swing.JMenuItem JavaDoc();
1526        jSeparator6 = new javax.swing.JSeparator JavaDoc();
1527        jMenuItemBands = new javax.swing.JMenuItem JavaDoc();
1528        jMenuItemGroups = new javax.swing.JMenuItem JavaDoc();
1529        jMenuFormat = new javax.swing.JMenu JavaDoc();
1530        jMenuItemStyles = new javax.swing.JMenuItem JavaDoc();
1531        jMenuItemFonts = new javax.swing.JMenuItem JavaDoc();
1532        jSeparator29 = new javax.swing.JSeparator JavaDoc();
1533        jMenuAlign = new javax.swing.JMenu JavaDoc();
1534        jMenuItemAlignLeft = new javax.swing.JMenuItem JavaDoc();
1535        jMenuItemAlignRight = new javax.swing.JMenuItem JavaDoc();
1536        jMenuItemAlignTop = new javax.swing.JMenuItem JavaDoc();
1537        jMenuItemAlignBottom = new javax.swing.JMenuItem JavaDoc();
1538        jSeparator19 = new javax.swing.JSeparator JavaDoc();
1539        jMenuItemAlignVerticalAxis = new javax.swing.JMenuItem JavaDoc();
1540        jMenuItemAlignHorizontalAxis = new javax.swing.JMenuItem JavaDoc();
1541        jSeparator20 = new javax.swing.JSeparator JavaDoc();
1542        jMenuItemAlignToBandTop = new javax.swing.JMenuItem JavaDoc();
1543        jMenuItemAlignToBandBottom = new javax.swing.JMenuItem JavaDoc();
1544        jMenuSize = new javax.swing.JMenu JavaDoc();
1545        jMenuItemSameWidth = new javax.swing.JMenuItem JavaDoc();
1546        jMenuItemSameWidthMax = new javax.swing.JMenuItem JavaDoc();
1547        jMenuItemSameWidthMin = new javax.swing.JMenuItem JavaDoc();
1548        jSeparator17 = new javax.swing.JSeparator JavaDoc();
1549        jMenuItemSameHeight = new javax.swing.JMenuItem JavaDoc();
1550        jMenuItemSameHeightMin = new javax.swing.JMenuItem JavaDoc();
1551        jMenuItemSameHeightMax = new javax.swing.JMenuItem JavaDoc();
1552        jSeparator18 = new javax.swing.JSeparator JavaDoc();
1553        jMenuItemSameSize = new javax.swing.JMenuItem JavaDoc();
1554        jMenuPosition = new javax.swing.JMenu JavaDoc();
1555        jMenuItemCenterH = new javax.swing.JMenuItem JavaDoc();
1556        jMenuItemCenterV = new javax.swing.JMenuItem JavaDoc();
1557        jMenuItemCenterInBand = new javax.swing.JMenuItem JavaDoc();
1558        jMenuItemCenterBackground = new javax.swing.JMenuItem JavaDoc();
1559        jMenuItemJoinLeft = new javax.swing.JMenuItem JavaDoc();
1560        jMenuItemJoinRight = new javax.swing.JMenuItem JavaDoc();
1561        jMenuItemLeftMargin = new javax.swing.JMenuItem JavaDoc();
1562        jMenuItemRightMargin = new javax.swing.JMenuItem JavaDoc();
1563        jSeparator5 = new javax.swing.JSeparator JavaDoc();
1564        jMenuHSpacing = new javax.swing.JMenu JavaDoc();
1565        jMenuItemHSMakeEqual = new javax.swing.JMenuItem JavaDoc();
1566        jMenuItemHSIncrease = new javax.swing.JMenuItem JavaDoc();
1567        jMenuItemHSDecrease = new javax.swing.JMenuItem JavaDoc();
1568        jMenuItemHSRemove = new javax.swing.JMenuItem JavaDoc();
1569        jMenuVSpacing = new javax.swing.JMenu JavaDoc();
1570        jMenuItemVSMakeEqual = new javax.swing.JMenuItem JavaDoc();
1571        jMenuItemVSIncrease = new javax.swing.JMenuItem JavaDoc();
1572        jMenuItemVSDecrease = new javax.swing.JMenuItem JavaDoc();
1573        jMenuItemVSRemove = new javax.swing.JMenuItem JavaDoc();
1574        jMenuItemOrganize = new javax.swing.JMenuItem JavaDoc();
1575        jSeparator8 = new javax.swing.JSeparator JavaDoc();
1576        jMenuItemBringToFront = new javax.swing.JMenuItem JavaDoc();
1577        jMenuItemSendToBack = new javax.swing.JMenuItem JavaDoc();
1578        jMenuDatabase = new javax.swing.JMenu JavaDoc();
1579        jMenuItemConnections = new javax.swing.JMenuItem JavaDoc();
1580        jMenuItemActiveConnection = new javax.swing.JMenuItem JavaDoc();
1581        jSeparator9 = new javax.swing.JSeparator JavaDoc();
1582        jMenuItemReportQuery2 = new javax.swing.JMenuItem JavaDoc();
1583        jMenuItemSubDataset1 = new javax.swing.JMenuItem JavaDoc();
1584        jMenuBuild = new javax.swing.JMenu JavaDoc();
1585        jMenuItemCompile = new javax.swing.JMenuItem JavaDoc();
1586        jSeparator10 = new javax.swing.JSeparator JavaDoc();
1587        jMenuItemExecute = new javax.swing.JMenuItem JavaDoc();
1588        jMenuItemExecuteDB = new javax.swing.JMenuItem JavaDoc();
1589        jSeparator33 = new javax.swing.JSeparator JavaDoc();
1590        jMenuItemCreateFromTemplate = new javax.swing.JMenuItem JavaDoc();
1591        jSeparator11 = new javax.swing.JSeparator JavaDoc();
1592        jRadioButtonMenuItemPreviewPDF = new javax.swing.JRadioButtonMenuItem JavaDoc();
1593        jRadioButtonMenuItemPreviewHTML = new javax.swing.JRadioButtonMenuItem JavaDoc();
1594        jRadioButtonMenuItemPreviewJAVA = new javax.swing.JRadioButtonMenuItem JavaDoc();
1595        jRadioButtonMenuItemPreviewXLS = new javax.swing.JRadioButtonMenuItem JavaDoc();
1596        jRadioButtonMenuItemPreviewXLS2 = new javax.swing.JRadioButtonMenuItem JavaDoc();
1597        jRadioButtonMenuItemPreviewCSV = new javax.swing.JRadioButtonMenuItem JavaDoc();
1598        jRadioButtonMenuItemPreviewTXT = new javax.swing.JRadioButtonMenuItem JavaDoc();
1599        jRadioButtonMenuItemPreviewTXTJR = new javax.swing.JRadioButtonMenuItem JavaDoc();
1600        jRadioButtonMenuItemPreviewRTF = new javax.swing.JRadioButtonMenuItem JavaDoc();
1601        jRadioButtonMenuItemPreviewInternalViewer = new javax.swing.JRadioButtonMenuItem JavaDoc();
1602        jSeparator14 = new javax.swing.JSeparator JavaDoc();
1603        jMenuItemActiveConnection1 = new javax.swing.JMenuItem JavaDoc();
1604        jMenuItemReportLocale = new javax.swing.JMenuItem JavaDoc();
1605        jMenuItemReportTimeZone = new javax.swing.JMenuItem JavaDoc();
1606        jCheckBoxMenuItemIgnorePagination = new javax.swing.JCheckBoxMenuItem JavaDoc();
1607        jMenuItemMaxRecords = new javax.swing.JMenuItem JavaDoc();
1608        jCheckBoxMenuItemReportVirtualizer = new javax.swing.JCheckBoxMenuItem JavaDoc();
1609        jMenuTools = new javax.swing.JMenu JavaDoc();
1610        jCheckBoxMenuItemSnapToGrid = new javax.swing.JCheckBoxMenuItem JavaDoc();
1611        jCheckBoxMenuItemEMM = new javax.swing.JCheckBoxMenuItem JavaDoc();
1612        jSeparator13 = new javax.swing.JSeparator JavaDoc();
1613        jMenuItemOptions = new javax.swing.JMenuItem JavaDoc();
1614        jMenuItemCompatibility = new javax.swing.JMenuItem JavaDoc();
1615        jMenuItemClasspath = new javax.swing.JMenuItem JavaDoc();
1616        jMenuItemFontspath = new javax.swing.JMenuItem JavaDoc();
1617        jMenuItemReloadFonts = new javax.swing.JMenuItem JavaDoc();
1618        jMenuItemExpressions = new javax.swing.JMenuItem JavaDoc();
1619        jMenuItemExportOptions = new javax.swing.JMenuItem JavaDoc();
1620        jMenuItemQueryExecuters = new javax.swing.JMenuItem JavaDoc();
1621        jSeparator7 = new javax.swing.JSeparator JavaDoc();
1622        jMenuItemPluginConfig = new javax.swing.JMenuItem JavaDoc();
1623        jMenuPlugins = new javax.swing.JMenu JavaDoc();
1624        jMenuWindow = new javax.swing.JMenu JavaDoc();
1625        jMenuItemCascade = new javax.swing.JMenuItem JavaDoc();
1626        jMenuItemTileHorizontal = new javax.swing.JMenuItem JavaDoc();
1627        jMenuItemTileVertical = new javax.swing.JMenuItem JavaDoc();
1628        jMenuItemtileAnodine = new javax.swing.JMenuItem JavaDoc();
1629        jMenuItemNextWin = new javax.swing.JMenuItem JavaDoc();
1630        jMenuItemPrevWin = new javax.swing.JMenuItem JavaDoc();
1631        jMenuItemRightSide = new javax.swing.JMenuItem JavaDoc();
1632        jSeparator21 = new javax.swing.JSeparator JavaDoc();
1633        jMenuHelp = new javax.swing.JMenu JavaDoc();
1634        jMenuItemHomePage = new javax.swing.JMenuItem JavaDoc();
1635        jMenuItemHelp = new javax.swing.JMenuItem JavaDoc();
1636        jMenuItemForum = new javax.swing.JMenuItem JavaDoc();
1637        jMenuItemAbout = new javax.swing.JMenuItem JavaDoc();
1638
1639        jMenuItemKill.setText("Kill this thread");
1640        jMenuItemKill.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1641            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1642                jMenuItemKillActionPerformed(evt);
1643            }
1644        });
1645
1646        jPopupMenuThreads.add(jMenuItemKill);
1647
1648        jMenuItemSaveFromList.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/save.png")));
1649        jMenuItemSaveFromList.setMnemonic('s');
1650        jMenuItemSaveFromList.setText("Save");
1651        jMenuItemSaveFromList.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1652            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1653                jMenuItemSaveFromListActionPerformed(evt);
1654            }
1655        });
1656
1657        jPopupMenuFiles.add(jMenuItemSaveFromList);
1658
1659        jMenuItemSaveAsFromList.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/save.png")));
1660        jMenuItemSaveAsFromList.setText("Save as...");
1661        jMenuItemSaveAsFromList.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1662            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1663                jMenuItemSaveAsFromListActionPerformed(evt);
1664            }
1665        });
1666
1667        jPopupMenuFiles.add(jMenuItemSaveAsFromList);
1668
1669        jMenuItemSaveAllFromList.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/saveall.png")));
1670        jMenuItemSaveAllFromList.setText("Save all");
1671        jMenuItemSaveAllFromList.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1672            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1673                jMenuItemSaveAllFromListActionPerformed(evt);
1674            }
1675        });
1676
1677        jPopupMenuFiles.add(jMenuItemSaveAllFromList);
1678
1679        jPopupMenuFiles.add(jSeparator24);
1680
1681        jMenuItemCloseFromList.setText("Close");
1682        jMenuItemCloseFromList.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1683            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1684                jMenuItemCloseFromListActionPerformed(evt);
1685            }
1686        });
1687
1688        jPopupMenuFiles.add(jMenuItemCloseFromList);
1689
1690        jMenuItemCloseAllFromList.setText("Close all");
1691        jMenuItemCloseAllFromList.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1692            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1693                jMenuItemCloseAllFromListActionPerformed(evt);
1694            }
1695        });
1696
1697        jPopupMenuFiles.add(jMenuItemCloseAllFromList);
1698
1699        jMenuItemCloseAllExceptThisFromList.setText("Close all except this");
1700        jMenuItemCloseAllExceptThisFromList.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1701            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1702                jMenuItemCloseAllExceptThisFromListActionPerformed(evt);
1703            }
1704        });
1705
1706        jPopupMenuFiles.add(jMenuItemCloseAllExceptThisFromList);
1707
1708        jPopupMenuFiles.add(jSeparator27);
1709
1710        jMenuItemRevertToSavedFromList.setText("Revert to saved");
1711        jMenuItemRevertToSavedFromList.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1712            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1713                jMenuItemRevertToSavedFromListActionPerformed(evt);
1714            }
1715        });
1716
1717        jPopupMenuFiles.add(jMenuItemRevertToSavedFromList);
1718
1719        jPanelFiles.setLayout(new java.awt.BorderLayout JavaDoc());
1720
1721        jPanelFiles.setBackground(new java.awt.Color JavaDoc(255, 255, 255));
1722        jScrollPaneFiles.setBackground(new java.awt.Color JavaDoc(255, 255, 255));
1723        jScrollPaneFiles.setMinimumSize(new java.awt.Dimension JavaDoc(0, 0));
1724        jScrollPaneFiles.addMouseListener(new java.awt.event.MouseAdapter JavaDoc() {
1725            public void mousePressed(java.awt.event.MouseEvent JavaDoc evt) {
1726                jScrollPaneFilesMousePressed(evt);
1727            }
1728        });
1729
1730        jTreeFiles.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener JavaDoc() {
1731            public void valueChanged(javax.swing.event.TreeSelectionEvent JavaDoc evt) {
1732                jTreeFilesValueChanged(evt);
1733            }
1734        });
1735        jTreeFiles.addMouseListener(new java.awt.event.MouseAdapter JavaDoc() {
1736            public void mouseClicked(java.awt.event.MouseEvent JavaDoc evt) {
1737                jTreeFilesMouseClicked(evt);
1738            }
1739            public void mousePressed(java.awt.event.MouseEvent JavaDoc evt) {
1740                jTreeFilesMousePressed(evt);
1741            }
1742        });
1743
1744        jScrollPaneFiles.setViewportView(jTreeFiles);
1745
1746        jPanelFiles.add(jScrollPaneFiles, java.awt.BorderLayout.CENTER);
1747
1748        jListThreads.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
1749        jListThreads.addMouseListener(new java.awt.event.MouseAdapter JavaDoc() {
1750            public void mouseClicked(java.awt.event.MouseEvent JavaDoc evt) {
1751                jListThreadsMouseClicked(evt);
1752            }
1753        });
1754
1755        jScrollProcesses.setViewportView(jListThreads);
1756
1757        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
1758        setIconImage(getIconImage());
1759        addWindowStateListener(new java.awt.event.WindowStateListener JavaDoc() {
1760            public void windowStateChanged(java.awt.event.WindowEvent JavaDoc evt) {
1761                formWindowStateChanged(evt);
1762            }
1763        });
1764        addWindowListener(new java.awt.event.WindowAdapter JavaDoc() {
1765            public void windowActivated(java.awt.event.WindowEvent JavaDoc evt) {
1766                formWindowActivated(evt);
1767            }
1768            public void windowClosing(java.awt.event.WindowEvent JavaDoc evt) {
1769                exitForm(evt);
1770            }
1771            public void windowOpened(java.awt.event.WindowEvent JavaDoc evt) {
1772                formWindowOpened(evt);
1773            }
1774        });
1775
1776        jPanel1.setLayout(new java.awt.BorderLayout JavaDoc());
1777
1778        jToolBarText.setMinimumSize(new java.awt.Dimension JavaDoc(26, 26));
1779        jToolBarText.setPreferredSize(new java.awt.Dimension JavaDoc(26, 26));
1780        jComboBoxFont.setFont(new java.awt.Font JavaDoc("Arial", 0, 11));
1781        jComboBoxFont.setEnabled(false);
1782        jComboBoxFont.setMaximumSize(new java.awt.Dimension JavaDoc(200, 32767));
1783        jComboBoxFont.setPreferredSize(new java.awt.Dimension JavaDoc(200, 20));
1784        jComboBoxFont.addItemListener(new java.awt.event.ItemListener JavaDoc() {
1785            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
1786                jComboBoxFontItemStateChanged(evt);
1787            }
1788        });
1789
1790        jToolBarText.add(jComboBoxFont);
1791
1792        jNumberComboBoxSize.setEnabled(false);
1793        jNumberComboBoxSize.setMaximumSize(new java.awt.Dimension JavaDoc(60, 32767));
1794        jNumberComboBoxSize.setMinimumSize(new java.awt.Dimension JavaDoc(40, 22));
1795        jNumberComboBoxSize.setPreferredSize(new java.awt.Dimension JavaDoc(40, 22));
1796        jNumberComboBoxSize.addItemListener(new java.awt.event.ItemListener JavaDoc() {
1797            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
1798                jNumberComboBoxSizeItemStateChanged(evt);
1799            }
1800        });
1801        jNumberComboBoxSize.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1802            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1803                jNumberComboBoxSizeActionPerformed(evt);
1804            }
1805        });
1806
1807        jToolBarText.add(jNumberComboBoxSize);
1808
1809        jButtonIncreaseSize.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/increase_font_size.png")));
1810        jButtonIncreaseSize.setBorder(null);
1811        jButtonIncreaseSize.setBorderPainted(false);
1812        jButtonIncreaseSize.setEnabled(false);
1813        jButtonIncreaseSize.setFocusPainted(false);
1814        jButtonIncreaseSize.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
1815        jButtonIncreaseSize.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
1816        jButtonIncreaseSize.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
1817        jButtonIncreaseSize.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1818            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1819                jButtonIncreaseSizeActionPerformed(evt);
1820            }
1821        });
1822
1823        jToolBarText.add(jButtonIncreaseSize);
1824
1825        jButtonDecreaseSize.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/decrease_font_size.png")));
1826        jButtonDecreaseSize.setBorder(null);
1827        jButtonDecreaseSize.setBorderPainted(false);
1828        jButtonDecreaseSize.setEnabled(false);
1829        jButtonDecreaseSize.setFocusPainted(false);
1830        jButtonDecreaseSize.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
1831        jButtonDecreaseSize.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
1832        jButtonDecreaseSize.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
1833        jButtonDecreaseSize.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1834            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1835                jButtonDecreaseSizeActionPerformed(evt);
1836            }
1837        });
1838
1839        jToolBarText.add(jButtonDecreaseSize);
1840
1841        jToolBarText.addSeparator();
1842
1843        jButtonBold.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/bold.png")));
1844        jButtonBold.setBorder(null);
1845        jButtonBold.setBorderPainted(false);
1846        jButtonBold.setEnabled(false);
1847        jButtonBold.setFocusPainted(false);
1848        jButtonBold.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
1849        jButtonBold.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
1850        jButtonBold.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
1851        jButtonBold.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1852            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1853                jButtonBoldActionPerformed(evt);
1854            }
1855        });
1856
1857        jToolBarText.add(jButtonBold);
1858
1859        jButtonItalic.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/italic.png")));
1860        jButtonItalic.setBorder(null);
1861        jButtonItalic.setBorderPainted(false);
1862        jButtonItalic.setEnabled(false);
1863        jButtonItalic.setFocusPainted(false);
1864        jButtonItalic.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
1865        jButtonItalic.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
1866        jButtonItalic.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
1867        jButtonItalic.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1868            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1869                jButtonItalicActionPerformed(evt);
1870            }
1871        });
1872
1873        jToolBarText.add(jButtonItalic);
1874
1875        jButtonUnderline.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/underline.png")));
1876        jButtonUnderline.setBorder(null);
1877        jButtonUnderline.setBorderPainted(false);
1878        jButtonUnderline.setEnabled(false);
1879        jButtonUnderline.setFocusPainted(false);
1880        jButtonUnderline.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
1881        jButtonUnderline.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
1882        jButtonUnderline.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
1883        jButtonUnderline.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1884            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1885                jButtonUnderlineActionPerformed(evt);
1886            }
1887        });
1888
1889        jToolBarText.add(jButtonUnderline);
1890
1891        jButtonStrikethrought.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/strikethrought.png")));
1892        jButtonStrikethrought.setBorder(null);
1893        jButtonStrikethrought.setBorderPainted(false);
1894        jButtonStrikethrought.setEnabled(false);
1895        jButtonStrikethrought.setFocusPainted(false);
1896        jButtonStrikethrought.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
1897        jButtonStrikethrought.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
1898        jButtonStrikethrought.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
1899        jButtonStrikethrought.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1900            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1901                jButtonStrikethroughtActionPerformed(evt);
1902            }
1903        });
1904
1905        jToolBarText.add(jButtonStrikethrought);
1906
1907        jButtonAlignLeft.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/align_left.png")));
1908        jButtonAlignLeft.setBorder(null);
1909        jButtonAlignLeft.setBorderPainted(false);
1910        jButtonAlignLeft.setEnabled(false);
1911        jButtonAlignLeft.setFocusPainted(false);
1912        jButtonAlignLeft.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
1913        jButtonAlignLeft.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
1914        jButtonAlignLeft.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
1915        jButtonAlignLeft.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1916            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1917                jButtonAlignLeftActionPerformed(evt);
1918            }
1919        });
1920
1921        jToolBarText.add(jButtonAlignLeft);
1922
1923        jButtonAlignJustify.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/align_justified.png")));
1924        jButtonAlignJustify.setBorder(null);
1925        jButtonAlignJustify.setBorderPainted(false);
1926        jButtonAlignJustify.setEnabled(false);
1927        jButtonAlignJustify.setFocusPainted(false);
1928        jButtonAlignJustify.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
1929        jButtonAlignJustify.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
1930        jButtonAlignJustify.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
1931        jButtonAlignJustify.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1932            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1933                jButtonAlignJustifyActionPerformed(evt);
1934            }
1935        });
1936
1937        jToolBarText.add(jButtonAlignJustify);
1938
1939        jButtonAlignCenter.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/align_center.png")));
1940        jButtonAlignCenter.setBorder(null);
1941        jButtonAlignCenter.setBorderPainted(false);
1942        jButtonAlignCenter.setEnabled(false);
1943        jButtonAlignCenter.setFocusPainted(false);
1944        jButtonAlignCenter.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
1945        jButtonAlignCenter.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
1946        jButtonAlignCenter.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
1947        jButtonAlignCenter.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1948            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1949                jButtonAlignCenterActionPerformed(evt);
1950            }
1951        });
1952
1953        jToolBarText.add(jButtonAlignCenter);
1954
1955        jButtonAlignRight.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/align_right.png")));
1956        jButtonAlignRight.setBorder(null);
1957        jButtonAlignRight.setBorderPainted(false);
1958        jButtonAlignRight.setEnabled(false);
1959        jButtonAlignRight.setFocusPainted(false);
1960        jButtonAlignRight.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
1961        jButtonAlignRight.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
1962        jButtonAlignRight.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
1963        jButtonAlignRight.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1964            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1965                jButtonAlignRightActionPerformed(evt);
1966            }
1967        });
1968
1969        jToolBarText.add(jButtonAlignRight);
1970
1971        jToolBarText.addSeparator();
1972        jButtonAlignTop.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/align_top.png")));
1973        jButtonAlignTop.setBorder(null);
1974        jButtonAlignTop.setBorderPainted(false);
1975        jButtonAlignTop.setEnabled(false);
1976        jButtonAlignTop.setFocusPainted(false);
1977        jButtonAlignTop.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
1978        jButtonAlignTop.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
1979        jButtonAlignTop.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
1980        jButtonAlignTop.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1981            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1982                jButtonAlignTopActionPerformed(evt);
1983            }
1984        });
1985
1986        jToolBarText.add(jButtonAlignTop);
1987
1988        jButtonAlignMiddle.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/align_middle.png")));
1989        jButtonAlignMiddle.setBorder(null);
1990        jButtonAlignMiddle.setBorderPainted(false);
1991        jButtonAlignMiddle.setEnabled(false);
1992        jButtonAlignMiddle.setFocusPainted(false);
1993        jButtonAlignMiddle.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
1994        jButtonAlignMiddle.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
1995        jButtonAlignMiddle.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
1996        jButtonAlignMiddle.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1997            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1998                jButtonAlignMiddleActionPerformed(evt);
1999            }
2000        });
2001
2002        jToolBarText.add(jButtonAlignMiddle);
2003
2004        jButtonAlignBottom.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/text/align_bottom.png")));
2005        jButtonAlignBottom.setBorder(null);
2006        jButtonAlignBottom.setBorderPainted(false);
2007        jButtonAlignBottom.setEnabled(false);
2008        jButtonAlignBottom.setFocusPainted(false);
2009        jButtonAlignBottom.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
2010        jButtonAlignBottom.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2011        jButtonAlignBottom.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2012        jButtonAlignBottom.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2013            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2014                jButtonAlignBottomActionPerformed(evt);
2015            }
2016        });
2017
2018        jToolBarText.add(jButtonAlignBottom);
2019
2020        Filler1.setBackground(new java.awt.Color JavaDoc(255, 255, 255));
2021        Filler1.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/null.gif")));
2022        Filler1.setBorderPainted(false);
2023        Filler1.setContentAreaFilled(false);
2024        Filler1.setEnabled(false);
2025        Filler1.setFocusPainted(false);
2026        Filler1.setFocusable(false);
2027        Filler1.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
2028        Filler1.setMaximumSize(new java.awt.Dimension JavaDoc(0, 22));
2029        Filler1.setMinimumSize(new java.awt.Dimension JavaDoc(0, 22));
2030        Filler1.setPreferredSize(new java.awt.Dimension JavaDoc(0, 22));
2031        jToolBarConnections.add(Filler1);
2032
2033        jToolBarText.add(jToolBarConnections);
2034
2035        jPanel1.add(jToolBarText, java.awt.BorderLayout.NORTH);
2036
2037        jPanel2.setLayout(new java.awt.BorderLayout JavaDoc());
2038
2039        Filler.setBackground(new java.awt.Color JavaDoc(255, 255, 255));
2040        Filler.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/null.gif")));
2041        Filler.setBorderPainted(false);
2042        Filler.setContentAreaFilled(false);
2043        Filler.setEnabled(false);
2044        Filler.setFocusPainted(false);
2045        Filler.setFocusable(false);
2046        Filler.setMargin(new java.awt.Insets JavaDoc(0, 0, 0, 0));
2047        Filler.setMaximumSize(new java.awt.Dimension JavaDoc(0, 22));
2048        Filler.setMinimumSize(new java.awt.Dimension JavaDoc(0, 22));
2049        Filler.setPreferredSize(new java.awt.Dimension JavaDoc(0, 22));
2050        jToolBarFormat.add(Filler);
2051
2052        jPanel2.add(jToolBarFormat, java.awt.BorderLayout.NORTH);
2053
2054        jPanelMaster.setLayout(new java.awt.BorderLayout JavaDoc());
2055
2056        jPanelMaster.setMinimumSize(new java.awt.Dimension JavaDoc(750, 100));
2057        jPanelMaster.setPreferredSize(new java.awt.Dimension JavaDoc(750, 550));
2058        jPanelMaster.addMouseListener(new java.awt.event.MouseAdapter JavaDoc() {
2059            public void mouseClicked(java.awt.event.MouseEvent JavaDoc evt) {
2060                jPanelMasterMouseClicked(evt);
2061            }
2062        });
2063
2064        jPanel2.add(jPanelMaster, java.awt.BorderLayout.CENTER);
2065
2066        jPanel1.add(jPanel2, java.awt.BorderLayout.CENTER);
2067
2068        getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
2069
2070        jButtonNew.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/new.png")));
2071        jButtonNew.setToolTipText("New report");
2072        jButtonNew.setBorder(null);
2073        jButtonNew.setBorderPainted(false);
2074        jButtonNew.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2075        jButtonNew.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2076        jButtonNew.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2077        jButtonNew.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2078            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2079                jButtonNewActionPerformed(evt);
2080            }
2081        });
2082
2083        jToolBar1.add(jButtonNew);
2084
2085        jButtonWizard.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/wizard.png")));
2086        jButtonWizard.setToolTipText("New report");
2087        jButtonWizard.setBorder(null);
2088        jButtonWizard.setBorderPainted(false);
2089        jButtonWizard.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2090        jButtonWizard.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2091        jButtonWizard.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2092        jButtonWizard.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2093            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2094                jButtonNewActionPerformed1(evt);
2095            }
2096        });
2097
2098        jToolBar1.add(jButtonWizard);
2099
2100        jButtonOpen.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/open.png")));
2101        jButtonOpen.setToolTipText("Open report");
2102        jButtonOpen.setBorder(null);
2103        jButtonOpen.setBorderPainted(false);
2104        jButtonOpen.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2105        jButtonOpen.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2106        jButtonOpen.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2107        jButtonOpen.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2108            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2109                jButtonOpenActionPerformed(evt);
2110            }
2111        });
2112
2113        jToolBar1.add(jButtonOpen);
2114
2115        jButtonSave.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/save.png")));
2116        jButtonSave.setToolTipText("Save report");
2117        jButtonSave.setBorder(null);
2118        jButtonSave.setBorderPainted(false);
2119        jButtonSave.setEnabled(false);
2120        jButtonSave.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2121        jButtonSave.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2122        jButtonSave.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2123        jButtonSave.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2124            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2125                jButtonSaveActionPerformed(evt);
2126            }
2127        });
2128
2129        jToolBar1.add(jButtonSave);
2130
2131        jButtonSaveAll.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/saveall.png")));
2132        jButtonSaveAll.setToolTipText("Save report");
2133        jButtonSaveAll.setBorder(null);
2134        jButtonSaveAll.setBorderPainted(false);
2135        jButtonSaveAll.setEnabled(false);
2136        jButtonSaveAll.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2137        jButtonSaveAll.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2138        jButtonSaveAll.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2139        jButtonSaveAll.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2140            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2141                jButtonSaveActionPerformed1(evt);
2142            }
2143        });
2144
2145        jToolBar1.add(jButtonSaveAll);
2146
2147        jSeparator22.setOrientation(javax.swing.SwingConstants.VERTICAL);
2148        jSeparator22.setMaximumSize(new java.awt.Dimension JavaDoc(2, 20));
2149        jSeparator22.setMinimumSize(new java.awt.Dimension JavaDoc(2, 2));
2150        jSeparator22.setPreferredSize(new java.awt.Dimension JavaDoc(2, 20));
2151        jToolBar1.add(jSeparator22);
2152
2153        jButtonCut.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/cut.png")));
2154        jButtonCut.setToolTipText("Cut");
2155        jButtonCut.setBorder(null);
2156        jButtonCut.setBorderPainted(false);
2157        jButtonCut.setEnabled(false);
2158        jButtonCut.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2159        jButtonCut.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2160        jButtonCut.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2161        jButtonCut.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2162            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2163                jButtonCutActionPerformed(evt);
2164            }
2165        });
2166
2167        jToolBar1.add(jButtonCut);
2168
2169        jButtonCopy.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/copy.png")));
2170        jButtonCopy.setToolTipText("Copy");
2171        jButtonCopy.setBorder(null);
2172        jButtonCopy.setBorderPainted(false);
2173        jButtonCopy.setEnabled(false);
2174        jButtonCopy.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2175        jButtonCopy.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2176        jButtonCopy.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2177        jButtonCopy.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2178            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2179                jButtonCopyActionPerformed(evt);
2180            }
2181        });
2182
2183        jToolBar1.add(jButtonCopy);
2184
2185        jButtonPaste.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/paste.png")));
2186        jButtonPaste.setToolTipText("Paste");
2187        jButtonPaste.setBorder(null);
2188        jButtonPaste.setBorderPainted(false);
2189        jButtonPaste.setEnabled(false);
2190        jButtonPaste.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2191        jButtonPaste.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2192        jButtonPaste.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2193        jButtonPaste.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2194            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2195                jButtonPasteActionPerformed(evt);
2196            }
2197        });
2198
2199        jToolBar1.add(jButtonPaste);
2200
2201        jSeparator23.setOrientation(javax.swing.SwingConstants.VERTICAL);
2202        jSeparator23.setMaximumSize(new java.awt.Dimension JavaDoc(2, 20));
2203        jSeparator23.setMinimumSize(new java.awt.Dimension JavaDoc(2, 2));
2204        jSeparator23.setPreferredSize(new java.awt.Dimension JavaDoc(2, 20));
2205        jToolBar1.add(jSeparator23);
2206
2207        jToggleButtonPointer.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/pointer.png")));
2208        jToggleButtonPointer.setToolTipText("Pointer");
2209        jToggleButtonPointer.setBorder(null);
2210        jToggleButtonPointer.setBorderPainted(false);
2211        jToggleButtonPointer.setEnabled(false);
2212        jToggleButtonPointer.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2213        jToggleButtonPointer.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2214        jToggleButtonPointer.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2215        jToggleButtonPointer.addItemListener(new java.awt.event.ItemListener JavaDoc() {
2216            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
2217                jToggleButtonPointerItemStateChanged(evt);
2218            }
2219        });
2220        jToggleButtonPointer.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2221            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2222                jToggleButtonPointerActionPerformed(evt);
2223            }
2224        });
2225
2226        jToolBar1.add(jToggleButtonPointer);
2227
2228        jToggleButtonLineTool.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/line.png")));
2229        jToggleButtonLineTool.setToolTipText("Line tool");
2230        jToggleButtonLineTool.setBorder(null);
2231        jToggleButtonLineTool.setBorderPainted(false);
2232        jToggleButtonLineTool.setEnabled(false);
2233        jToggleButtonLineTool.setFocusPainted(false);
2234        jToggleButtonLineTool.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2235        jToggleButtonLineTool.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2236        jToggleButtonLineTool.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2237        jToggleButtonLineTool.addItemListener(new java.awt.event.ItemListener JavaDoc() {
2238            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
2239                jToggleButtonLineToolItemStateChanged(evt);
2240            }
2241        });
2242        jToggleButtonLineTool.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2243            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2244                jToggleButtonLineToolActionPerformed(evt);
2245            }
2246        });
2247
2248        jToolBar1.add(jToggleButtonLineTool);
2249
2250        jToggleButtonRectTool.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/rectangle.png")));
2251        jToggleButtonRectTool.setToolTipText("Rectangle tool");
2252        jToggleButtonRectTool.setBorder(null);
2253        jToggleButtonRectTool.setBorderPainted(false);
2254        jToggleButtonRectTool.setEnabled(false);
2255        jToggleButtonRectTool.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2256        jToggleButtonRectTool.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2257        jToggleButtonRectTool.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2258        jToggleButtonRectTool.addItemListener(new java.awt.event.ItemListener JavaDoc() {
2259            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
2260                jToggleButtonRectToolItemStateChanged(evt);
2261            }
2262        });
2263        jToggleButtonRectTool.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2264            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2265                jToggleButtonRectToolActionPerformed(evt);
2266            }
2267        });
2268
2269        jToolBar1.add(jToggleButtonRectTool);
2270
2271        jToggleButtonEllipseTool.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/circle.png")));
2272        jToggleButtonEllipseTool.setToolTipText("Ellipse tool");
2273        jToggleButtonEllipseTool.setBorder(null);
2274        jToggleButtonEllipseTool.setBorderPainted(false);
2275        jToggleButtonEllipseTool.setEnabled(false);
2276        jToggleButtonEllipseTool.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2277        jToggleButtonEllipseTool.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2278        jToggleButtonEllipseTool.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2279        jToggleButtonEllipseTool.addItemListener(new java.awt.event.ItemListener JavaDoc() {
2280            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
2281                jToggleButtonEllipseToolItemStateChanged(evt);
2282            }
2283        });
2284        jToggleButtonEllipseTool.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2285            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2286                jToggleButtonEllipseToolActionPerformed(evt);
2287            }
2288        });
2289
2290        jToolBar1.add(jToggleButtonEllipseTool);
2291
2292        jToggleButtonStaticTextTool.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/text.png")));
2293        jToggleButtonStaticTextTool.setToolTipText("Static text tool");
2294        jToggleButtonStaticTextTool.setBorder(null);
2295        jToggleButtonStaticTextTool.setBorderPainted(false);
2296        jToggleButtonStaticTextTool.setEnabled(false);
2297        jToggleButtonStaticTextTool.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2298        jToggleButtonStaticTextTool.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2299        jToggleButtonStaticTextTool.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2300        jToggleButtonStaticTextTool.addItemListener(new java.awt.event.ItemListener JavaDoc() {
2301            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
2302                jToggleButtonStaticTextToolItemStateChanged(evt);
2303            }
2304        });
2305        jToggleButtonStaticTextTool.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2306            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2307                jToggleButtonStaticTextToolActionPerformed(evt);
2308            }
2309        });
2310
2311        jToolBar1.add(jToggleButtonStaticTextTool);
2312
2313        jToggleButtonTextFieldTool.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/field.png")));
2314        jToggleButtonTextFieldTool.setToolTipText("Textfield tool");
2315        jToggleButtonTextFieldTool.setBorder(null);
2316        jToggleButtonTextFieldTool.setBorderPainted(false);
2317        jToggleButtonTextFieldTool.setEnabled(false);
2318        jToggleButtonTextFieldTool.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2319        jToggleButtonTextFieldTool.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2320        jToggleButtonTextFieldTool.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2321        jToggleButtonTextFieldTool.addItemListener(new java.awt.event.ItemListener JavaDoc() {
2322            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
2323                jToggleButtonTextFieldToolItemStateChanged(evt);
2324            }
2325        });
2326        jToggleButtonTextFieldTool.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2327            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2328                jToggleButtonTextFieldToolActionPerformed(evt);
2329            }
2330        });
2331
2332        jToolBar1.add(jToggleButtonTextFieldTool);
2333
2334        jToggleButtonImageTool.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/picture.png")));
2335        jToggleButtonImageTool.setToolTipText("Image tool");
2336        jToggleButtonImageTool.setBorder(null);
2337        jToggleButtonImageTool.setBorderPainted(false);
2338        jToggleButtonImageTool.setEnabled(false);
2339        jToggleButtonImageTool.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2340        jToggleButtonImageTool.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2341        jToggleButtonImageTool.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2342        jToggleButtonImageTool.addItemListener(new java.awt.event.ItemListener JavaDoc() {
2343            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
2344                jToggleButtonImageToolItemStateChanged(evt);
2345            }
2346        });
2347        jToggleButtonImageTool.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2348            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2349                jToggleButtonImageToolActionPerformed(evt);
2350            }
2351        });
2352
2353        jToolBar1.add(jToggleButtonImageTool);
2354
2355        jToggleButtonBarcodeTool.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/barcode.png")));
2356        jToggleButtonBarcodeTool.setToolTipText("Barcode tool");
2357        jToggleButtonBarcodeTool.setBorder(null);
2358        jToggleButtonBarcodeTool.setBorderPainted(false);
2359        jToggleButtonBarcodeTool.setEnabled(false);
2360        jToggleButtonBarcodeTool.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2361        jToggleButtonBarcodeTool.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2362        jToggleButtonBarcodeTool.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2363        jToggleButtonBarcodeTool.addItemListener(new java.awt.event.ItemListener JavaDoc() {
2364            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
2365                jToggleButtonBarcodeToolItemStateChanged(evt);
2366            }
2367        });
2368        jToggleButtonBarcodeTool.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2369            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2370                jToggleButtonBarcodeToolActionPerformed(evt);
2371            }
2372        });
2373
2374        jToolBar1.add(jToggleButtonBarcodeTool);
2375
2376        jToggleButtonFrameTool.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/frame.png")));
2377        jToggleButtonFrameTool.setToolTipText("Frame tool");
2378        jToggleButtonFrameTool.setBorder(null);
2379        jToggleButtonFrameTool.setBorderPainted(false);
2380        jToggleButtonFrameTool.setEnabled(false);
2381        jToggleButtonFrameTool.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2382        jToggleButtonFrameTool.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2383        jToggleButtonFrameTool.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2384        jToggleButtonFrameTool.addItemListener(new java.awt.event.ItemListener JavaDoc() {
2385            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
2386                jToggleButtonFrameToolItemStateChanged(evt);
2387            }
2388        });
2389        jToggleButtonFrameTool.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2390            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2391                jToggleButtonFrameToolActionPerformed(evt);
2392            }
2393        });
2394
2395        jToolBar1.add(jToggleButtonFrameTool);
2396
2397        jToggleButtonChartTool.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/chart.png")));
2398        jToggleButtonChartTool.setToolTipText("Chart tool");
2399        jToggleButtonChartTool.setBorder(null);
2400        jToggleButtonChartTool.setBorderPainted(false);
2401        jToggleButtonChartTool.setEnabled(false);
2402        jToggleButtonChartTool.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2403        jToggleButtonChartTool.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2404        jToggleButtonChartTool.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2405        jToggleButtonChartTool.addItemListener(new java.awt.event.ItemListener JavaDoc() {
2406            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
2407                jToggleButtonChartToolItemStateChanged(evt);
2408            }
2409        });
2410        jToggleButtonChartTool.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2411            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2412                jToggleButtonChartToolActionPerformed(evt);
2413            }
2414        });
2415
2416        jToolBar1.add(jToggleButtonChartTool);
2417
2418        jToggleButtonSubreportTool.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/subreport.png")));
2419        jToggleButtonSubreportTool.setToolTipText("Subreport tool");
2420        jToggleButtonSubreportTool.setBorder(null);
2421        jToggleButtonSubreportTool.setBorderPainted(false);
2422        jToggleButtonSubreportTool.setEnabled(false);
2423        jToggleButtonSubreportTool.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2424        jToggleButtonSubreportTool.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2425        jToggleButtonSubreportTool.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2426        jToggleButtonSubreportTool.addItemListener(new java.awt.event.ItemListener JavaDoc() {
2427            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
2428                jToggleButtonSubreportToolItemStateChanged(evt);
2429            }
2430        });
2431        jToggleButtonSubreportTool.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2432            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2433                jToggleButtonSubreportToolActionPerformed(evt);
2434            }
2435        });
2436
2437        jToolBar1.add(jToggleButtonSubreportTool);
2438
2439        jToggleButtonCrosstabTool.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/crosstab.png")));
2440        jToggleButtonCrosstabTool.setToolTipText("Crosstab tool");
2441        jToggleButtonCrosstabTool.setBorder(null);
2442        jToggleButtonCrosstabTool.setBorderPainted(false);
2443        jToggleButtonCrosstabTool.setEnabled(false);
2444        jToggleButtonCrosstabTool.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2445        jToggleButtonCrosstabTool.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2446        jToggleButtonCrosstabTool.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2447        jToggleButtonCrosstabTool.addItemListener(new java.awt.event.ItemListener JavaDoc() {
2448            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
2449                jToggleButtonCrosstabToolItemStateChanged(evt);
2450            }
2451        });
2452        jToggleButtonCrosstabTool.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2453            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2454                jToggleButtonCrosstabToolActionPerformed(evt);
2455            }
2456        });
2457
2458        jToolBar1.add(jToggleButtonCrosstabTool);
2459
2460        jSeparator30.setOrientation(javax.swing.SwingConstants.VERTICAL);
2461        jSeparator30.setMaximumSize(new java.awt.Dimension JavaDoc(2, 20));
2462        jSeparator30.setMinimumSize(new java.awt.Dimension JavaDoc(2, 2));
2463        jSeparator30.setPreferredSize(new java.awt.Dimension JavaDoc(2, 20));
2464        jToolBar1.add(jSeparator30);
2465
2466        jButtonParameters.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/values.png")));
2467        jButtonParameters.setToolTipText("Parameters");
2468        jButtonParameters.setBorder(null);
2469        jButtonParameters.setBorderPainted(false);
2470        jButtonParameters.setEnabled(false);
2471        jButtonParameters.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2472        jButtonParameters.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2473        jButtonParameters.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2474        jButtonParameters.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2475            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2476                jButtonParametersActionPerformed(evt);
2477            }
2478        });
2479
2480        jToolBar1.add(jButtonParameters);
2481
2482        jButtonBands.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/bands.png")));
2483        jButtonBands.setToolTipText("Bands");
2484        jButtonBands.setBorder(null);
2485        jButtonBands.setBorderPainted(false);
2486        jButtonBands.setEnabled(false);
2487        jButtonBands.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2488        jButtonBands.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2489        jButtonBands.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2490        jButtonBands.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2491            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2492                jButtonBandsActionPerformed(evt);
2493            }
2494        });
2495
2496        jToolBar1.add(jButtonBands);
2497
2498        jButtonGroups.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/groups.png")));
2499        jButtonGroups.setToolTipText("Groups");
2500        jButtonGroups.setBorder(null);
2501        jButtonGroups.setBorderPainted(false);
2502        jButtonGroups.setEnabled(false);
2503        jButtonGroups.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2504        jButtonGroups.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2505        jButtonGroups.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2506        jButtonGroups.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2507            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2508                jButtonGroupsActionPerformed(evt);
2509            }
2510        });
2511
2512        jToolBar1.add(jButtonGroups);
2513
2514        jButtonDatabase.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/database.png")));
2515        jButtonDatabase.setToolTipText("Database");
2516        jButtonDatabase.setBorder(null);
2517        jButtonDatabase.setBorderPainted(false);
2518        jButtonDatabase.setEnabled(false);
2519        jButtonDatabase.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2520        jButtonDatabase.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2521        jButtonDatabase.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2522        jButtonDatabase.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2523            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2524                jButtonDatabaseActionPerformed(evt);
2525            }
2526        });
2527
2528        jToolBar1.add(jButtonDatabase);
2529
2530        jSeparator31.setOrientation(javax.swing.SwingConstants.VERTICAL);
2531        jSeparator31.setMaximumSize(new java.awt.Dimension JavaDoc(2, 20));
2532        jSeparator31.setMinimumSize(new java.awt.Dimension JavaDoc(2, 2));
2533        jSeparator31.setPreferredSize(new java.awt.Dimension JavaDoc(2, 20));
2534        jSeparator31.setRequestFocusEnabled(false);
2535        jToolBar1.add(jSeparator31);
2536
2537        jPanelZoom.setLayout(new java.awt.BorderLayout JavaDoc());
2538
2539        jPanelZoom.setMaximumSize(new java.awt.Dimension JavaDoc(70, 22));
2540        jPanelZoom.setMinimumSize(new java.awt.Dimension JavaDoc(70, 22));
2541        jPanelZoom.setPreferredSize(new java.awt.Dimension JavaDoc(70, 22));
2542        jNumberComboBoxZoom.setMaximumRowCount(12);
2543        jNumberComboBoxZoom.setMinimumSize(new java.awt.Dimension JavaDoc(70, 18));
2544        jNumberComboBoxZoom.setPostfix("%");
2545        jNumberComboBoxZoom.setPreferredSize(new java.awt.Dimension JavaDoc(70, 22));
2546        jNumberComboBoxZoom.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2547            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2548                jNumberComboBoxZoomActionPerformed(evt);
2549            }
2550        });
2551
2552        jPanelZoom.add(jNumberComboBoxZoom, java.awt.BorderLayout.CENTER);
2553
2554        jToolBar1.add(jPanelZoom);
2555
2556        jButtonLens1.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/lens_in.png")));
2557        jButtonLens1.setToolTipText("Zoom in");
2558        jButtonLens1.setBorder(null);
2559        jButtonLens1.setBorderPainted(false);
2560        jButtonLens1.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2561        jButtonLens1.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2562        jButtonLens1.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2563        jButtonLens1.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2564            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2565                jButtonRun2ActionPerformed1(evt);
2566            }
2567        });
2568
2569        jToolBar1.add(jButtonLens1);
2570        jButtonLens1.getAccessibleContext().setAccessibleDescription("");
2571
2572        jButtonLens2.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/lens_out.png")));
2573        jButtonLens2.setToolTipText("Zoom out");
2574        jButtonLens2.setBorder(null);
2575        jButtonLens2.setBorderPainted(false);
2576        jButtonLens2.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2577        jButtonLens2.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2578        jButtonLens2.setOpaque(false);
2579        jButtonLens2.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2580        jButtonLens2.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2581            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2582                jButtonLens1jButtonRun2ActionPerformed1(evt);
2583            }
2584        });
2585
2586        jToolBar1.add(jButtonLens2);
2587
2588        jSeparator32.setOrientation(javax.swing.SwingConstants.VERTICAL);
2589        jSeparator32.setMaximumSize(new java.awt.Dimension JavaDoc(2, 20));
2590        jSeparator32.setMinimumSize(new java.awt.Dimension JavaDoc(2, 2));
2591        jSeparator32.setPreferredSize(new java.awt.Dimension JavaDoc(2, 20));
2592        jToolBar1.add(jSeparator32);
2593
2594        jButtonCompiler.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/compile.png")));
2595        jButtonCompiler.setToolTipText("Compile the report");
2596        jButtonCompiler.setBorder(null);
2597        jButtonCompiler.setBorderPainted(false);
2598        jButtonCompiler.setEnabled(false);
2599        jButtonCompiler.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2600        jButtonCompiler.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2601        jButtonCompiler.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2602        jButtonCompiler.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2603            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2604                jButtonCompilerActionPerformed(evt);
2605            }
2606        });
2607
2608        jToolBar1.add(jButtonCompiler);
2609
2610        jButtonRun1.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/run1.png")));
2611        jButtonRun1.setToolTipText("Run report using an empty datasource");
2612        jButtonRun1.setBorder(null);
2613        jButtonRun1.setBorderPainted(false);
2614        jButtonRun1.setEnabled(false);
2615        jButtonRun1.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2616        jButtonRun1.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2617        jButtonRun1.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2618        jButtonRun1.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2619            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2620                jButtonRun1ActionPerformed(evt);
2621            }
2622        });
2623
2624        jToolBar1.add(jButtonRun1);
2625
2626        jButtonRun2.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/newtoolbar/run2.png")));
2627        jButtonRun2.setToolTipText("Run report using a connection");
2628        jButtonRun2.setBorder(null);
2629        jButtonRun2.setBorderPainted(false);
2630        jButtonRun2.setEnabled(false);
2631        jButtonRun2.setMaximumSize(new java.awt.Dimension JavaDoc(22, 22));
2632        jButtonRun2.setMinimumSize(new java.awt.Dimension JavaDoc(22, 22));
2633        jButtonRun2.setPreferredSize(new java.awt.Dimension JavaDoc(22, 22));
2634        jButtonRun2.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2635            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2636                jButtonRun2ActionPerformed(evt);
2637            }
2638        });
2639
2640        jToolBar1.add(jButtonRun2);
2641
2642        getContentPane().add(jToolBar1, java.awt.BorderLayout.NORTH);
2643
2644        jMenuFile.setMnemonic('f');
2645        jMenuFile.setText("File");
2646        jMenuFile.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2647            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2648                jMenuFileActionPerformed(evt);
2649            }
2650        });
2651
2652        jMenuItemNewDocument.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/new.png")));
2653        jMenuItemNewDocument.setText("New document");
2654        jMenuItemNewDocument.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2655            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2656                jMenuItemNewDocumentActionPerformed(evt);
2657            }
2658        });
2659
2660        jMenuFile.add(jMenuItemNewDocument);
2661
2662        jMenuItemWizard.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/wizard.png")));
2663        jMenuItemWizard.setText("Report wizard...");
2664        jMenuItemWizard.setDisabledIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/wizard.png")));
2665        jMenuItemWizard.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2666            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2667                jMenuItemWizardActionPerformed(evt);
2668            }
2669        });
2670
2671        jMenuFile.add(jMenuItemWizard);
2672
2673        jMenuItemOpen.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/open.png")));
2674        jMenuItemOpen.setText("Open");
2675        jMenuItemOpen.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2676            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2677                jMenuItemOpenActionPerformed(evt);
2678            }
2679        });
2680
2681        jMenuFile.add(jMenuItemOpen);
2682
2683        jMenuItemSave.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/save.png")));
2684        jMenuItemSave.setMnemonic('s');
2685        jMenuItemSave.setText("Save");
2686        jMenuItemSave.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2687            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2688                jMenuItemSaveActionPerformed(evt);
2689            }
2690        });
2691
2692        jMenuFile.add(jMenuItemSave);
2693
2694        jMenuItemSaveAs.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/save.png")));
2695        jMenuItemSaveAs.setText("Save as...");
2696        jMenuItemSaveAs.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2697            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2698                jMenuItemSaveAsActionPerformed(evt);
2699            }
2700        });
2701
2702        jMenuFile.add(jMenuItemSaveAs);
2703
2704        jMenuItemSaveAll.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/saveall.png")));
2705        jMenuItemSaveAll.setText("Save all");
2706        jMenuItemSaveAll.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2707            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2708                jMenuItemSaveAllActionPerformed(evt);
2709            }
2710        });
2711
2712        jMenuFile.add(jMenuItemSaveAll);
2713
2714        jMenuItemClose.setText("Close");
2715        jMenuItemClose.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2716            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2717                jMenuItemCloseActionPerformed(evt);
2718            }
2719        });
2720
2721        jMenuFile.add(jMenuItemClose);
2722
2723        jMenuItemCloseAll.setText("Close all");
2724        jMenuItemCloseAll.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2725            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2726                jMenuItemCloseAllActionPerformed(evt);
2727            }
2728        });
2729
2730        jMenuFile.add(jMenuItemCloseAll);
2731
2732        jMenuItemCloseAllExceptThis.setText("Close all except this");
2733        jMenuItemCloseAllExceptThis.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2734            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2735                jMenuItemCloseAllExceptThisActionPerformed(evt);
2736            }
2737        });
2738
2739        jMenuFile.add(jMenuItemCloseAllExceptThis);
2740
2741        jMenuFile.add(jSeparator3);
2742
2743        jMenuItemPrint.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/printer.png")));
2744        jMenuItemPrint.setText("Print design");
2745        jMenuItemPrint.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2746            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2747                jMenuItemPrintActionPerformed(evt);
2748            }
2749        });
2750
2751        jMenuFile.add(jMenuItemPrint);
2752
2753        jMenuItemRevertToSaved.setText("Revert to saved");
2754        jMenuItemRevertToSaved.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2755            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2756                jMenuItemRevertToSavedActionPerformed(evt);
2757            }
2758        });
2759
2760        jMenuFile.add(jMenuItemRevertToSaved);
2761
2762        jMenuFile.add(jSeparator16);
2763
2764        jMenuRecentFiles.setText("Recent Files");
2765        jMenuFile.add(jMenuRecentFiles);
2766
2767        jMenuFile.add(jSeparator15);
2768
2769        jMenuItemQuit.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/null.gif")));
2770        jMenuItemQuit.setMnemonic('q');
2771        jMenuItemQuit.setText("Quit");
2772        jMenuItemQuit.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2773            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2774                jMenuItemQuitActionPerformed(evt);
2775            }
2776        });
2777
2778        jMenuFile.add(jMenuItemQuit);
2779
2780        jMDIMenuBar.add(jMenuFile);
2781
2782        jMenuEdit.setMnemonic('e');
2783        jMenuEdit.setText("Edit");
2784        jMenuEdit.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2785            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2786                jMenuEditActionPerformed(evt);
2787            }
2788        });
2789
2790        jMenuItemUndo.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/undo.png")));
2791        jMenuItemUndo.setText("Undo");
2792        jMenuItemUndo.setEnabled(false);
2793        jMenuItemUndo.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2794            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2795                jMenuItemUndoActionPerformed(evt);
2796            }
2797        });
2798
2799        jMenuEdit.add(jMenuItemUndo);
2800
2801        jMenuItemRedo.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/redo.png")));
2802        jMenuItemRedo.setText("Redo");
2803        jMenuItemRedo.setEnabled(false);
2804        jMenuItemRedo.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2805            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2806                jMenuItemRedoActionPerformed(evt);
2807            }
2808        });
2809
2810        jMenuEdit.add(jMenuItemRedo);
2811
2812        jMenuEdit.add(jSeparator1);
2813
2814        jMenuItemCut.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/cut.png")));
2815        jMenuItemCut.setText("Cut");
2816        jMenuItemCut.setEnabled(false);
2817        jMenuItemCut.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2818            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2819                jMenuItemCutActionPerformed(evt);
2820            }
2821        });
2822
2823        jMenuEdit.add(jMenuItemCut);
2824
2825        jMenuItemCopy.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/copy.png")));
2826        jMenuItemCopy.setText("Copy");
2827        jMenuItemCopy.setEnabled(false);
2828        jMenuItemCopy.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2829            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2830                jMenuItemCopyActionPerformed(evt);
2831            }
2832        });
2833
2834        jMenuEdit.add(jMenuItemCopy);
2835
2836        jMenuItemPaste.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/paste.png")));
2837        jMenuItemPaste.setText("Paste");
2838        jMenuItemPaste.setEnabled(false);
2839        jMenuItemPaste.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2840            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2841                jMenuItemPasteActionPerformed(evt);
2842            }
2843        });
2844
2845        jMenuEdit.add(jMenuItemPaste);
2846
2847        jMenuItemDelete.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/delete.png")));
2848        jMenuItemDelete.setText("Delete");
2849        jMenuItemDelete.setEnabled(false);
2850        jMenuItemDelete.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2851            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2852                jMenuItemDeleteActionPerformed(evt);
2853            }
2854        });
2855
2856        jMenuEdit.add(jMenuItemDelete);
2857
2858        jMenuEdit.add(jSeparator2);
2859
2860        jMenuItemInsertPageBreak.setText("Insert page/column break");
2861        jMenuItemInsertPageBreak.setEnabled(false);
2862        jMenuItemInsertPageBreak.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2863            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2864                jMenuItemAddGroupActionPerformed1(evt);
2865            }
2866        });
2867
2868        jMenuEdit.add(jMenuItemInsertPageBreak);
2869
2870        jMenuAdd.setText("Insert element...");
2871        jMenuAdd.setEnabled(false);
2872        jMenuItemLine.setText("Line");
2873        jMenuItemLine.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2874            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2875                jMenuItemLineActionPerformed(evt);
2876            }
2877        });
2878
2879        jMenuAdd.add(jMenuItemLine);
2880
2881        jMenuItemRectangle.setText("Rectangle");
2882        jMenuItemRectangle.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2883            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2884                jMenuItemRectangleActionPerformed(evt);
2885            }
2886        });
2887
2888        jMenuAdd.add(jMenuItemRectangle);
2889
2890        jMenuItemRoundRectangle.setText("Rounded rectangle");
2891        jMenuItemRoundRectangle.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2892            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2893                jMenuItemRoundRectangleActionPerformed(evt);
2894            }
2895        });
2896
2897        jMenuAdd.add(jMenuItemRoundRectangle);
2898
2899        jMenuItemEllipse.setText("Ellipse");
2900        jMenuItemEllipse.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2901            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2902                jMenuItemEllipseActionPerformed(evt);
2903            }
2904        });
2905
2906        jMenuAdd.add(jMenuItemEllipse);
2907
2908        jMenuItemImage.setText("Image");
2909        jMenuItemImage.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2910            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2911                jMenuItemImageActionPerformed(evt);
2912            }
2913        });
2914
2915        jMenuAdd.add(jMenuItemImage);
2916
2917        jMenuItemStaticText.setText("Static text");
2918        jMenuItemStaticText.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2919            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2920                jMenuItemStaticTextActionPerformed(evt);
2921            }
2922        });
2923
2924        jMenuAdd.add(jMenuItemStaticText);
2925
2926        jMenuItemTextField.setText("Text field");
2927        jMenuItemTextField.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2928            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2929                jMenuItemTextFieldActionPerformed(evt);
2930            }
2931        });
2932
2933        jMenuAdd.add(jMenuItemTextField);
2934
2935        jMenuItemChart.setText("Chart");
2936        jMenuItemChart.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2937            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2938                jMenuItemChartActionPerformed(evt);
2939            }
2940        });
2941
2942        jMenuAdd.add(jMenuItemChart);
2943
2944        jMenuItemSubreport.setText("Subreport");
2945        jMenuItemSubreport.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2946            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2947                jMenuItemSubreportActionPerformed(evt);
2948            }
2949        });
2950
2951        jMenuAdd.add(jMenuItemSubreport);
2952
2953        jMenuEdit.add(jMenuAdd);
2954
2955        jMenuItemAddGroup.setText("New report group wizard");
2956        jMenuItemAddGroup.setEnabled(false);
2957        jMenuItemAddGroup.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2958            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2959                jMenuItemAddGroupActionPerformed(evt);
2960            }
2961        });
2962
2963        jMenuEdit.add(jMenuItemAddGroup);
2964
2965        jMenuItemElementProperties.setText("Element properties");
2966        jMenuItemElementProperties.setEnabled(false);
2967        jMenuItemElementProperties.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2968            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2969                jMenuItemElementPropertiesActionPerformed(evt);
2970            }
2971        });
2972
2973        jMenuEdit.add(jMenuItemElementProperties);
2974
2975        jMenuItemXMLSource.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/null.gif")));
2976        jMenuItemXMLSource.setText("XML source...");
2977        jMenuItemXMLSource.setEnabled(false);
2978        jMenuItemXMLSource.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2979            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2980                jMenuItemXMLSourceActionPerformed(evt);
2981            }
2982        });
2983
2984        jMenuEdit.add(jMenuItemXMLSource);
2985
2986        jMenuInternationalization.setText("Internationalization");
2987        jMenuInternationalization.setEnabled(false);
2988        jMenuLocaleFiles.setText("Locale resource files");
2989        jMenuLocaleFiles.addActionListener(new java.awt.event.ActionListener JavaDoc() {
2990            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
2991                jMenuLocaleFilesActionPerformed(evt);
2992            }
2993        });
2994
2995        jMenuInternationalization.add(jMenuLocaleFiles);
2996
2997        jMenuEdit.add(jMenuInternationalization);
2998
2999        jMenuEdit.add(jSeparator25);
3000
3001        jMenuItemReportProperties.setText("Report properties");
3002        jMenuItemReportProperties.setEnabled(false);
3003        jMenuItemReportProperties.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3004            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3005                jMenuItemReportPropertiesActionPerformed(evt);
3006            }
3007        });
3008
3009        jMenuEdit.add(jMenuItemReportProperties);
3010
3011        jMenuItemProperties.setText("Custom properties");
3012        jMenuItemProperties.setEnabled(false);
3013        jMenuItemProperties.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3014            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3015                jMenuItemPropertiesActionPerformed(evt);
3016            }
3017        });
3018
3019        jMenuEdit.add(jMenuItemProperties);
3020
3021        jMenuItemReportImports.setText("Report series");
3022        jMenuItemReportImports.setEnabled(false);
3023        jMenuItemReportImports.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3024            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3025                jMenuItemReportImportsActionPerformed(evt);
3026            }
3027        });
3028
3029        jMenuEdit.add(jMenuItemReportImports);
3030
3031        jMenuItemScriptletEditor.setText("ScriptletEditor");
3032        jMenuItemScriptletEditor.setEnabled(false);
3033        jMenuItemScriptletEditor.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3034            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3035                jMenuItemScriptletEditorActionPerformed(evt);
3036            }
3037        });
3038
3039        jMenuEdit.add(jMenuItemScriptletEditor);
3040
3041        jMenuEdit.add(jSeparator26);
3042
3043        jMenuItemReportQuery.setText("Report query");
3044        jMenuItemReportQuery.setEnabled(false);
3045        jMenuItemReportQuery.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3046            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3047                jMenuItemReportQueryActionPerformed(evt);
3048            }
3049        });
3050
3051        jMenuEdit.add(jMenuItemReportQuery);
3052
3053        jMenuItemSubDataset.setText("Subdatasets");
3054        jMenuItemSubDataset.setEnabled(false);
3055        jMenuItemSubDataset.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3056            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3057                jMenuItemSubDatasetActionPerformed(evt);
3058            }
3059        });
3060
3061        jMenuEdit.add(jMenuItemSubDataset);
3062
3063        jMenuEdit.add(jSeparator28);
3064
3065        jMenuItemRemoveMargins.setText("Item");
3066        jMenuItemRemoveMargins.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3067            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3068                jMenuItemRemoveMarginsActionPerformed(evt);
3069            }
3070        });
3071
3072        jMenuEdit.add(jMenuItemRemoveMargins);
3073
3074        jMDIMenuBar.add(jMenuEdit);
3075
3076        jMenuView.setMnemonic('v');
3077        jMenuView.setText("View");
3078        jMenuView.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3079            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3080                jMenuViewActionPerformed(evt);
3081            }
3082        });
3083        jMenuView.addChangeListener(new javax.swing.event.ChangeListener JavaDoc() {
3084            public void stateChanged(javax.swing.event.ChangeEvent JavaDoc evt) {
3085                jMenuViewStateChanged(evt);
3086            }
3087        });
3088
3089        jCheckBoxMenuItemGrid.setText("Show grid");
3090        jCheckBoxMenuItemGrid.setEnabled(false);
3091        jCheckBoxMenuItemGrid.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3092            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3093                jCheckBoxMenuItemGridActionPerformed(evt);
3094            }
3095        });
3096
3097        jMenuView.add(jCheckBoxMenuItemGrid);
3098
3099        jMenuView.add(jSeparator4);
3100
3101        jMenuPanels.setText("Docking panes");
3102        jCheckBoxMenuItemExplorer.setSelected(true);
3103        jCheckBoxMenuItemExplorer.setText("Files");
3104        jCheckBoxMenuItemExplorer.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3105            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3106                jCheckBoxMenuItemExplorerActionPerformed(evt);
3107            }
3108        });
3109
3110        jMenuPanels.add(jCheckBoxMenuItemExplorer);
3111
3112        jCheckBoxMenuItemDocumentStructure.setSelected(true);
3113        jCheckBoxMenuItemDocumentStructure.setText("Document structure");
3114        jCheckBoxMenuItemDocumentStructure.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3115            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3116                jCheckBoxMenuItemDocumentStructureActionPerformed1(evt);
3117            }
3118        });
3119
3120        jMenuPanels.add(jCheckBoxMenuItemDocumentStructure);
3121
3122        jCheckBoxMenuItemElementProperties.setSelected(true);
3123        jCheckBoxMenuItemElementProperties.setText("Element properties");
3124        jCheckBoxMenuItemElementProperties.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3125            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3126                jCheckBoxMenuItemElementPropertiesActionPerformed1(evt);
3127            }
3128        });
3129
3130        jMenuPanels.add(jCheckBoxMenuItemElementProperties);
3131
3132        jCheckBoxMenuItemLibrary.setSelected(true);
3133        jCheckBoxMenuItemLibrary.setText("Library");
3134        jCheckBoxMenuItemLibrary.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3135            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3136                jCheckBoxMenuItemLibraryActionPerformed(evt);
3137            }
3138        });
3139
3140        jMenuPanels.add(jCheckBoxMenuItemLibrary);
3141
3142        jCheckBoxMenuItemStylesLibrary.setSelected(true);
3143        jCheckBoxMenuItemStylesLibrary.setText("Styles Library");
3144        jCheckBoxMenuItemStylesLibrary.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3145            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3146                jCheckBoxMenuItemStylesLibraryActionPerformed(evt);
3147            }
3148        });
3149
3150        jMenuPanels.add(jCheckBoxMenuItemStylesLibrary);
3151
3152        jCheckBoxMenuItemOutput.setSelected(true);
3153        jCheckBoxMenuItemOutput.setText("Show output window");
3154        jCheckBoxMenuItemOutput.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3155            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3156                jCheckBoxMenuItemOutputActionPerformed(evt);
3157            }
3158        });
3159
3160        jMenuPanels.add(jCheckBoxMenuItemOutput);
3161
3162        jCheckBoxMenuItemThreadList.setSelected(true);
3163        jCheckBoxMenuItemThreadList.setText("Threads list");
3164        jCheckBoxMenuItemThreadList.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3165            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3166                jCheckBoxMenuItemExplorerActionPerformed1(evt);
3167            }
3168        });
3169
3170        jMenuPanels.add(jCheckBoxMenuItemThreadList);
3171
3172        jMenuView.add(jMenuPanels);
3173
3174        jMenuToolBars.setText("Toolbars");
3175        jCheckBoxMenuItemTextFormatting.setSelected(true);
3176        jCheckBoxMenuItemTextFormatting.setText("Text formatting");
3177        jCheckBoxMenuItemTextFormatting.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3178            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3179                jCheckBoxMenuItemTextFormattingActionPerformed(evt);
3180            }
3181        });
3182
3183        jMenuToolBars.add(jCheckBoxMenuItemTextFormatting);
3184
3185        jCheckBoxMenuItemElementsFormatting.setSelected(true);
3186        jCheckBoxMenuItemElementsFormatting.setText("Elements formatting");
3187        jCheckBoxMenuItemElementsFormatting.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3188            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3189                jCheckBoxMenuItemElementsFormattingActionPerformed(evt);
3190            }
3191        });
3192
3193        jMenuToolBars.add(jCheckBoxMenuItemElementsFormatting);
3194
3195        jMenuView.add(jMenuToolBars);
3196
3197        jMenuView.add(jSeparator12);
3198
3199        jMenuItemFields.setText("Report fields");
3200        jMenuItemFields.setEnabled(false);
3201        jMenuItemFields.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3202            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3203                jMenuItemFieldsActionPerformed(evt);
3204            }
3205        });
3206
3207        jMenuView.add(jMenuItemFields);
3208
3209        jMenuItemVariables.setText("Report variables");
3210        jMenuItemVariables.setEnabled(false);
3211        jMenuItemVariables.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3212            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3213                jMenuItemVariablesActionPerformed(evt);
3214            }
3215        });
3216
3217        jMenuView.add(jMenuItemVariables);
3218
3219        jMenuItemParameters.setText("Report parameters");
3220        jMenuItemParameters.setEnabled(false);
3221        jMenuItemParameters.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3222            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3223                jMenuItemParametersActionPerformed(evt);
3224            }
3225        });
3226
3227        jMenuView.add(jMenuItemParameters);
3228
3229        jMenuView.add(jSeparator6);
3230
3231        jMenuItemBands.setText("Bands");
3232        jMenuItemBands.setEnabled(false);
3233        jMenuItemBands.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3234            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3235                jMenuItemBandsActionPerformed(evt);
3236            }
3237        });
3238
3239        jMenuView.add(jMenuItemBands);
3240
3241        jMenuItemGroups.setText("Report groups");
3242        jMenuItemGroups.setEnabled(false);
3243        jMenuItemGroups.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3244            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3245                jMenuItemGroupsActionPerformed(evt);
3246            }
3247        });
3248
3249        jMenuView.add(jMenuItemGroups);
3250
3251        jMDIMenuBar.add(jMenuView);
3252
3253        jMenuFormat.setMnemonic('o');
3254        jMenuFormat.setText("Format");
3255        jMenuItemStyles.setText("Styles");
3256        jMenuItemStyles.setEnabled(false);
3257        jMenuItemStyles.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3258            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3259                jMenuItemStylesActionPerformed(evt);
3260            }
3261        });
3262
3263        jMenuFormat.add(jMenuItemStyles);
3264
3265        jMenuItemFonts.setText("Report fonts");
3266        jMenuItemFonts.setEnabled(false);
3267        jMenuItemFonts.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3268            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3269                jMenuItemFontsActionPerformed(evt);
3270            }
3271        });
3272
3273        jMenuFormat.add(jMenuItemFonts);
3274
3275        jMenuFormat.add(jSeparator29);
3276
3277        jMenuAlign.setText("Align");
3278        jMenuAlign.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3279            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3280                jMenuAlignActionPerformed(evt);
3281            }
3282        });
3283
3284        jMenuItemAlignLeft.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_LEFT, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
3285        jMenuItemAlignLeft.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_align_left.png")));
3286        jMenuItemAlignLeft.setText("Align left");
3287        jMenuItemAlignLeft.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3288            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3289                jMenuItemAlignLeftActionPerformed(evt);
3290            }
3291        });
3292
3293        jMenuAlign.add(jMenuItemAlignLeft);
3294
3295        jMenuItemAlignRight.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_RIGHT, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
3296        jMenuItemAlignRight.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_align_right.png")));
3297        jMenuItemAlignRight.setText("Align right");
3298        jMenuItemAlignRight.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3299            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3300                jMenuItemAlignRightActionPerformed(evt);
3301            }
3302        });
3303
3304        jMenuAlign.add(jMenuItemAlignRight);
3305
3306        jMenuItemAlignTop.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_UP, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
3307        jMenuItemAlignTop.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_align_top.png")));
3308        jMenuItemAlignTop.setText("Align top");
3309        jMenuItemAlignTop.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3310            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3311                jMenuItemAlignTopActionPerformed(evt);
3312            }
3313        });
3314
3315        jMenuAlign.add(jMenuItemAlignTop);
3316
3317        jMenuItemAlignBottom.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_DOWN, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
3318        jMenuItemAlignBottom.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_align_bottom.png")));
3319        jMenuItemAlignBottom.setText("Align bottom");
3320        jMenuItemAlignBottom.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3321            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3322                jMenuItemAlignBottomActionPerformed(evt);
3323            }
3324        });
3325
3326        jMenuAlign.add(jMenuItemAlignBottom);
3327
3328        jMenuAlign.add(jSeparator19);
3329
3330        jMenuItemAlignVerticalAxis.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_center_axis.png")));
3331        jMenuItemAlignVerticalAxis.setText("Align vertical axis");
3332        jMenuItemAlignVerticalAxis.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3333            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3334                jMenuItemAlignVerticalAxisActionPerformed(evt);
3335            }
3336        });
3337
3338        jMenuAlign.add(jMenuItemAlignVerticalAxis);
3339
3340        jMenuItemAlignHorizontalAxis.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_vcenter_axis.png")));
3341        jMenuItemAlignHorizontalAxis.setText("Align horizontal axis");
3342        jMenuItemAlignHorizontalAxis.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3343            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3344                jMenuItemAlignHorizontalAxisActionPerformed(evt);
3345            }
3346        });
3347
3348        jMenuAlign.add(jMenuItemAlignHorizontalAxis);
3349
3350        jMenuAlign.add(jSeparator20);
3351
3352        jMenuItemAlignToBandTop.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_UP, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
3353        jMenuItemAlignToBandTop.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/format/align_top_band.png")));
3354        jMenuItemAlignToBandTop.setText("Align to band top");
3355        jMenuItemAlignToBandTop.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3356            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3357                jMenuItemAlignToBandTopActionPerformed(evt);
3358            }
3359        });
3360
3361        jMenuAlign.add(jMenuItemAlignToBandTop);
3362
3363        jMenuItemAlignToBandBottom.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_DOWN, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
3364        jMenuItemAlignToBandBottom.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/toolbars/format/align_bottom_band.png")));
3365        jMenuItemAlignToBandBottom.setText("Align to band bottom");
3366        jMenuItemAlignToBandBottom.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3367            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3368                jMenuItemAlignToBandBottomActionPerformed(evt);
3369            }
3370        });
3371
3372        jMenuAlign.add(jMenuItemAlignToBandBottom);
3373
3374        jMenuFormat.add(jMenuAlign);
3375
3376        jMenuSize.setText("Size");
3377        jMenuItemSameWidth.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_same_hsize.png")));
3378        jMenuItemSameWidth.setText("Same width");
3379        jMenuItemSameWidth.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3380            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3381                jMenuItemSameWidthActionPerformed(evt);
3382            }
3383        });
3384
3385        jMenuSize.add(jMenuItemSameWidth);
3386
3387        jMenuItemSameWidthMax.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_same_hsize_plus.png")));
3388        jMenuItemSameWidthMax.setText("Same width (max)");
3389        jMenuItemSameWidthMax.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3390            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3391                jMenuItemSameWidthMaxActionPerformed(evt);
3392            }
3393        });
3394
3395        jMenuSize.add(jMenuItemSameWidthMax);
3396
3397        jMenuItemSameWidthMin.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_same_hsize_min.png")));
3398        jMenuItemSameWidthMin.setText("Same width (min)");
3399        jMenuItemSameWidthMin.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3400            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3401                jMenuItemSameWidthMinActionPerformed(evt);
3402            }
3403        });
3404
3405        jMenuSize.add(jMenuItemSameWidthMin);
3406
3407        jMenuSize.add(jSeparator17);
3408
3409        jMenuItemSameHeight.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_same_vsize.png")));
3410        jMenuItemSameHeight.setText("Same height");
3411        jMenuItemSameHeight.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3412            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3413                jMenuItemSameHeightActionPerformed(evt);
3414            }
3415        });
3416
3417        jMenuSize.add(jMenuItemSameHeight);
3418
3419        jMenuItemSameHeightMin.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_same_vsize_min.png")));
3420        jMenuItemSameHeightMin.setText("Same height (min)");
3421        jMenuItemSameHeightMin.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3422            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3423                jMenuItemSameHeightMinActionPerformed(evt);
3424            }
3425        });
3426
3427        jMenuSize.add(jMenuItemSameHeightMin);
3428
3429        jMenuItemSameHeightMax.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_same_vsize_plus.png")));
3430        jMenuItemSameHeightMax.setText("Same height (max)");
3431        jMenuItemSameHeightMax.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3432            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3433                jMenuItemSameHeightMaxActionPerformed(evt);
3434            }
3435        });
3436
3437        jMenuSize.add(jMenuItemSameHeightMax);
3438
3439        jMenuSize.add(jSeparator18);
3440
3441        jMenuItemSameSize.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_same_size.png")));
3442        jMenuItemSameSize.setText("Same size");
3443        jMenuItemSameSize.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3444            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3445                jMenuItemSameSizeActionPerformed(evt);
3446            }
3447        });
3448
3449        jMenuSize.add(jMenuItemSameSize);
3450
3451        jMenuFormat.add(jMenuSize);
3452
3453        jMenuPosition.setText("Position");
3454        jMenuItemCenterH.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_hcenter.png")));
3455        jMenuItemCenterH.setText("Center horizontally (band based)");
3456        jMenuItemCenterH.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3457            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3458                jMenuItemCenterHActionPerformed(evt);
3459            }
3460        });
3461
3462        jMenuPosition.add(jMenuItemCenterH);
3463
3464        jMenuItemCenterV.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_vcenter.png")));
3465        jMenuItemCenterV.setText("Center vertically (band based)");
3466        jMenuItemCenterV.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3467            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3468                jMenuItemCenterVActionPerformed(evt);
3469            }
3470        });
3471
3472        jMenuPosition.add(jMenuItemCenterV);
3473
3474        jMenuItemCenterInBand.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_ccenter.png")));
3475        jMenuItemCenterInBand.setText("Center in band");
3476        jMenuItemCenterInBand.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3477            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3478                jMenuItemCenterInBandActionPerformed(evt);
3479            }
3480        });
3481
3482        jMenuPosition.add(jMenuItemCenterInBand);
3483
3484        jMenuItemCenterBackground.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/elem_bcenter.png")));
3485        jMenuItemCenterBackground.setText("Center in background");
3486        jMenuItemCenterBackground.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3487            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3488                jMenuItemCenterBackgroundActionPerformed(evt);
3489            }
3490        });
3491
3492        jMenuPosition.add(jMenuItemCenterBackground);
3493
3494        jMenuItemJoinLeft.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
3495        jMenuItemJoinLeft.setText("Join sides left");
3496        jMenuItemJoinLeft.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3497            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3498                jMenuItemJoinLeftActionPerformed(evt);
3499            }
3500        });
3501
3502        jMenuPosition.add(jMenuItemJoinLeft);
3503
3504        jMenuItemJoinRight.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
3505        jMenuItemJoinRight.setText("Join sides right");
3506        jMenuItemJoinRight.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3507            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3508                jMenuItemJoinRightActionPerformed(evt);
3509            }
3510        });
3511
3512        jMenuPosition.add(jMenuItemJoinRight);
3513
3514        jMenuItemLeftMargin.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_HOME, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
3515        jMenuItemLeftMargin.setText("Join left page margin");
3516        jMenuItemLeftMargin.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3517            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3518                jMenuItemLeftMarginActionPerformed(evt);
3519            }
3520        });
3521
3522        jMenuPosition.add(jMenuItemLeftMargin);
3523
3524        jMenuItemRightMargin.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_END, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
3525        jMenuItemRightMargin.setText("Join right page margin");
3526        jMenuItemRightMargin.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3527            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3528                jMenuItemRightMarginActionPerformed(evt);
3529            }
3530        });
3531
3532        jMenuPosition.add(jMenuItemRightMargin);
3533
3534        jMenuFormat.add(jMenuPosition);
3535
3536        jMenuFormat.add(jSeparator5);
3537
3538        jMenuHSpacing.setText("Horizontal spacing...");
3539        jMenuItemHSMakeEqual.setText("Make equal");
3540        jMenuItemHSMakeEqual.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3541            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3542                jMenuItemHSMakeEqualActionPerformed(evt);
3543            }
3544        });
3545
3546        jMenuHSpacing.add(jMenuItemHSMakeEqual);
3547
3548        jMenuItemHSIncrease.setText("Increase");
3549        jMenuItemHSIncrease.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3550            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3551                jMenuItemHSIncreaseActionPerformed(evt);
3552            }
3553        });
3554
3555        jMenuHSpacing.add(jMenuItemHSIncrease);
3556
3557        jMenuItemHSDecrease.setText("Decrease");
3558        jMenuItemHSDecrease.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3559            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3560                jMenuItemHSDecreaseActionPerformed(evt);
3561            }
3562        });
3563
3564        jMenuHSpacing.add(jMenuItemHSDecrease);
3565
3566        jMenuItemHSRemove.setText("Remove");
3567        jMenuItemHSRemove.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3568            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3569                jMenuItemHSRemoveActionPerformed(evt);
3570            }
3571        });
3572
3573        jMenuHSpacing.add(jMenuItemHSRemove);
3574
3575        jMenuFormat.add(jMenuHSpacing);
3576
3577        jMenuVSpacing.setText("Vertical spacing");
3578        jMenuItemVSMakeEqual.setText("Make equal");
3579        jMenuItemVSMakeEqual.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3580            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3581                jMenuItemVSMakeEqualActionPerformed(evt);
3582            }
3583        });
3584
3585        jMenuVSpacing.add(jMenuItemVSMakeEqual);
3586
3587        jMenuItemVSIncrease.setText("Increase");
3588        jMenuItemVSIncrease.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3589            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3590                jMenuItemVSIncreaseActionPerformed(evt);
3591            }
3592        });
3593
3594        jMenuVSpacing.add(jMenuItemVSIncrease);
3595
3596        jMenuItemVSDecrease.setText("Decrease");
3597        jMenuItemVSDecrease.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3598            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3599                jMenuItemVSDecreaseActionPerformed(evt);
3600            }
3601        });
3602
3603        jMenuVSpacing.add(jMenuItemVSDecrease);
3604
3605        jMenuItemVSRemove.setText("Remove");
3606        jMenuItemVSRemove.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3607            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3608                jMenuItemVSRemoveActionPerformed(evt);
3609            }
3610        });
3611
3612        jMenuVSpacing.add(jMenuItemVSRemove);
3613
3614        jMenuFormat.add(jMenuVSpacing);
3615
3616        jMenuItemOrganize.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
3617        jMenuItemOrganize.setIcon(new javax.swing.ImageIcon JavaDoc(""));
3618        jMenuItemOrganize.setText("Organize as a table");
3619        jMenuItemOrganize.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3620            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3621                jMenuItemOrganizeActionPerformed(evt);
3622            }
3623        });
3624
3625        jMenuFormat.add(jMenuItemOrganize);
3626
3627        jMenuFormat.add(jSeparator8);
3628
3629        jMenuItemBringToFront.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/sendtofront.png")));
3630        jMenuItemBringToFront.setText("Bring to front");
3631        jMenuItemBringToFront.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3632            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3633                jMenuItemBringToFrontActionPerformed(evt);
3634            }
3635        });
3636
3637        jMenuFormat.add(jMenuItemBringToFront);
3638
3639        jMenuItemSendToBack.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/sendtoback.png")));
3640        jMenuItemSendToBack.setText("Send to back");
3641        jMenuItemSendToBack.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3642            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3643                jMenuItemSendToBackActionPerformed(evt);
3644            }
3645        });
3646
3647        jMenuFormat.add(jMenuItemSendToBack);
3648
3649        jMDIMenuBar.add(jMenuFormat);
3650
3651        jMenuDatabase.setMnemonic('d');
3652        jMenuDatabase.setText("Data");
3653        jMenuItemConnections.setText("Connections / Datasources");
3654        jMenuItemConnections.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3655            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3656                jMenuItemConnectionsActionPerformed(evt);
3657            }
3658        });
3659
3660        jMenuDatabase.add(jMenuItemConnections);
3661
3662        jMenuItemActiveConnection.setText("Set active connection");
3663        jMenuItemActiveConnection.setToolTipText("Set the connection that must be used to fill this report");
3664        jMenuItemActiveConnection.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3665            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3666                jMenuItemActiveConnectionActionPerformed(evt);
3667            }
3668        });
3669
3670        jMenuDatabase.add(jMenuItemActiveConnection);
3671
3672        jMenuDatabase.add(jSeparator9);
3673
3674        jMenuItemReportQuery2.setText("Report query");
3675        jMenuItemReportQuery2.setEnabled(false);
3676        jMenuItemReportQuery2.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3677            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3678                jMenuItemReportQuery2ActionPerformed(evt);
3679            }
3680        });
3681
3682        jMenuDatabase.add(jMenuItemReportQuery2);
3683
3684        jMenuItemSubDataset1.setText("Subdatasets");
3685        jMenuItemSubDataset1.setEnabled(false);
3686        jMenuItemSubDataset1.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3687            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3688                jMenuItemSubDatasetActionPerformed(evt);
3689            }
3690        });
3691
3692        jMenuDatabase.add(jMenuItemSubDataset1);
3693
3694        jMDIMenuBar.add(jMenuDatabase);
3695
3696        jMenuBuild.setMnemonic('b');
3697        jMenuBuild.setText("Build");
3698        jMenuBuild.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3699            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3700                jMenuBuildActionPerformed(evt);
3701            }
3702        });
3703
3704        jMenuItemCompile.setText("Compile");
3705        jMenuItemCompile.addItemListener(new java.awt.event.ItemListener JavaDoc() {
3706            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
3707                jMenuItemCompileItemStateChanged(evt);
3708            }
3709        });
3710        jMenuItemCompile.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3711            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3712                jMenuItemCompileActionPerformed(evt);
3713            }
3714        });
3715
3716        jMenuBuild.add(jMenuItemCompile);
3717
3718        jMenuBuild.add(jSeparator10);
3719
3720        jMenuItemExecute.setText("Execute (empty datasource)");
3721        jMenuItemExecute.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3722            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3723                jMenuItemExecuteActionPerformed(evt);
3724            }
3725        });
3726
3727        jMenuBuild.add(jMenuItemExecute);
3728
3729        jMenuItemExecuteDB.setText("Execute report (using active conn.) ");
3730        jMenuItemExecuteDB.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3731            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3732                jMenuItemExecuteDBActionPerformed(evt);
3733            }
3734        });
3735
3736        jMenuBuild.add(jMenuItemExecuteDB);
3737
3738        jMenuBuild.add(jSeparator33);
3739
3740        jMenuItemCreateFromTemplate.setText("Create from template");
3741        jMenuItemCreateFromTemplate.addItemListener(new java.awt.event.ItemListener JavaDoc() {
3742            public void itemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {
3743                jMenuItemCompileItemStateChanged1(evt);
3744            }
3745        });
3746        jMenuItemCreateFromTemplate.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3747            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3748                jMenuItemCompileActionPerformed1(evt);
3749            }
3750        });
3751
3752        jMenuBuild.add(jMenuItemCreateFromTemplate);
3753
3754        jMenuBuild.add(jSeparator11);
3755
3756        buttonGroupExportType.add(jRadioButtonMenuItemPreviewPDF);
3757        jRadioButtonMenuItemPreviewPDF.setSelected(true);
3758        jRadioButtonMenuItemPreviewPDF.setText("PDF preview");
3759        jRadioButtonMenuItemPreviewPDF.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3760            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3761                jRadioButtonMenuItemPreviewPDFActionPerformed(evt);
3762            }
3763        });
3764
3765        jMenuBuild.add(jRadioButtonMenuItemPreviewPDF);
3766
3767        buttonGroupExportType.add(jRadioButtonMenuItemPreviewHTML);
3768        jRadioButtonMenuItemPreviewHTML.setText("HTML preview");
3769        jRadioButtonMenuItemPreviewHTML.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3770            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3771                jRadioButtonMenuItemPreviewHTMLActionPerformed(evt);
3772            }
3773        });
3774
3775        jMenuBuild.add(jRadioButtonMenuItemPreviewHTML);
3776
3777        buttonGroupExportType.add(jRadioButtonMenuItemPreviewJAVA);
3778        jRadioButtonMenuItemPreviewJAVA.setText("JAVA 2D preview");
3779        jRadioButtonMenuItemPreviewJAVA.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3780            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3781                jRadioButtonMenuItemPreviewJAVAActionPerformed(evt);
3782            }
3783        });
3784
3785        jMenuBuild.add(jRadioButtonMenuItemPreviewJAVA);
3786
3787        buttonGroupExportType.add(jRadioButtonMenuItemPreviewXLS);
3788        jRadioButtonMenuItemPreviewXLS.setText("Excel preview");
3789        jRadioButtonMenuItemPreviewXLS.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3790            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3791                jRadioButtonMenuItemPreviewXLSActionPerformed(evt);
3792            }
3793        });
3794
3795        jMenuBuild.add(jRadioButtonMenuItemPreviewXLS);
3796
3797        buttonGroupExportType.add(jRadioButtonMenuItemPreviewXLS2);
3798        jRadioButtonMenuItemPreviewXLS2.setText("Excel preview (using JExcelApi)");
3799        jRadioButtonMenuItemPreviewXLS2.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3800            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3801                jRadioButtonMenuItemPreviewXLS2ActionPerformed(evt);
3802            }
3803        });
3804
3805        jMenuBuild.add(jRadioButtonMenuItemPreviewXLS2);
3806
3807        buttonGroupExportType.add(jRadioButtonMenuItemPreviewCSV);
3808        jRadioButtonMenuItemPreviewCSV.setText("CSV preview");
3809        jRadioButtonMenuItemPreviewCSV.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3810            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3811                jRadioButtonMenuItemPreviewCSVActionPerformed(evt);
3812            }
3813        });
3814
3815        jMenuBuild.add(jRadioButtonMenuItemPreviewCSV);
3816
3817        buttonGroupExportType.add(jRadioButtonMenuItemPreviewTXT);
3818        jRadioButtonMenuItemPreviewTXT.setText("Text preview (Experimental)");
3819        jRadioButtonMenuItemPreviewTXT.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3820            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3821                jRadioButtonMenuItemPreviewTXTActionPerformed(evt);
3822            }
3823        });
3824
3825        jMenuBuild.add(jRadioButtonMenuItemPreviewTXT);
3826
3827        buttonGroupExportType.add(jRadioButtonMenuItemPreviewTXTJR);
3828        jRadioButtonMenuItemPreviewTXTJR.setSelected(true);
3829        jRadioButtonMenuItemPreviewTXTJR.setText("TXT JR preview");
3830        jRadioButtonMenuItemPreviewTXTJR.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3831            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3832                jRadioButtonMenuItemPreviewTXTJRActionPerformed(evt);
3833            }
3834        });
3835
3836        jMenuBuild.add(jRadioButtonMenuItemPreviewTXTJR);
3837
3838        buttonGroupExportType.add(jRadioButtonMenuItemPreviewRTF);
3839        jRadioButtonMenuItemPreviewRTF.setSelected(true);
3840        jRadioButtonMenuItemPreviewRTF.setText("RTF preview");
3841        jRadioButtonMenuItemPreviewRTF.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3842            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3843                jRadioButtonMenuItemPreviewRTFActionPerformed(evt);
3844            }
3845        });
3846
3847        jMenuBuild.add(jRadioButtonMenuItemPreviewRTF);
3848
3849        buttonGroupExportType.add(jRadioButtonMenuItemPreviewInternalViewer);
3850        jRadioButtonMenuItemPreviewInternalViewer.setText("JRViewer preview");
3851        jRadioButtonMenuItemPreviewInternalViewer.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3852            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3853                jRadioButtonMenuItemPreviewInternalViewerActionPerformed(evt);
3854            }
3855        });
3856
3857        jMenuBuild.add(jRadioButtonMenuItemPreviewInternalViewer);
3858
3859        jMenuBuild.add(jSeparator14);
3860
3861        jMenuItemActiveConnection1.setText("Set active connection");
3862        jMenuItemActiveConnection1.setToolTipText("Set the connection that must be used to fill this report");
3863        jMenuItemActiveConnection1.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3864            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3865                jMenuItemActiveConnectionActionPerformed(evt);
3866            }
3867        });
3868
3869        jMenuBuild.add(jMenuItemActiveConnection1);
3870
3871        jMenuItemReportLocale.setText("Item");
3872        jMenuItemReportLocale.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3873            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3874                jMenuItemReportLocaleActionPerformed(evt);
3875            }
3876        });
3877
3878        jMenuBuild.add(jMenuItemReportLocale);
3879
3880        jMenuItemReportTimeZone.setText("Time Zone");
3881        jMenuItemReportTimeZone.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3882            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3883                jMenuItemReportTimeZoneActionPerformed(evt);
3884            }
3885        });
3886
3887        jMenuBuild.add(jMenuItemReportTimeZone);
3888
3889        jCheckBoxMenuItemIgnorePagination.setText("Ignore pagination");
3890        jCheckBoxMenuItemIgnorePagination.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3891            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3892                jCheckBoxMenuItemIgnorePaginationActionPerformed(evt);
3893            }
3894        });
3895
3896        jMenuBuild.add(jCheckBoxMenuItemIgnorePagination);
3897
3898        jMenuItemMaxRecords.setText("Max records");
3899        jMenuItemMaxRecords.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3900            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3901                jMenuItemMaxRecordsActionPerformed(evt);
3902            }
3903        });
3904
3905        jMenuBuild.add(jMenuItemMaxRecords);
3906
3907        jCheckBoxMenuItemReportVirtualizer.setText("Use Report virtualizer");
3908        jCheckBoxMenuItemReportVirtualizer.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3909            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3910                jCheckBoxMenuItemReportVirtualizerActionPerformed(evt);
3911            }
3912        });
3913
3914        jMenuBuild.add(jCheckBoxMenuItemReportVirtualizer);
3915
3916        jMDIMenuBar.add(jMenuBuild);
3917
3918        jMenuTools.setMnemonic('t');
3919        jMenuTools.setText("Options");
3920        jCheckBoxMenuItemSnapToGrid.setText("Snap To Grid");
3921        jCheckBoxMenuItemSnapToGrid.setEnabled(false);
3922        jCheckBoxMenuItemSnapToGrid.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3923            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3924                jCheckBoxMenuItemSnapToGridActionPerformed(evt);
3925            }
3926        });
3927
3928        jMenuTools.add(jCheckBoxMenuItemSnapToGrid);
3929
3930        jCheckBoxMenuItemEMM.setText("Disable elements mouse move");
3931        jCheckBoxMenuItemEMM.setEnabled(false);
3932        jCheckBoxMenuItemEMM.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3933            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3934                jCheckBoxMenuItemEMMActionPerformed(evt);
3935            }
3936        });
3937
3938        jMenuTools.add(jCheckBoxMenuItemEMM);
3939
3940        jMenuTools.add(jSeparator13);
3941
3942        jMenuItemOptions.setText("Settings...");
3943        jMenuItemOptions.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3944            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3945                jMenuItemOptionsActionPerformed(evt);
3946            }
3947        });
3948
3949        jMenuTools.add(jMenuItemOptions);
3950
3951        jMenuItemCompatibility.setText("Compatibility...");
3952        jMenuItemCompatibility.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3953            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3954                jMenuItemCompatibilityActionPerformed(evt);
3955            }
3956        });
3957
3958        jMenuTools.add(jMenuItemCompatibility);
3959
3960        jMenuItemClasspath.setText("Classpath");
3961        jMenuItemClasspath.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3962            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3963                jMenuItemClasspathActionPerformed(evt);
3964            }
3965        });
3966
3967        jMenuTools.add(jMenuItemClasspath);
3968
3969        jMenuItemFontspath.setText("Fonts path");
3970        jMenuItemFontspath.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3971            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3972                jMenuItemClasspathActionPerformed1(evt);
3973            }
3974        });
3975
3976        jMenuTools.add(jMenuItemFontspath);
3977
3978        jMenuItemReloadFonts.setText("Reload fonts");
3979        jMenuItemReloadFonts.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3980            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3981                jMenuItemReloadFontsActionPerformed(evt);
3982            }
3983        });
3984
3985        jMenuTools.add(jMenuItemReloadFonts);
3986
3987        jMenuItemExpressions.setText("Formulas");
3988        jMenuItemExpressions.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3989            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3990                jMenuItemExportOptionsActionPerformed1(evt);
3991            }
3992        });
3993
3994        jMenuTools.add(jMenuItemExpressions);
3995
3996        jMenuItemExportOptions.setText("Export options");
3997        jMenuItemExportOptions.addActionListener(new java.awt.event.ActionListener JavaDoc() {
3998            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
3999                jMenuItemExportOptionsActionPerformed(evt);
4000            }
4001        });
4002
4003        jMenuTools.add(jMenuItemExportOptions);
4004
4005        jMenuItemQueryExecuters.setText("Query executers");
4006        jMenuItemQueryExecuters.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4007            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4008                jMenuItemExpressionsjMenuItemExportOptionsActionPerformed1(evt);
4009            }
4010        });
4011
4012        jMenuTools.add(jMenuItemQueryExecuters);
4013
4014        jMenuTools.add(jSeparator7);
4015
4016        jMenuItemPluginConfig.setText("Configure plugins");
4017        jMenuItemPluginConfig.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4018            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4019                jMenuItemPluginConfigActionPerformed(evt);
4020            }
4021        });
4022
4023        jMenuTools.add(jMenuItemPluginConfig);
4024
4025        jMDIMenuBar.add(jMenuTools);
4026
4027        jMenuPlugins.setText("Plugins");
4028        jMDIMenuBar.add(jMenuPlugins);
4029
4030        jMenuWindow.setMnemonic('w');
4031        jMenuWindow.setText("Window");
4032        jMenuItemCascade.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/win_cascade.gif")));
4033        jMenuItemCascade.setText("Cascade");
4034        jMenuItemCascade.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4035            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4036                jMenuItemCascadeActionPerformed(evt);
4037            }
4038        });
4039
4040        jMenuWindow.add(jMenuItemCascade);
4041
4042        jMenuItemTileHorizontal.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/win_htile.gif")));
4043        jMenuItemTileHorizontal.setText("Tile horizontal");
4044        jMenuItemTileHorizontal.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4045            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4046                jMenuItemTileHorizontalActionPerformed(evt);
4047            }
4048        });
4049
4050        jMenuWindow.add(jMenuItemTileHorizontal);
4051
4052        jMenuItemTileVertical.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/win_vtile.gif")));
4053        jMenuItemTileVertical.setText("Tile vertical");
4054        jMenuItemTileVertical.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4055            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4056                jMenuItemTileVerticalActionPerformed(evt);
4057            }
4058        });
4059
4060        jMenuWindow.add(jMenuItemTileVertical);
4061
4062        jMenuItemtileAnodine.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/win_atile.gif")));
4063        jMenuItemtileAnodine.setText("Tile anodine");
4064        jMenuItemtileAnodine.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4065            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4066                jMenuItemtileAnodineActionPerformed(evt);
4067            }
4068        });
4069
4070        jMenuWindow.add(jMenuItemtileAnodine);
4071
4072        jMenuItemNextWin.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/win_next.gif")));
4073        jMenuItemNextWin.setText("Next Window");
4074        jMenuItemNextWin.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4075            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4076                jMenuItemNextWinActionPerformed(evt);
4077            }
4078        });
4079
4080        jMenuWindow.add(jMenuItemNextWin);
4081
4082        jMenuItemPrevWin.setIcon(new javax.swing.ImageIcon JavaDoc(getClass().getResource("/it/businesslogic/ireport/icons/menu/win_prev.gif")));
4083        jMenuItemPrevWin.setText("Previous Window");
4084        jMenuItemPrevWin.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4085            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4086                jMenuItemPrevWinActionPerformed(evt);
4087            }
4088        });
4089
4090        jMenuWindow.add(jMenuItemPrevWin);
4091
4092        jMenuItemRightSide.setText("Show/Hide right side");
4093        jMenuItemRightSide.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4094            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4095                jMenuItemRightSideActionPerformed(evt);
4096            }
4097        });
4098
4099        jMenuWindow.add(jMenuItemRightSide);
4100
4101        jMenuWindow.add(jSeparator21);
4102
4103        jMDIMenuBar.add(jMenuWindow);
4104
4105        jMenuHelp.setMnemonic('h');
4106        jMenuHelp.setText("Help");
4107        jMenuItemHomePage.setText("iReport home page");
4108        jMenuItemHomePage.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4109            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4110                jMenuItemForumjMenuItemHelpActionPerformed1(evt);
4111            }
4112        });
4113
4114        jMenuHelp.add(jMenuItemHomePage);
4115
4116        jMenuItemHelp.setText("Help...");
4117        jMenuItemHelp.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4118            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4119                jMenuItemHelpActionPerformed(evt);
4120            }
4121        });
4122
4123        jMenuHelp.add(jMenuItemHelp);
4124
4125        jMenuItemForum.setText("Forum...");
4126        jMenuItemForum.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4127            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4128                jMenuItemHelpActionPerformed1(evt);
4129            }
4130        });
4131
4132        jMenuHelp.add(jMenuItemForum);
4133
4134        jMenuItemAbout.setText("About iReport...");
4135        jMenuItemAbout.addActionListener(new java.awt.event.ActionListener JavaDoc() {
4136            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
4137                jMenuItemAboutActionPerformed(evt);
4138            }
4139        });
4140
4141        jMenuHelp.add(jMenuItemAbout);
4142
4143        jMDIMenuBar.add(jMenuHelp);
4144
4145        setJMenuBar(jMDIMenuBar);
4146
4147        pack();
4148    }// </editor-fold>//GEN-END:initComponents
4149

4150    private void jPanelMasterMouseClicked(java.awt.event.MouseEvent JavaDoc evt) {//GEN-FIRST:event_jPanelMasterMouseClicked
4151

4152        
4153        
4154    }//GEN-LAST:event_jPanelMasterMouseClicked
4155

4156
4157    
4158    private void formWindowStateChanged(java.awt.event.WindowEvent JavaDoc evt) {//GEN-FIRST:event_formWindowStateChanged
4159

4160    }//GEN-LAST:event_formWindowStateChanged
4161

4162    private void jMenuItemAddGroupActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemAddGroupActionPerformed1
4163

4164        JReportFrame activeFrame = this.getActiveReportFrame();
4165        if (activeFrame != null) {
4166
4167             this.setActiveTool( null );
4168             activeFrame.setNewObjectType( ReportElementType.BREAK_ELEMENT );
4169        }
4170        
4171    }//GEN-LAST:event_jMenuItemAddGroupActionPerformed1
4172

4173    private void jMenuItemCompileActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemCompileActionPerformed1
4174

4175        UserTemplatesDialog utd = new UserTemplatesDialog(this, true);
4176        utd.setVisible(true);
4177        
4178    }//GEN-LAST:event_jMenuItemCompileActionPerformed1
4179

4180    private void jMenuItemCompileItemStateChanged1(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemCompileItemStateChanged1
4181
// TODO add your handling code here:
4182
}//GEN-LAST:event_jMenuItemCompileItemStateChanged1
4183

4184    private void jMenuItemReloadFontsActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemReloadFontsActionPerformed
4185

4186        Thread JavaDoc fontsThread = new Thread JavaDoc(new Runnable JavaDoc()
4187        {
4188            public void run()
4189            {
4190                reloadFontsLists();
4191            }
4192        });
4193
4194        fontsThread.start();
4195
4196    }//GEN-LAST:event_jMenuItemReloadFontsActionPerformed
4197

4198    private void jMenuItemClasspathActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemClasspathActionPerformed1
4199

4200        FontsPathDialog cpd = new FontsPathDialog(this, true);
4201        cpd.setFontspath( getFontspath(), getClasspath() );
4202        cpd.setVisible(true);
4203        if (cpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION )
4204        {
4205            setFontspath( cpd.getFontspath() );
4206        }
4207    }//GEN-LAST:event_jMenuItemClasspathActionPerformed1
4208

4209    private void jMenuItemForumjMenuItemHelpActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemForumjMenuItemHelpActionPerformed1
4210
openUrl("http://jasperforge.org/sf/projects/ireport");
4211    }//GEN-LAST:event_jMenuItemForumjMenuItemHelpActionPerformed1
4212

4213    private void jMenuItemHelpActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemHelpActionPerformed1
4214

4215            openUrl("http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=showcat&catid=9");
4216
4217    }//GEN-LAST:event_jMenuItemHelpActionPerformed1
4218

4219    private void jButtonSaveActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonSaveActionPerformed1
4220

4221        jMenuItemSaveAllActionPerformed(evt);
4222    }//GEN-LAST:event_jButtonSaveActionPerformed1
4223

4224    private void jButtonNewActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonNewActionPerformed1
4225

4226        jMenuItemWizardActionPerformed(evt);
4227    }//GEN-LAST:event_jButtonNewActionPerformed1
4228

4229    private void jMenuItemExpressionsjMenuItemExportOptionsActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemExpressionsjMenuItemExportOptionsActionPerformed1
4230

4231
4232        QueryExecutersDialog qed = new QueryExecutersDialog(this, true);
4233        qed.setVisible(true);
4234
4235    }//GEN-LAST:event_jMenuItemExpressionsjMenuItemExportOptionsActionPerformed1
4236

4237    private void jCheckBoxMenuItemExplorerActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jCheckBoxMenuItemExplorerActionPerformed1
4238

4239         if (jCheckBoxMenuItemThreadList.isSelected()) {
4240                       //DockingManager.dock((Dockable)viewThreads, (Dockable)desktop, DockingConstants.EAST_REGION);
4241
Misc.dockAt(viewThreads, DockingConstants.SOUTH_REGION, 4);
4242         }
4243         else {
4244             DockingManager.close(viewThreads );
4245         }
4246    }//GEN-LAST:event_jCheckBoxMenuItemExplorerActionPerformed1
4247

4248    private void jMenuItemReportTimeZoneActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemReportTimeZoneActionPerformed
4249

4250        it.businesslogic.ireport.gui.locale.TimeZoneDialog fd = new it.businesslogic.ireport.gui.locale.TimeZoneDialog(this,true);
4251        fd.setReportTimeZoneId( this.getProperties().getProperty("reportTimeZoneId", "") );
4252        fd.setVisible(true);
4253
4254        if (fd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION)
4255        {
4256            String JavaDoc reportTimeZoneId = fd.getReportTimeZoneId();
4257            if (reportTimeZoneId == null)
4258            {
4259             this.getProperties().remove("reportTimeZoneId");
4260            }
4261            else
4262            {
4263                this.getProperties().setProperty("reportTimeZoneId", reportTimeZoneId);
4264            }
4265            saveiReportConfiguration();
4266        updateJMenuItemReportTimeZone();
4267        }
4268
4269    }//GEN-LAST:event_jMenuItemReportTimeZoneActionPerformed
4270

4271    private void jMenuItemExportOptionsActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemExportOptionsActionPerformed1
4272

4273        CustomExpressionsDialog ced = new CustomExpressionsDialog(this, true);
4274        ced.setExpressions( ExpressionEditor.defaultExpressions);
4275        ced.setVisible(true);
4276        if (ced.getDialogResult() == JOptionPane.OK_OPTION)
4277        {
4278            saveExpressionsList( ced.getExpressions() );
4279        }
4280    }//GEN-LAST:event_jMenuItemExportOptionsActionPerformed1
4281

4282    private void jMenuItemAddGroupActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemAddGroupActionPerformed
4283

4284        ReportGroupWizard rgw = new ReportGroupWizard();
4285        rgw.startWizard();
4286    }//GEN-LAST:event_jMenuItemAddGroupActionPerformed
4287

4288    private void jCheckBoxMenuItemStylesLibraryActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jCheckBoxMenuItemStylesLibraryActionPerformed
4289
if (jCheckBoxMenuItemStylesLibrary.isSelected())
4290        {
4291                     Misc.dockAt(stylesPanleView, DockingConstants.EAST_REGION, 2);
4292                     // this.getDockingContainerRight().addPanel("Styles library", this.stylesView, true);
4293
}
4294        else
4295        {
4296           DockingManager.close(stylesPanleView);
4297        }
4298        getProperties().put("panelStylesLibrary", ""+jCheckBoxMenuItemStylesLibrary.isSelected());
4299        this.saveiReportConfiguration();
4300    }//GEN-LAST:event_jCheckBoxMenuItemStylesLibraryActionPerformed
4301

4302    private void jCheckBoxMenuItemLibraryActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jCheckBoxMenuItemLibraryActionPerformed
4303
if (jCheckBoxMenuItemLibrary.isSelected())
4304        {
4305                 Misc.dockAt(viewLibrary, DockingConstants.EAST_REGION, 1);
4306           // this.getDockingContainerRight().addPanel("Library", this.libraryPanel, true);
4307
}
4308        else
4309        {
4310           DockingManager.close(viewLibrary);
4311        }
4312        getProperties().put("panelLibrary", ""+jCheckBoxMenuItemLibrary.isSelected());
4313        this.saveiReportConfiguration();
4314
4315
4316    }//GEN-LAST:event_jCheckBoxMenuItemLibraryActionPerformed
4317

4318    private void jCheckBoxMenuItemDocumentStructureActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jCheckBoxMenuItemDocumentStructureActionPerformed1
4319
if (jCheckBoxMenuItemDocumentStructure.isSelected())
4320        {
4321            if (getActiveReportFrame() == null || getActiveReportFrame().getSelectedCrosstabEditorPanel() == null)
4322            {
4323                  Misc.dockAt(viewDocumentStructure, DockingConstants.WEST_REGION, 1);
4324            }
4325            else
4326            {
4327                jCheckBoxMenuItemDocumentStructure.setSelected(true);
4328            }
4329        }
4330        else
4331        {
4332            DockingManager.close(viewDocumentStructure);
4333        }
4334        getProperties().put("panelDocumentStructure", ""+jCheckBoxMenuItemDocumentStructure.isSelected());
4335        this.saveiReportConfiguration();
4336    }//GEN-LAST:event_jCheckBoxMenuItemDocumentStructureActionPerformed1
4337

4338    private void jMenuViewStateChanged(javax.swing.event.ChangeEvent JavaDoc evt) {//GEN-FIRST:event_jMenuViewStateChanged
4339

4340    }//GEN-LAST:event_jMenuViewStateChanged
4341

4342    private void jMenuViewActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuViewActionPerformed
4343

4344
4345
4346    }//GEN-LAST:event_jMenuViewActionPerformed
4347

4348    private void jCheckBoxMenuItemElementPropertiesActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jCheckBoxMenuItemElementPropertiesActionPerformed1
4349
if (jCheckBoxMenuItemElementProperties.isSelected())
4350        {
4351                 Misc.dockAt(viewPropertySheet, DockingConstants.EAST_REGION, 0);
4352           // this.getDockingContainerRight().insertPanel(0, "Element properties", this.reportElementSheetPanel, true);
4353
}
4354        else
4355        {
4356           DockingManager.close(viewPropertySheet);
4357        }
4358        getProperties().put("panelElementProperties", ""+jCheckBoxMenuItemElementProperties.isSelected());
4359        this.saveiReportConfiguration();
4360    }//GEN-LAST:event_jCheckBoxMenuItemElementPropertiesActionPerformed1
4361

4362    private void jRadioButtonMenuItemPreviewXLS2ActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jRadioButtonMenuItemPreviewXLS2ActionPerformed
4363
this.setReportViewer(IREPORT_XLS2_VIEWER);
4364    }//GEN-LAST:event_jRadioButtonMenuItemPreviewXLS2ActionPerformed
4365

4366    private void jButtonLens1jButtonRun2ActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonLens1jButtonRun2ActionPerformed1
4367
JReportFrame activeFrame = this.getActiveReportFrame();
4368        if (activeFrame != null) {
4369
4370             double value = jNumberComboBoxZoom.getValue();
4371
4372             if (value > 800) value = 800;
4373             else if (value > 700) value = 700;
4374             else if (value > 600) value = 600;
4375             else if (value > 500) value = 500;
4376             else if (value > 400) value = 400;
4377             else if (value > 350) value = 350;
4378             else if (value > 300) value = 300;
4379             else if (value > 250) value = 250;
4380             else if (value > 200) value = 200;
4381             else if (value > 150) value = 150;
4382             else if (value > 100) value = 100;
4383             else if (value > 50) value = 50;
4384
4385             jNumberComboBoxZoom.setValue(value);
4386        }
4387    }//GEN-LAST:event_jButtonLens1jButtonRun2ActionPerformed1
4388

4389    private void jButtonRun2ActionPerformed1(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonRun2ActionPerformed1
4390

4391        JReportFrame activeFrame = this.getActiveReportFrame();
4392        if (activeFrame != null) {
4393
4394             double value = jNumberComboBoxZoom.getValue();
4395
4396             if (value < 50) value = 50;
4397             else if (value < 100) value = 100;
4398             else if (value < 150) value = 150;
4399             else if (value < 200) value = 200;
4400             else if (value < 250) value = 250;
4401             else if (value < 300) value = 300;
4402             else if (value < 350) value = 350;
4403             else if (value < 400) value = 400;
4404             else if (value < 500) value = 500;
4405             else if (value < 600) value = 600;
4406             else if (value < 700) value = 700;
4407             else value = 800;
4408
4409             jNumberComboBoxZoom.setValue(value);
4410        }
4411
4412    }//GEN-LAST:event_jButtonRun2ActionPerformed1
4413

4414    private void jToggleButtonCrosstabToolItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_jToggleButtonCrosstabToolItemStateChanged
4415
if (evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
4416                if (jMDIDesktopPane.getSelectedFrame() != null &&
4417                jMDIDesktopPane.getSelectedFrame() instanceof JReportFrame) {
4418                    JReportFrame jrf = (JReportFrame)jMDIDesktopPane.getSelectedFrame();
4419                    jrf.setNewObjectType( ReportElementType.CROSSTAB_ELEMENT);
4420                    jrf.setLensMode(false);
4421                }
4422                setActiveTool(jToggleButtonCrosstabTool);
4423            }
4424    }//GEN-LAST:event_jToggleButtonCrosstabToolItemStateChanged
4425

4426    private void jToggleButtonCrosstabToolActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jToggleButtonCrosstabToolActionPerformed
4427
jToggleButtonCrosstabTool.setSelected(true);
4428    }//GEN-LAST:event_jToggleButtonCrosstabToolActionPerformed
4429

4430    private void jMenuItemStylesActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemStylesActionPerformed
4431
JReportFrame activeFrame = this.getActiveReportFrame();
4432        if (activeFrame != null) {
4433
4434             StylesDialog sdd = new StylesDialog( this, true);
4435             sdd.setVisible(true);
4436
4437        }
4438    }//GEN-LAST:event_jMenuItemStylesActionPerformed
4439

4440    private void jMenuItemSubDatasetActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemSubDatasetActionPerformed
4441

4442         JReportFrame activeFrame = this.getActiveReportFrame();
4443        if (activeFrame != null) {
4444
4445             SubDatasetsDialog sdd = new SubDatasetsDialog( this, true);
4446             sdd.setVisible(true);
4447        }
4448    }//GEN-LAST:event_jMenuItemSubDatasetActionPerformed
4449

4450    private void jToggleButtonFrameToolItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_jToggleButtonFrameToolItemStateChanged
4451
if (evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
4452            if (jMDIDesktopPane.getSelectedFrame() != null &&
4453            jMDIDesktopPane.getSelectedFrame() instanceof JReportFrame) {
4454                JReportFrame jrf = (JReportFrame)jMDIDesktopPane.getSelectedFrame();
4455                jrf.setNewObjectType( ReportElementType.FRAME_ELEMENT);
4456                jrf.setLensMode(false);
4457            }
4458            setActiveTool(jToggleButtonFrameTool);
4459        }
4460    }//GEN-LAST:event_jToggleButtonFrameToolItemStateChanged
4461

4462    private void jToggleButtonFrameToolActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jToggleButtonFrameToolActionPerformed
4463
jToggleButtonFrameTool.setSelected(true);
4464    }//GEN-LAST:event_jToggleButtonFrameToolActionPerformed
4465

4466    private void jMenuItemMaxRecordsActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemMaxRecordsActionPerformed
4467

4468
4469        it.businesslogic.ireport.gui.MaxRecordsDialog fd = new it.businesslogic.ireport.gui.MaxRecordsDialog(this,true);
4470        try {
4471        fd.setMaxRecords( Integer.parseInt( this.getProperties().getProperty("maxRecords", "0") ));
4472        } catch (Exception JavaDoc ex) {}
4473
4474        fd.setVisible(true);
4475
4476        if (fd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION)
4477        {
4478            int maxRecords = fd.getMaxRecords();
4479
4480            this.getProperties().setProperty("maxRecords", ""+maxRecords);
4481            saveiReportConfiguration();
4482            updateJMenuItemReportMaxRecords();
4483        }
4484
4485    }//GEN-LAST:event_jMenuItemMaxRecordsActionPerformed
4486

4487    private void jMenuBuildActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuBuildActionPerformed
4488
// TODO add your handling code here:
4489
}//GEN-LAST:event_jMenuBuildActionPerformed
4490

4491    private void jRadioButtonMenuItemPreviewRTFActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jRadioButtonMenuItemPreviewRTFActionPerformed
4492
this.setReportViewer(IREPORT_RTF_VIEWER);
4493    }//GEN-LAST:event_jRadioButtonMenuItemPreviewRTFActionPerformed
4494

4495    private void jRadioButtonMenuItemPreviewTXTJRActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jRadioButtonMenuItemPreviewTXTJRActionPerformed
4496
this.setReportViewer(IREPORT_TXT_JR_VIEWER);
4497    }//GEN-LAST:event_jRadioButtonMenuItemPreviewTXTJRActionPerformed
4498

4499    private void jCheckBoxMenuItemIgnorePaginationActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jCheckBoxMenuItemIgnorePaginationActionPerformed
4500

4501        getProperties().put("IgnorePagination", ""+jCheckBoxMenuItemIgnorePagination.isSelected());
4502        this.saveiReportConfiguration();
4503
4504    }//GEN-LAST:event_jCheckBoxMenuItemIgnorePaginationActionPerformed
4505

4506    private void jCheckBoxMenuItemReportVirtualizerActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jCheckBoxMenuItemReportVirtualizerActionPerformed
4507

4508        getProperties().put("ReportVirtualizer", ""+jCheckBoxMenuItemReportVirtualizer.isSelected());
4509        this.saveiReportConfiguration();
4510
4511    }//GEN-LAST:event_jCheckBoxMenuItemReportVirtualizerActionPerformed
4512

4513    private void jMenuItemPrintActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemPrintActionPerformed
4514

4515
4516        JReportFrame activeFrame = this.getActiveReportFrame();
4517        if (activeFrame != null) {
4518
4519                java.awt.Image JavaDoc img = activeFrame.getImage();
4520                HashMap hm = new HashMap();
4521                hm.put("report", activeFrame.getReport());
4522                hm.put("design_img",img);
4523                try {
4524                    net.sf.jasperreports.engine.JasperReport jr = net.sf.jasperreports.engine.JasperCompileManager.compileReport(getClass().getClassLoader().getResourceAsStream("it/businesslogic/ireport/res/ireport_design.jrxml"));
4525                    net.sf.jasperreports.engine.JasperPrint print = net.sf.jasperreports.engine.JasperFillManager.fillReport(jr,hm,new net.sf.jasperreports.engine.JREmptyDataSource());
4526                    net.sf.jasperreports.view.JasperViewer jasperViewer = new net.sf.jasperreports.view.JasperViewer(print,false);
4527                    jasperViewer.setTitle("iReport JasperViewer");
4528                    jasperViewer.setVisible(true);
4529                } catch (Exception JavaDoc ex)
4530                {
4531                    ex.printStackTrace();
4532                }
4533        }
4534
4535    }//GEN-LAST:event_jMenuItemPrintActionPerformed
4536

4537    private void jMenuItemRightSideActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemRightSideActionPerformed
4538

4539        /*
4540        if (jSplitPaneHelp.getDividerSize() == 0)
4541        {
4542
4543            jSplitPaneHelp.setDividerSize(6);
4544            jSplitPaneHelp.setDividerLocation( jSplitPaneHelp.getWidth()-8-rightColumnWidth );
4545            dockingContainerRight.setSize(400,10);
4546            dockingContainerRight.setVisible(true);
4547        }
4548        else
4549        {
4550            rightColumnWidth = dockingContainerRight.getWidth();
4551            jSplitPaneHelp.setDividerSize(0);
4552            dockingContainerRight.setVisible(false);
4553        }
4554         */

4555
4556    }//GEN-LAST:event_jMenuItemRightSideActionPerformed
4557

4558    private void jMenuAlignActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuAlignActionPerformed
4559
// TODO add your handling code here:
4560
}//GEN-LAST:event_jMenuAlignActionPerformed
4561

4562    private void jMenuItemSaveAllFromListActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemSaveAllFromListActionPerformed
4563
jMenuItemSaveAllActionPerformed( evt );
4564    }//GEN-LAST:event_jMenuItemSaveAllFromListActionPerformed
4565

4566    private void jMenuItemSaveAsFromListActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemSaveAsFromListActionPerformed
4567

4568        JReportFrame jrf = getSelectedJRFFromFilesTree();
4569        if (jrf != null) {
4570            saveAs( jrf );
4571        }
4572
4573    }//GEN-LAST:event_jMenuItemSaveAsFromListActionPerformed
4574

4575    protected void jMenuItemSaveFromListActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemSaveFromListActionPerformed
4576

4577        JReportFrame jrf = getSelectedJRFFromFilesTree();
4578        if (jrf != null) {
4579            save( jrf );
4580        }
4581    }//GEN-LAST:event_jMenuItemSaveFromListActionPerformed
4582

4583    private void jMenuItemRevertToSavedActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemRevertToSavedActionPerformed
4584

4585        JReportFrame activeFrame = this.getActiveReportFrame();
4586        if (activeFrame != null) {
4587                        //
4588
try {
4589                            if (activeFrame.getReport().getFilename() != null && new File(activeFrame.getReport().getFilename()).exists() )
4590                            {
4591                                String JavaDoc filename = activeFrame.getReport().getFilename();
4592                                activeFrame.getReport().setReportChanges(0);
4593                                jMDIMenuBar.closeFrame( activeFrame, true);
4594                                openFile(filename);
4595                            }
4596                        } catch (Exception JavaDoc ex)
4597                        {};
4598                        //dtn.getJrf().updateUI();
4599
//jMDIDesktopPane.internalFrameActivated(dtn.getJrf());
4600
//this.logOnConsole("Activated :"+dtn.getJrf().getReport().getFilename()+"\n");
4601
}
4602    }//GEN-LAST:event_jMenuItemRevertToSavedActionPerformed
4603

4604    private void jMenuItemRevertToSavedFromListActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemRevertToSavedFromListActionPerformed
4605

4606        JReportFrame jrf = getSelectedJRFFromFilesTree();
4607        if (jrf != null && jrf.getReport().getFilename() != null && new File(jrf.getReport().getFilename()).exists())
4608        {
4609            String JavaDoc filename = jrf.getReport().getFilename();
4610            jrf.getReport().setReportChanges(0);
4611            jMDIMenuBar.closeFrame( jrf, true);
4612            openFile(filename);
4613        }
4614
4615
4616    }//GEN-LAST:event_jMenuItemRevertToSavedFromListActionPerformed
4617

4618    private void jMenuItemCloseAllExceptThisFromListActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemCloseAllExceptThisFromListActionPerformed
4619

4620        if (this.getActiveReportFrame() == null) return;
4621        JInternalFrame activeF = this.getActiveReportFrame();
4622
4623        JReportFrame jrf = getSelectedJRFFromFilesTree();
4624
4625        if (jrf != null) {
4626            //
4627
try {
4628                activeF = jrf;
4629            } catch (Exception JavaDoc ex)
4630            {};
4631            //dtn.getJrf().updateUI();
4632
//jMDIDesktopPane.internalFrameActivated(dtn.getJrf());
4633
//this.logOnConsole("Activated :"+dtn.getJrf().getReport().getFilename()+"\n");
4634
}
4635
4636
4637        JInternalFrame[] frames = this.jMDIDesktopPane.getAllFrames();
4638        for (int i=0; i<frames.length; ++i)
4639        {
4640            if (frames[i] != activeF)
4641            {
4642                jMDIMenuBar.closeFrame( frames[i] );
4643            }
4644        }
4645
4646    }//GEN-LAST:event_jMenuItemCloseAllExceptThisFromListActionPerformed
4647

4648    private void jMenuItemCloseAllFromListActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemCloseAllFromListActionPerformed
4649
jMenuItemCloseAllActionPerformed( evt );
4650    }//GEN-LAST:event_jMenuItemCloseAllFromListActionPerformed
4651

4652    private void jMenuItemCloseFromListActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemCloseFromListActionPerformed
4653

4654        JReportFrame jrf = getSelectedJRFFromFilesTree();
4655
4656        if (jrf != null) {
4657            //
4658
try {
4659                jMDIMenuBar.closeFrame(jrf );
4660            } catch (Exception JavaDoc ex)
4661            {};
4662            //dtn.getJrf().updateUI();
4663
//jMDIDesktopPane.internalFrameActivated(dtn.getJrf());
4664
//this.logOnConsole("Activated :"+dtn.getJrf().getReport().getFilename()+"\n");
4665
}
4666
4667    }//GEN-LAST:event_jMenuItemCloseFromListActionPerformed
4668

4669    private void jMenuItemCloseAllExceptThisActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemCloseAllExceptThisActionPerformed
4670

4671        if (this.getActiveReportFrame() == null) return;
4672        JInternalFrame activeF = this.getActiveReportFrame();
4673        JInternalFrame[] frames = this.jMDIDesktopPane.getAllFrames();
4674        for (int i=0; i<frames.length; ++i)
4675        {
4676            if (frames[i] != activeF)
4677            {
4678                jMDIMenuBar.closeFrame( frames[i] );
4679            }
4680        }
4681    }//GEN-LAST:event_jMenuItemCloseAllExceptThisActionPerformed
4682

4683    private void jMenuItemCloseAllActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemCloseAllActionPerformed
4684

4685        JInternalFrame[] frames = jMDIDesktopPane.getAllFrames();
4686        for (int i=0; i<frames.length; ++i)
4687        {
4688            if (frames[i] instanceof JReportFrame)
4689            {
4690                jMDIMenuBar.closeFrame( frames[i]);
4691            }
4692        }
4693
4694
4695    }//GEN-LAST:event_jMenuItemCloseAllActionPerformed
4696

4697    private void jMenuItemCloseActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemCloseActionPerformed
4698

4699        jMDIMenuBar.closeFrame( this.getActiveReportFrame() );
4700
4701    }//GEN-LAST:event_jMenuItemCloseActionPerformed
4702

4703    private void jMenuItemExportOptionsActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemExportOptionsActionPerformed
4704
it.businesslogic.ireport.gui.export.ExportPreferencesDialog epf = new it.businesslogic.ireport.gui.export.ExportPreferencesDialog(this, true);
4705        epf.setVisible(true);
4706
4707    }//GEN-LAST:event_jMenuItemExportOptionsActionPerformed
4708

4709    private void jMenuItemClasspathActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemClasspathActionPerformed
4710

4711        ClassPathDialog cpd = new ClassPathDialog(this, true);
4712        cpd.setClasspath( getClasspath() );
4713        cpd.setVisible(true);
4714        if (cpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION )
4715        {
4716            setClasspath( cpd.getClasspath() );
4717        }
4718
4719    }//GEN-LAST:event_jMenuItemClasspathActionPerformed
4720

4721    private void jMenuItemCompileActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemCompileActionPerformed
4722

4723        jButtonCompilerActionPerformed( evt );
4724
4725    }//GEN-LAST:event_jMenuItemCompileActionPerformed
4726

4727    private void jMenuItemCompileItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemCompileItemStateChanged
4728
// TODO add your handling code here:
4729
}//GEN-LAST:event_jMenuItemCompileItemStateChanged
4730

4731    private void jMenuItemRemoveMarginsActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemRemoveMarginsActionPerformed
4732

4733        JReportFrame jrf = (JReportFrame)jMDIDesktopPane.getSelectedFrame();
4734
4735        if (jrf == null) return;
4736
4737        UndoOperation uo = new RemoveMarginsOperation(jrf,
4738                        jrf.getReport().getTopMargin(),
4739                        jrf.getReport().getBottomMargin(),
4740                        jrf.getReport().getLeftMargin(),
4741                        jrf.getReport().getRightMargin());
4742        uo.redo();
4743
4744        jrf.addUndoOperation( uo );
4745    }//GEN-LAST:event_jMenuItemRemoveMarginsActionPerformed
4746

4747    private void jMenuItemReportLocaleActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemReportLocaleActionPerformed
4748

4749        it.businesslogic.ireport.gui.locale.NewLocaleFileDialog fd = new it.businesslogic.ireport.gui.locale.NewLocaleFileDialog(this,true);
4750        fd.setVisible(true);
4751
4752        if (fd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION)
4753        {
4754            String JavaDoc reportLocale = fd.getText();
4755            this.getProperties().setProperty("reportLocale", reportLocale);
4756            saveiReportConfiguration();
4757
4758            Locale loc = Misc.getLocaleFromString(reportLocale);
4759        updateJMenuItemReportLocaleText();
4760        }
4761
4762
4763    }//GEN-LAST:event_jMenuItemReportLocaleActionPerformed
4764

4765    public void updateJMenuItemReportLocaleText()
4766    {
4767        Locale loc = Misc.getLocaleFromString( this.getProperties().getProperty("reportLocale"));
4768        jMenuItemReportLocale.setText(it.businesslogic.ireport.util.I18n.getString("setReportLocale", "Set report locale -" ) + " " + loc.getDisplayName() );
4769    }
4770    public void updateJMenuItemReportTimeZone()
4771    {
4772        String JavaDoc s = this.getProperties().getProperty("reportTimeZoneId");
4773        String JavaDoc timezoneName = "default";
4774        if (s != null && s.length() > 0)
4775        {
4776            try {
4777                TimeZone tz = TimeZone.getTimeZone(s);
4778                timezoneName = new TimeZoneWrapper( tz ) + "";
4779            } catch (Exception JavaDoc ex)
4780            {
4781
4782            }
4783        }
4784
4785        jMenuItemReportTimeZone.setText(it.businesslogic.ireport.util.I18n.getString("setReportTimeZone", "Set report time zone -" ) + " " + timezoneName);
4786    }
4787
4788
4789
4790    public void updateJMenuItemReportMaxRecords()
4791    {
4792        int maxRecords = 0;
4793        try {
4794            maxRecords = Integer.parseInt( this.getProperties().getProperty("maxRecords","0"));
4795        } catch (Exception JavaDoc ex)
4796        { }
4797        
4798        if (maxRecords > 0)
4799        {
4800            jMenuItemMaxRecords.setText(it.businesslogic.ireport.util.I18n.getFormattedString("maxRecords", "Max records ({0,number})", new Object JavaDoc[]{new Integer JavaDoc(maxRecords)}) );
4801        }
4802        else
4803        {
4804            jMenuItemMaxRecords.setText(it.businesslogic.ireport.util.I18n.getString("maxRecordsNotSet", "maxRecordsNotSet") );
4805        }
4806    }
4807
4808
4809    private void jCheckBoxMenuItemEMMActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jCheckBoxMenuItemEMMActionPerformed
4810

4811        getProperties().put("EMM", ""+jCheckBoxMenuItemEMM.isSelected());
4812            this.saveiReportConfiguration();
4813
4814    }//GEN-LAST:event_jCheckBoxMenuItemEMMActionPerformed
4815

4816    private void jMenuItemHelpActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemHelpActionPerformed
4817

4818        openUrl("http://jasperforge.org/sf/wiki/do/viewPage/projects.ireport/wiki/HomePage" );
4819
4820    }//GEN-LAST:event_jMenuItemHelpActionPerformed
4821

4822    public void openUrl(String JavaDoc url)
4823    {
4824        Misc.openURL(url);
4825        /*
4826        String operatingSystem = System.getProperty("os.name");
4827
4828
4829            try {
4830                 if (operatingSystem.toLowerCase().indexOf("windows") > -1)
4831                 {
4832                        Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
4833                 }
4834                 else
4835                 {
4836                        // Try with htmlview...
4837                        Runtime.getRuntime().exec("htmlview " + url + " &");
4838                 }
4839            } catch (Exception ex)
4840            {
4841                javax.swing.JOptionPane.showMessageDialog( this,"Unable to open " + url, "", javax.swing.JOptionPane.ERROR_MESSAGE);
4842            }
4843         */

4844    }
4845
4846    private void jListThreadsMouseClicked(java.awt.event.MouseEvent JavaDoc evt) {//GEN-FIRST:event_jListThreadsMouseClicked
4847
if (evt.getButton() == evt.BUTTON3) {
4848
4849            this.jPopupMenuThreads.show(jListThreads, evt.getPoint().x, evt.getPoint().y);
4850        }
4851    }//GEN-LAST:event_jListThreadsMouseClicked
4852

4853    private void jMenuItemKillActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemKillActionPerformed
4854

4855        Object JavaDoc obj = this.jListThreads.getSelectedValue();
4856        if (obj != null)
4857        {
4858            IReportCompiler ic = (IReportCompiler)obj;
4859            ic.stopThread();
4860        }
4861
4862    }//GEN-LAST:event_jMenuItemKillActionPerformed
4863

4864    private void jMenuLocaleFilesActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuLocaleFilesActionPerformed
4865
this.getLocaleFilesDialog().setVisible(true);
4866    }//GEN-LAST:event_jMenuLocaleFilesActionPerformed
4867

4868    private void jMenuItemReportImportsActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemReportImportsActionPerformed
4869
JReportFrame jrf = (JReportFrame)jMDIDesktopPane.getSelectedFrame();
4870
4871       ReportImportsDialog rsd = new ReportImportsDialog(this, true);
4872       rsd.setJReportFrame( jrf );
4873       rsd.setVisible(true);
4874
4875
4876    }//GEN-LAST:event_jMenuItemReportImportsActionPerformed
4877

4878    private void jButtonAlignBottomActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonAlignBottomActionPerformed
4879
setElementsValue("setVerticalAlign", "Bottom");
4880    }//GEN-LAST:event_jButtonAlignBottomActionPerformed
4881

4882    private void jButtonAlignMiddleActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonAlignMiddleActionPerformed
4883
setElementsValue("setVerticalAlign", "Middle");
4884    }//GEN-LAST:event_jButtonAlignMiddleActionPerformed
4885

4886    private void jButtonAlignTopActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonAlignTopActionPerformed
4887
setElementsValue("setVerticalAlign", "Top");
4888    }//GEN-LAST:event_jButtonAlignTopActionPerformed
4889

4890    private void jButtonFormatCenterVActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonFormatCenterVActionPerformed
4891
jMenuItemAlignVerticalAxisActionPerformed(evt);
4892    }//GEN-LAST:event_jButtonFormatCenterVActionPerformed
4893

4894    private void jButtonFormatCenterHActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonFormatCenterHActionPerformed
4895
jMenuItemAlignHorizontalAxisActionPerformed(evt);
4896    }//GEN-LAST:event_jButtonFormatCenterHActionPerformed
4897

4898    private void jButtonStrikethroughtActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonStrikethroughtActionPerformed
4899
JReportFrame jrf = (JReportFrame)jMDIDesktopPane.getSelectedFrame();
4900        if (jrf == null) return;
4901        // Set the new value for all selected elements...
4902
boolean bool = false;
4903        Enumeration e = jrf.getSelectedElements().elements();
4904        while (e.hasMoreElements()) {
4905            ReportElement repele = (ReportElement)e.nextElement();
4906            if (repele instanceof TextReportElement)
4907            {
4908                TextReportElement element = (TextReportElement)repele;
4909                bool = ((TextReportElement)repele).isStrikeTrought();
4910                break;
4911            }
4912        }
4913
4914        setElementsValue("setStrikeTrought", new Boolean JavaDoc(!bool), Boolean.TYPE);
4915        //this.getElementPropertiesDialog().updateSelection();
4916
}//GEN-LAST:event_jButtonStrikethroughtActionPerformed
4917

4918    private void jButtonUnderlineActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonUnderlineActionPerformed
4919

4920        JReportFrame jrf = (JReportFrame)jMDIDesktopPane.getSelectedFrame();
4921        if (jrf == null) return;
4922        // Set the new value for all selected elements...
4923
boolean bool = false;
4924        Enumeration e = jrf.getSelectedElements().elements();
4925        while (e.hasMoreElements()) {
4926            ReportElement repele = (ReportElement)e.nextElement();
4927            if (repele instanceof TextReportElement)
4928            {
4929                TextReportElement element = (TextReportElement)repele;
4930                bool = ((TextReportElement)repele).isUnderline();
4931                break;
4932            }
4933        }
4934
4935        setElementsValue("setUnderline", new Boolean JavaDoc(!bool), Boolean.TYPE);
4936        //this.getElementPropertiesDialog().updateSelection();
4937
}//GEN-LAST:event_jButtonUnderlineActionPerformed
4938

4939    private void jButtonItalicActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonItalicActionPerformed
4940
JReportFrame jrf = (JReportFrame)jMDIDesktopPane.getSelectedFrame();
4941        if (jrf == null) return;
4942        // Set the new value for all selected elements...
4943
boolean bool = false;
4944        Enumeration e = jrf.getSelectedElements().elements();
4945        while (e.hasMoreElements()) {
4946            ReportElement repele = (ReportElement)e.nextElement();
4947            if (repele instanceof TextReportElement)
4948            {
4949                TextReportElement element = (TextReportElement)repele;
4950                bool = ((TextReportElement)repele).isItalic();
4951                break;
4952            }
4953        }
4954
4955        setElementsValue("setItalic", new Boolean JavaDoc(!bool), Boolean.TYPE);
4956        //this.getElementPropertiesDialog().updateSelection();
4957
}//GEN-LAST:event_jButtonItalicActionPerformed
4958

4959    private void jButtonBoldActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonBoldActionPerformed
4960

4961        JReportFrame jrf = (JReportFrame)jMDIDesktopPane.getSelectedFrame();
4962        if (jrf == null) return;
4963        // Set the new value for all selected elements...
4964
boolean bool = false;
4965        Enumeration e = jrf.getSelectedElements().elements();
4966        while (e.hasMoreElements()) {
4967            ReportElement repele = (ReportElement)e.nextElement();
4968            if (repele instanceof TextReportElement)
4969            {
4970                TextReportElement element = (TextReportElement)repele;
4971                bool = ((TextReportElement)repele).isBold();
4972                break;
4973            }
4974        }
4975
4976        setElementsValue("setBold", new Boolean JavaDoc(!bool), Boolean.TYPE);
4977        //this.getElementPropertiesDialog().updateSelection();
4978
}//GEN-LAST:event_jButtonBoldActionPerformed
4979

4980    private void jButtonDecreaseSizeActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonDecreaseSizeActionPerformed
4981
setElementsValue("modifyFontSize", new Integer JavaDoc(-2), Integer.TYPE);
4982        //this.getElementPropertiesDialog().updateSelection();
4983
}//GEN-LAST:event_jButtonDecreaseSizeActionPerformed
4984

4985    private void jButtonIncreaseSizeActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonIncreaseSizeActionPerformed
4986

4987       setElementsValue("modifyFontSize", new Integer JavaDoc(2), Integer.TYPE);
4988
4989    }//GEN-LAST:event_jButtonIncreaseSizeActionPerformed
4990

4991    private void jComboBoxFontItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_jComboBoxFontItemStateChanged
4992
if (!this.isDontHandleEvent() && jComboBoxFont.getSelectedItem() != null)
4993        {
4994            setElementsValue("setFontName", ""+ jComboBoxFont.getSelectedItem());
4995        }
4996    }//GEN-LAST:event_jComboBoxFontItemStateChanged
4997

4998    private void jNumberComboBoxSizeItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_jNumberComboBoxSizeItemStateChanged
4999
if (!this.isDontHandleEvent())
5000        {
5001            setElementsValue("setFontSize", new Integer JavaDoc((int)jNumberComboBoxSize.getValue()), Integer.TYPE);
5002            //this.getElementPropertiesDialog().updateSelection();
5003
}
5004    }//GEN-LAST:event_jNumberComboBoxSizeItemStateChanged
5005

5006    private void jNumberComboBoxSizeActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jNumberComboBoxSizeActionPerformed
5007
if (!this.isDontHandleEvent())
5008        {
5009            setElementsValue("setFontSize", new Integer JavaDoc((int)jNumberComboBoxSize.getValue()), Integer.TYPE);
5010        }
5011    }//GEN-LAST:event_jNumberComboBoxSizeActionPerformed
5012

5013    private void jCheckBoxMenuItemElementsFormattingActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jCheckBoxMenuItemElementsFormattingActionPerformed
5014
jToolBarFormat.setVisible( jCheckBoxMenuItemElementsFormatting.isSelected());
5015        getProperties().put("toolbarFormattingVisible", ""+jCheckBoxMenuItemElementsFormatting.isSelected());
5016        this.saveiReportConfiguration();
5017    }//GEN-LAST:event_jCheckBoxMenuItemElementsFormattingActionPerformed
5018

5019    private void jCheckBoxMenuItemTextFormattingActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jCheckBoxMenuItemTextFormattingActionPerformed
5020
jToolBarText.setVisible( jCheckBoxMenuItemTextFormatting.isSelected());
5021        getProperties().put("toolbarTextVisible", ""+jCheckBoxMenuItemTextFormatting.isSelected());
5022        this.saveiReportConfiguration();
5023    }//GEN-LAST:event_jCheckBoxMenuItemTextFormattingActionPerformed
5024

5025    private void jButtonAlignRightActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonAlignRightActionPerformed
5026
setElementsValue("setAlign", "Right");
5027    }//GEN-LAST:event_jButtonAlignRightActionPerformed
5028

5029    private void jButtonAlignCenterActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonAlignCenterActionPerformed
5030
setElementsValue("setAlign", "Center");
5031    }//GEN-LAST:event_jButtonAlignCenterActionPerformed
5032

5033    private void jButtonAlignJustifyActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonAlignJustifyActionPerformed
5034
setElementsValue("setAlign", "Justified");
5035    }//GEN-LAST:event_jButtonAlignJustifyActionPerformed
5036

5037    private void jButtonAlignLeftActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonAlignLeftActionPerformed
5038
setElementsValue("setAlign", "Left");
5039    }//GEN-LAST:event_jButtonAlignLeftActionPerformed
5040

5041    public void jMenuItemOrganizeActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemOrganizeActionPerformed
5042
FormatCommand.getCommand( OperationType.ORGANIZE_AS_A_TABLE ).execute();
5043    }//GEN-LAST:event_jMenuItemOrganizeActionPerformed
5044

5045    public void jMenuItemLeftMarginActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemLeftMarginActionPerformed
5046
FormatCommand.getCommand( OperationType.ALIGN_TO_LEFT_MARGIN).execute();
5047    }//GEN-LAST:event_jMenuItemLeftMarginActionPerformed
5048

5049    public void jMenuItemRightMarginActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemRightMarginActionPerformed
5050
FormatCommand.getCommand( OperationType.ALIGN_TO_RIGHT_MARGIN).execute();
5051    }//GEN-LAST:event_jMenuItemRightMarginActionPerformed
5052

5053    private void jNumberComboBoxZoomActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jNumberComboBoxZoomActionPerformed
5054
//System.out.println( "Zoom: " + jNumberComboBoxZoom.getValue());
5055
}//GEN-LAST:event_jNumberComboBoxZoomActionPerformed
5056

5057    private void jMenuItemPluginConfigActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemPluginConfigActionPerformed
5058
getPluginConfigurationDialog().setVisible(true);
5059    }//GEN-LAST:event_jMenuItemPluginConfigActionPerformed
5060

5061    private void jScrollPaneFilesMousePressed(java.awt.event.MouseEvent JavaDoc evt) {//GEN-FIRST:event_jScrollPaneFilesMousePressed
5062

5063    }//GEN-LAST:event_jScrollPaneFilesMousePressed
5064

5065    private void jTreeFilesMousePressed(java.awt.event.MouseEvent JavaDoc evt) {//GEN-FIRST:event_jTreeFilesMousePressed
5066
if (evt.getButton() == evt.BUTTON3) {
5067            jTreeFiles.setSelectionPath( jTreeFiles.getPathForLocation(evt.getX(), evt.getY() ) );
5068            if (jTreeFiles.getSelectionCount() > 0) {
5069                    this.jPopupMenuFiles.show(jTreeFiles, evt.getPoint().x, evt.getPoint().y);
5070                }
5071        }
5072    }//GEN-LAST:event_jTreeFilesMousePressed
5073

5074    private void jRadioButtonMenuItemPreviewTXTActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jRadioButtonMenuItemPreviewTXTActionPerformed
5075
this.setReportViewer(IREPORT_TXT_VIEWER);
5076    }//GEN-LAST:event_jRadioButtonMenuItemPreviewTXTActionPerformed
5077

5078    private void jToggleButtonBarcodeToolItemStateChanged(java.awt.event.ItemEvent JavaDoc evt) {//GEN-FIRST:event_jToggleButtonBarcodeToolItemStateChanged
5079
if (evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) {
5080                if (jMDIDesktopPane.getSelectedFrame() != null &&
5081                jMDIDesktopPane.getSelectedFrame() instanceof JReportFrame) {
5082                    JReportFrame jrf = (JReportFrame)jMDIDesktopPane.getSelectedFrame();
5083                    jrf.setNewObjectType( ReportElementType.BARCODE_ELEMENT);
5084                    jrf.setLensMode(false);
5085                }
5086                setActiveTool(jToggleButtonBarcodeTool);
5087            }
5088    }//GEN-LAST:event_jToggleButtonBarcodeToolItemStateChanged
5089

5090    private void jToggleButtonBarcodeToolActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jToggleButtonBarcodeToolActionPerformed
5091
jToggleButtonBarcodeTool.setSelected(true);
5092    }//GEN-LAST:event_jToggleButtonBarcodeToolActionPerformed
5093

5094    private void jMenuItemChartActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemChartActionPerformed
5095
jToggleButtonChartToolItemStateChanged(new java.awt.event.ItemEvent JavaDoc(jToggleButtonChartTool,0,jToggleButtonChartTool, java.awt.event.ItemEvent.SELECTED));
5096    }//GEN-LAST:event_jMenuItemChartActionPerformed
5097

5098    private void jMenuItemImageActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemImageActionPerformed
5099
jToggleButtonImageToolItemStateChanged(new java.awt.event.ItemEvent JavaDoc(jToggleButtonImageTool,0,jToggleButtonImageTool, java.awt.event.ItemEvent.SELECTED));
5100    }//GEN-LAST:event_jMenuItemImageActionPerformed
5101

5102    private void jToggleButtonChartToolActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jToggleButtonChartToolActionPerformed
5103
jToggleButtonChartTool.setSelected(true);
5104    }//GEN-LAST:event_jToggleButtonChartToolActionPerformed
5105

5106    private void jMenuItemScriptletEditorActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemScriptletEditorActionPerformed
5107
if (jMDIDesktopPane.getSelectedFrame() != null &&
5108        jMDIDesktopPane.getSelectedFrame() instanceof JReportFrame) {
5109            JReportFrame jrf = (JReportFrame)jMDIDesktopPane.getSelectedFrame();
5110
5111            if (jrf == null || jrf.getReport().getScriptletHandling() != Report.SCRIPTLET_IREPORT_INTERNAL_HANDLING ) {
5112                if (JOptionPane.showConfirmDialog(this,
5113                I18n.getString("messages.scriptletEditor","To use the scriptlet editor, you must leave iReport to handle the scriptlet class code internally.\n"+
5114                "You can set how handle scriptlet in report properties form.\n\nDo you want activate this option now?"),
5115                I18n.getString("messages.scriptletEditorTitle","Scriptlet editor"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE) != JOptionPane.OK_OPTION) {
5116                    return;
5117                }
5118
5119                jrf.getReport().setScriptletHandling( Report.SCRIPTLET_IREPORT_INTERNAL_HANDLING );
5120            }
5121
5122            this.getEventsForm().setVisible(true);
5123            this.getEventsForm().setJReportFrame( jrf );
5124        }
5125    }//GEN-LAST:event_jMenuItemScriptletEditorActionPerformed
5126

5127    private void jMenuItemPropertiesActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemPropertiesActionPerformed
5128

5129        if (jMDIDesktopPane.getSelectedFrame() != null &&
5130        jMDIDesktopPane.getSelectedFrame() instanceof JReportFrame) {
5131            JReportFrame jrf = (JReportFrame)jMDIDesktopPane.getSelectedFrame();
5132            PropertiesDialog pd = new PropertiesDialog(this, true);
5133            pd.setDataset( jrf.getReport() );
5134            pd.updateProperties();
5135
5136            pd.setVisible(true);
5137        }
5138    }//GEN-LAST:event_jMenuItemPropertiesActionPerformed
5139

5140   private void jRadioButtonMenuItemPreviewCSVActionPerformed(java.awt.event.ActionEvent JavaDoc evt)//GEN-FIRST:event_jRadioButtonMenuItemPreviewCSVActionPerformed
5141
{//GEN-HEADEREND:event_jRadioButtonMenuItemPreviewCSVActionPerformed
5142
this.setReportViewer(IREPORT_CSV_VIEWER);
5143   }//GEN-LAST:event_jRadioButtonMenuItemPreviewCSVActionPerformed
5144

5145   private void jRadioButtonMenuItemPreviewXLSActionPerformed(java.awt.event.ActionEvent JavaDoc evt)//GEN-FIRST:event_jRadioButtonMenuItemPreviewXLSActionPerformed
5146
{//GEN-HEADEREND:event_jRadioButtonMenuItemPreviewXLSActionPerformed
5147
this.setReportViewer(IREPORT_XLS_VIEWER);
5148   }//GEN-LAST:event_jRadioButtonMenuItemPreviewXLSActionPerformed
5149

5150   private void jRadioButtonMenuItemPreviewJAVAActionPerformed(java.awt.event.ActionEvent JavaDoc evt)//GEN-FIRST:event_jRadioButtonMenuItemPreviewJAVAActionPerformed
5151
{//GEN-HEADEREND:event_jRadioButtonMenuItemPreviewJAVAActionPerformed
5152
this.setReportViewer(IREPORT_JAVA_VIEWER);
5153   }//GEN-LAST:event_jRadioButtonMenuItemPreviewJAVAActionPerformed
5154

5155   private void jRadioButtonMenuItemPreviewHTMLActionPerformed(java.awt.event.ActionEvent JavaDoc evt)//GEN-FIRST:event_jRadioButtonMenuItemPreviewHTMLActionPerformed
5156
{//GEN-HEADEREND:event_jRadioButtonMenuItemPreviewHTMLActionPerformed
5157
this.setReportViewer(IREPORT_HTML_VIEWER);
5158   }//GEN-LAST:event_jRadioButtonMenuItemPreviewHTMLActionPerformed
5159

5160   private void jMenuItemQuitActionPerformed(java.awt.event.ActionEvent JavaDoc evt)//GEN-FIRST:event_jMenuItemQuitActionPerformed
5161
{//GEN-HEADEREND:event_jMenuItemQuitActionPerformed
5162
this.closeApplication();
5163   }//GEN-LAST:event_jMenuItemQuitActionPerformed
5164

5165   public void paint(java.awt.Graphics JavaDoc g)
5166   {
5167       try {
5168                   super.paint(g);
5169        } catch (Throwable JavaDoc ex)
5170        {
5171            ex.printStackTrace();
5172        }
5173   }
5174
5175    private void formWindowActivated(java.awt.event.WindowEvent JavaDoc evt) {//GEN-FIRST:event_formWindowActivated
5176
// Checking for documents update outside iReport...
5177

5178        if (!catchFormActivated) return;
5179
5180
5181        SwingUtilities.invokeLater(new Runnable JavaDoc() {
5182            public void run() {
5183                try {
5184                    MainFrame.this.run();
5185                } catch (Throwable JavaDoc ex)
5186                {
5187                    ex.printStackTrace();
5188                }
5189            }
5190          } );
5191// if (checkModifiedFielsThread == null || !checkModifiedFielsThread.isAlive()) {
5192
// checkModifiedFielsThread= new Thread( this );
5193
//
5194
// checkModifiedFielsThread.start();
5195
//run();
5196
// }
5197
}//GEN-LAST:event_formWindowActivated
5198

5199
5200    public void openFiles(java.util.List JavaDoc fileList)
5201    {
5202            java.util.Iterator JavaDoc iterator = fileList.iterator();
5203            while (iterator.hasNext())
5204            {
5205              java.io.File JavaDoc file = (java.io.File JavaDoc)iterator.next();
5206              if (file.getName().toLowerCase().endsWith(".jrxml") ||
5207                  file.getName().toLowerCase().endsWith(".jasper"))
5208              {
5209                openFile(file);
5210              }
5211            }
5212    }
5213
5214    public JReportFrame openFile(String JavaDoc filename){
5215
5216        return openFile(new File(filename));
5217    }
5218
5219    public JReportFrame openFile(File file){
5220
5221        JReportFrame reportFrame;
5222        reportFrame = findReportFrameByFile(file);
5223
5224
5225        if( reportFrame == null ){
5226            try {
5227                Report report = new Report(file.getPath());
5228                report.setUsingMultiLineExpressions( false ); //this.isUsingMultiLineExpressions());
5229
reportFrame = openNewReportWindow( report );
5230                report.addReportDocumentStatusChangedListener( this );
5231                setActiveReportForm(reportFrame);
5232            } catch (Exception JavaDoc e ) {
5233                e.printStackTrace();
5234                logOnConsole( e.getMessage() + "\n" );
5235            }
5236
5237        } else {
5238
5239            try {
5240            setActiveReportForm(reportFrame);
5241            } catch (Exception JavaDoc ex)
5242            {
5243                ex.printStackTrace();
5244            }
5245        }
5246
5247
5248        return reportFrame;
5249    }
5250
5251    /**
5252     * openFromStream
5253     * opens a new Report from an InputStream
5254     *
5255     * Author: Felix Firgau
5256     *
5257     * @param inputStream InputStream
5258     * @return JReportFrame
5259     */

5260    public JReportFrame openFromStream(java.io.InputStream JavaDoc inputStream)
5261    {
5262        try {
5263            JReportFrame reportFrame ;
5264            Report report = new Report () ;
5265            ReportReader rr = new ReportReader ( report ) ;
5266            rr.readFromStream ( inputStream ) ;
5267
5268            report.setUsingMultiLineExpressions ( false ) ; //this.isUsingMultiLineExpressions());
5269
reportFrame = openNewReportWindow ( report ) ;
5270            report.addReportDocumentStatusChangedListener ( this ) ;
5271            setActiveReportForm ( reportFrame ) ;
5272
5273            return reportFrame;
5274        }
5275        catch ( IOException ex ) {
5276            ex.printStackTrace();
5277        }
5278        return null;
5279    }
5280
5281    /**
5282     * Test if the passed string is empty.
5283     * @param str
5284     * @return Returns true if empty.
5285     */

5286    private boolean isEmptyString(String JavaDoc str){
5287        return (str == null || str.trim().length() == 0);
5288    }
5289
5290    /**
5291     * Search for a opened file in the iReport Designer.
5292     *
5293     * @param file File to search.
5294     * @return The JReportFrame.
5295     */

5296    private JReportFrame findReportFrameByFile(File fileToSearch){
5297
5298        if(fileToSearch != null){
5299
5300            javax.swing.JInternalFrame JavaDoc[] frames = jMDIDesktopPane.getAllFrames();
5301            JReportFrame jrf;
5302            String JavaDoc frameFilename;
5303
5304            for (int i=0; i< frames.length; ++i) {
5305                if (frames[i] instanceof JReportFrame) {
5306                    jrf = (JReportFrame)frames[i];
5307
5308                    frameFilename = jrf.getReport().getFilename();
5309                    if (!isEmptyString(frameFilename) && fileToSearch.equals(new File(frameFilename))) {
5310                        return jrf;
5311                    }
5312                }
5313            }
5314        }
5315
5316        return null;
5317    }
5318
5319    /**
5320     * Search for a opened file in the iReport Designer.
5321     *
5322     * @param filename Filename to find.
5323     * @return The JReportFrame.
5324     */

5325    private JReportFrame findReportFrameByFilename(String JavaDoc filename){
5326
5327        if(!isEmptyString(filename)){
5328            return findReportFrameByFile(new File(filename));
5329        }
5330
5331        return null;
5332    }
5333
5334
5335    public void checkForModifiedFiles() {
5336
5337
5338        javax.swing.JInternalFrame JavaDoc[] frames = jMDIDesktopPane.getAllFrames();
5339        String JavaDoc filename;
5340        JReportFrame jrf;
5341        long time;
5342        Report report;
5343        int res;
5344
5345        try {
5346        for (int i=0; i< frames.length; ++i) {
5347
5348            if (frames[i] instanceof JReportFrame) {
5349
5350                jrf = (JReportFrame)frames[i];
5351                filename = jrf.getReport().getFilename();
5352
5353                if ( !isEmptyString(filename) ) {
5354
5355                    time = Misc.getLastWriteTime(filename);
5356
5357                    if (jrf.getReport().getLoadTime() < time ) {
5358
5359                        //System.out.println("Trovato: "+filename);
5360
res = javax.swing.JOptionPane.CANCEL_OPTION;
5361
5362                        if (getProperties().getProperty("AutoReload","false").equals("true"))
5363                        {
5364                            res = javax.swing.JOptionPane.OK_OPTION;
5365                        }
5366                        else
5367                        {
5368                            res = javax.swing.JOptionPane.showConfirmDialog(this,
5369                                    I18n.getFormattedString("messages.fileModifiedOutsideIReport",
5370                                    "{0} \n\nThis file has been modified outside iReport.Do you want reload it?", new Object JavaDoc[]{filename}),
5371                                    "iReport",javax.swing.JOptionPane.INFORMATION_MESSAGE);
5372                        }
5373
5374                        if (res == javax.swing.JOptionPane.OK_OPTION) {
5375
5376                            //setCurrentZoomFactor( jrf.getZoomFactor() );
5377
int positionInList = 0;
5378                            DefaultMutableTreeNode root = (DefaultMutableTreeNode)this.jTreeFiles.getModel().getRoot();
5379                            for (positionInList=0; positionInList<root.getChildCount(); ++positionInList)
5380                            {
5381                                DefaultMutableTreeNode documentEntryNode = (DefaultMutableTreeNode)root.getChildAt(positionInList);
5382                                DocumentTreeEntry dte = (DocumentTreeEntry)documentEntryNode.getUserObject();
5383                                if (dte.getJrf() == jrf)
5384                                {
5385                                    break;
5386                                }
5387                            }
5388
5389                            jrf.setDefaultCloseOperation( jrf.DISPOSE_ON_CLOSE );
5390                            jrf.doDefaultCloseAction();
5391                            openFile(filename);
5392
5393
5394                            if (positionInList < root.getChildCount()-1)
5395                            {
5396                                // Move the last entry to the correct position...
5397
DefaultMutableTreeNode documentEntryNode = (DefaultMutableTreeNode)root.getChildAt( root.getChildCount()-1 );
5398                                root.remove(documentEntryNode);
5399                                root.insert(documentEntryNode, positionInList);
5400                                jTreeFiles.updateUI();
5401                            }
5402                            //setCurrentZoomFactor( 1.0 ); //reset
5403

5404                        } else
5405                        {
5406                            jrf.getReport().setLoadTime(time);
5407                        }
5408                    }else if (time < 0) //File removed!
5409
{
5410                            //jrf.getReport().setLoadTime( new java.util.Date().getTime() );
5411
jrf.getReport().incrementReportChanges();
5412                    }
5413                }
5414            }
5415        }
5416        } catch (Throwable JavaDoc ex)
5417        {
5418            ex.printStackTrace();
5419        }
5420
5421    }
5422
5423    /**
5424     *Used to determine if a save all is required.
5425     */

5426    public boolean isSaveAllRequired() {
5427        boolean ret = false;
5428        javax.swing.JInternalFrame JavaDoc[] frames = jMDIDesktopPane.getAllFrames();
5429        for (int i=0; i< frames.length; ++i) {
5430            if (frames[i] instanceof JReportFrame) {
5431                JReportFrame jrf = (JReportFrame)frames[i];
5432                Report checkMe = jrf.getReport();
5433                if( checkMe == null ) {
5434                    ret = ( ret || false );
5435                }
5436                else {
5437                    ret = ( ret || checkMe.isModified() );
5438                }
5439            }//end if instance of JReportFrame
5440
}//end for frames
5441
return ret;
5442    }//end isSaveAllRequired
5443

5444    private void jMenuItemXMLSourceActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemXMLSourceActionPerformed
5445
if (jMDIDesktopPane.getSelectedFrame() != null &&
5446        jMDIDesktopPane.getSelectedFrame() instanceof JReportFrame) {
5447            JReportFrame jrf = (JReportFrame)jMDIDesktopPane.getSelectedFrame();
5448            if (jrf.getReport().getFilename() == null ||
5449            jrf.getReport().getFilename().equals("")) {
5450                int res = javax.swing.JOptionPane.showConfirmDialog(this,
5451                        I18n.getString("messages.mustSaveFile",
5452                        "You must save your file before editing it with an external editor!\nSave it now ?"),"",javax.swing.JOptionPane.INFORMATION_MESSAGE);
5453                if (res == javax.swing.JOptionPane.OK_OPTION) {
5454                    jMenuItemSaveActionPerformed(evt);
5455                }
5456                else
5457                    return;
5458            }
5459            else {
5460                int res = javax.swing.JOptionPane.OK_OPTION;
5461                if (jrf.getReport().isModified())
5462                {
5463                    res = javax.swing.JOptionPane.showConfirmDialog(this,
5464                            I18n.getString("messages.fileModifiedLaunchingEditor",
5465                            "The document has been modified!\nWould you like to save it before launching the external editor?"),"",javax.swing.JOptionPane.INFORMATION_MESSAGE);
5466                }
5467                if (res == javax.swing.JOptionPane.OK_OPTION) {
5468                    jMenuItemSaveActionPerformed(evt);
5469                }
5470            }
5471            if (jrf.getReport().getFilename() == null ||
5472            jrf.getReport().getFilename().equals("")) return;
5473
5474            Runtime JavaDoc rt = Runtime.getRuntime();
5475            String JavaDoc editor = "notepad.exe";
5476            try {
5477                if (this.getProperties().getProperty("ExternalEditor")!=null)
5478                    editor = (String JavaDoc)this.getProperties().getProperty("ExternalEditor");
5479                if (editor == null || editor.equals("")) {
5480                    
5481                    
5482                    this.logOnConsole(I18n.getString("messages.useNotepad", "Using notepad.exe as default editor!\n"),false);
5483                    editor = "notepad.exe";
5484                }
5485
5486                // WRONG ON UNIX: rt.exec(editor+ " \"" +jrf.getReport().getFilename()+"\"");
5487
// String tokenizer wasn't parsing the command and arguments
5488
// properly, so pass them in as separate elements.
5489
rt.exec(new String JavaDoc[] { editor, jrf.getReport().getFilename() });
5490            } catch (Exception JavaDoc ex) {
5491                
5492                javax.swing.JOptionPane.showMessageDialog(this,
5493                        I18n.getFormattedString("messages.errorExecutingEditor",
5494                        "An exception is occured executing:\n{0} \"{1}\"",new Object JavaDoc[]{editor,jrf.getReport().getFilename()}) ,"",javax.swing.JOptionPane.ERROR_MESSAGE);
5495            }
5496        }
5497    }//GEN-LAST:event_jMenuItemXMLSourceActionPerformed
5498

5499    public void jMenuItemVSRemoveActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemVSRemoveActionPerformed
5500
//formatMenuPerformed( OperationType.REMOVE_SPACE_V);
5501
FormatCommand.getCommand(OperationType.REMOVE_SPACE_V ).execute();
5502    }//GEN-LAST:event_jMenuItemVSRemoveActionPerformed
5503

5504    public void jMenuItemVSDecreaseActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemVSDecreaseActionPerformed
5505
FormatCommand.getCommand(OperationType.DECREASE_SPACE_V).execute();
5506    }//GEN-LAST:event_jMenuItemVSDecreaseActionPerformed
5507

5508    public void jMenuItemVSMakeEqualActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemVSMakeEqualActionPerformed
5509
FormatCommand.getCommand(OperationType.EQUALS_SPACE_V).execute();
5510    }//GEN-LAST:event_jMenuItemVSMakeEqualActionPerformed
5511

5512    public void jMenuItemHSRemoveActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jMenuItemHSRemoveActionPerformed
5513
FormatCommand.get