KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > it > businesslogic > ireport > chart > gui > ChartPropertiesDialog


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  * ChartPropertiesDialog.java
28  *
29  * Created on 15 agosto 2005, 10.19
30  *
31  */

32
33 package it.businesslogic.ireport.chart.gui;
34 import it.businesslogic.ireport.chart.Axis;
35 import it.businesslogic.ireport.gui.JRLinkParameterDialog;
36 import it.businesslogic.ireport.gui.MainFrame;
37 import it.businesslogic.ireport.gui.sheet.*;
38 import it.businesslogic.ireport.chart.*;
39 import it.businesslogic.ireport.*;
40 import it.businesslogic.ireport.gui.JRSubreportParameterDialog;
41 import it.businesslogic.ireport.gui.JReportFrame;
42 import it.businesslogic.ireport.gui.event.SheetPropertyValueChangedEvent;
43 import it.businesslogic.ireport.gui.event.SheetPropertyValueChangedListener;
44 import javax.swing.DefaultListSelectionModel JavaDoc;
45 import javax.swing.JOptionPane JavaDoc;
46 import it.businesslogic.ireport.util.Misc;
47 import java.awt.Color JavaDoc;
48 import java.awt.Component JavaDoc;
49 import java.util.Vector JavaDoc;
50 import javax.swing.border.TitledBorder JavaDoc;
51 import javax.swing.event.CellEditorListener JavaDoc;
52 import javax.swing.event.ChangeEvent JavaDoc;
53 import javax.swing.event.ListSelectionEvent JavaDoc;
54 import javax.swing.event.ListSelectionListener JavaDoc;
55 import javax.swing.table.DefaultTableModel JavaDoc;
56 import javax.swing.table.TableColumn JavaDoc;
57 import it.businesslogic.ireport.util.I18n;
58 /**
59  *
60  * @author Administrator
61  */

62 public class ChartPropertiesDialog extends javax.swing.JDialog JavaDoc implements SheetPropertyValueChangedListener {
63     
64     private CategorySheetPanel sheetPanel = null;
65     private ChartReportElement2 currentSelectedChartElement = null;
66     private int dialogResult = javax.swing.JOptionPane.OK_OPTION;
67     private JReportFrame jReportFrame = null;
68     private boolean init = false;
69        
70     public void setChartElement(ChartReportElement2 chartReportElement)
71     {
72         setInit(true);
73         
74         try {
75             
76         currentSelectedChartElement = chartReportElement;
77
78         jButtonPaste.setEnabled( it.businesslogic.ireport.gui.MainFrame.getMainInstance().getChartDatasetClipBoard() != null ) ;
79         
80         if (currentSelectedChartElement == null)
81         {
82             // We have to clean all the gui....
83
sheetPanel.removeAllProperties();
84             jComboBoxTypeOfData.removeAllItems();
85             jPanelDataDefinition.removeAll();
86         }
87         else
88         {
89             updateGroups();
90             updateSubDatasets();
91             // Case by case...
92
addCommonChartProperties();
93             
94             while (jTabbedPane1.getTabCount() > 1) jTabbedPane1.remove(1);
95             if (currentSelectedChartElement.getChart() instanceof MultiAxisChart)
96             {
97                 jTabbedPane1.add("Multiaxis charts", jPanelMultiAxis );
98                 jTabbedPane1.setTitleAt(1, it.businesslogic.ireport.util.I18n.getString("gui.ChartPropertiesDialog.TabChartMultiaxis","Chart Multiaxis"));
99             
100                 DefaultTableModel JavaDoc dtm = (DefaultTableModel JavaDoc)jTable1.getModel();
101                 dtm.setRowCount(0);
102                 
103                 java.util.List JavaDoc axes = ((MultiAxisPlot)currentSelectedChartElement.getChart().getPlot() ).getAxis();
104                 for (int i=0; i<axes.size(); ++i)
105                 {
106                     Axis axis = (Axis)axes.get(i);
107                     dtm.addRow(new Object JavaDoc[]{ axis, axis.getPosition() });
108                 }
109             
110             }
111             else
112             {
113                 jTabbedPane1.add("Chart data", jPanelData );
114                 jTabbedPane1.setTitleAt(1, it.businesslogic.ireport.util.I18n.getString("gui.ChartPropertiesDialog.TabChartData","Chart data"));
115                 
116                 // Set general dataset data...
117
Misc.setComboboxSelectedTagValue(jComboBoxIncrementType, currentSelectedChartElement.getChart().getDataset().getIncrementType());
118                 jComboBoxIncrementGroup.setSelectedItem( currentSelectedChartElement.getChart().getDataset().getIncrementGroup() );
119                 Misc.setComboboxSelectedTagValue(jComboBoxResetType, currentSelectedChartElement.getChart().getDataset().getResetType());
120                 jComboBoxResetGroup.setSelectedItem( currentSelectedChartElement.getChart().getDataset().getResetGroup() );
121                 jRTextExpressionAreaFilterExpression.setText( currentSelectedChartElement.getChart().getDataset().getIncrementWhenExpression() );
122
123                 if (currentSelectedChartElement.getChart().getDataset().getSubDataset() != null)
124                 {
125                     jComboBoxSubDataset.setSelectedItem(currentSelectedChartElement.getChart().getDataset().getSubDataset());
126                     jTabbedPaneSubDataset.setVisible(true);
127
128                     jRTextExpressionAreaMapExpression.setText( currentSelectedChartElement.getChart().getDataset().getParametersMapExpression() );
129                     if (!currentSelectedChartElement.getChart().getDataset().isUseConnection() && Misc.nvl( currentSelectedChartElement.getChart().getDataset().getDataSourceExpression(),"").trim().equals("")) {
130                         this.jComboBoxDatasetConnectionType.setSelectedIndex(0);
131                         this.jRTextExpressionAreaTextConnectionExpression.setEnabled(false);
132                         this.jRTextExpressionAreaTextConnectionExpression.setBackground(Color.LIGHT_GRAY);
133                         this.jRTextExpressionAreaTextConnectionExpression.setText("");
134                     }
135                     else if (currentSelectedChartElement.getChart().getDataset().isUseConnection()) {
136                         this.jComboBoxDatasetConnectionType.setSelectedIndex(1);
137                         this.jRTextExpressionAreaTextConnectionExpression.setEnabled(true);
138                         this.jRTextExpressionAreaTextConnectionExpression.setBackground(Color.WHITE);
139                         this.jRTextExpressionAreaTextConnectionExpression.setText( currentSelectedChartElement.getChart().getDataset().getConnectionExpression());
140                     }
141                     else {
142                         this.jComboBoxDatasetConnectionType.setSelectedIndex(2);
143                         this.jRTextExpressionAreaTextConnectionExpression.setEnabled(true);
144                         this.jRTextExpressionAreaTextConnectionExpression.setBackground(Color.WHITE);
145                         this.jRTextExpressionAreaTextConnectionExpression.setText( currentSelectedChartElement.getChart().getDataset().getDataSourceExpression());
146                     }
147
148                     //Add parameters...
149
javax.swing.table.DefaultTableModel JavaDoc dtm = (javax.swing.table.DefaultTableModel JavaDoc)jTableDatasetParameters.getModel();
150                     dtm.setRowCount(0);
151
152                     java.util.Enumeration JavaDoc enum_parameters = currentSelectedChartElement.getChart().getDataset().getSubreportParameters().elements();
153                     while (enum_parameters.hasMoreElements()) {
154                         it.businesslogic.ireport.JRSubreportParameter parameter = (it.businesslogic.ireport.JRSubreportParameter)enum_parameters.nextElement();
155                         Vector JavaDoc row = new Vector JavaDoc();
156                         row.addElement(parameter);
157                         row.addElement(parameter.getExpression());
158                         dtm.addRow(row);
159                     }
160
161                     jRTextExpressionAreaFilterExpression.setSubDataset(currentSelectedChartElement.getChart().getDataset().getSubDataset());
162
163                 }
164                 else
165                 {
166                     javax.swing.table.DefaultTableModel JavaDoc dtm = (javax.swing.table.DefaultTableModel JavaDoc)jTableDatasetParameters.getModel();
167                     dtm.setRowCount(0);
168                     this.jComboBoxDatasetConnectionType.setSelectedIndex(0);
169                     this.jRTextExpressionAreaTextConnectionExpression.setEnabled(false);
170                     this.jRTextExpressionAreaTextConnectionExpression.setBackground(Color.LIGHT_GRAY);
171                     this.jRTextExpressionAreaTextConnectionExpression.setText("");
172                     jRTextExpressionAreaMapExpression.setText("");
173
174                     jComboBoxSubDataset.setSelectedIndex(0);
175                     jTabbedPaneSubDataset.setVisible(false);
176                 }
177
178                 java.awt.GridBagConstraints JavaDoc gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
179                 gridBagConstraints.gridx = 4;
180                 gridBagConstraints.gridy = 2;
181                 gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
182                 gridBagConstraints.weightx = 1.0;
183                 gridBagConstraints.weighty = 1.0;
184                 gridBagConstraints.fill = gridBagConstraints.BOTH;
185                 gridBagConstraints.insets = new java.awt.Insets JavaDoc(4, 4, 4, 4);
186
187                 if (currentSelectedChartElement.getChart() instanceof PieChart ||
188                     currentSelectedChartElement.getChart() instanceof Pie3DChart)
189                 {
190                     jComboBoxTypeOfData.addItem(new Tag("it.businesslogic.ireport.chart.PieDataset", "Pie dataset"));
191                 }
192                 else if (currentSelectedChartElement.getChart() instanceof BarChart ||
193                          currentSelectedChartElement.getChart() instanceof Bar3DChart ||
194                          currentSelectedChartElement.getChart() instanceof StackedBarChart ||
195                          currentSelectedChartElement.getChart() instanceof StackedBar3DChart ||
196                          currentSelectedChartElement.getChart() instanceof LineChart ||
197                          currentSelectedChartElement.getChart() instanceof AreaChart)
198                 {
199                     jComboBoxTypeOfData.addItem(new Tag("it.businesslogic.ireport.chart.CategoryDataset", "Category dataset"));
200                 }
201                 else if (currentSelectedChartElement.getChart() instanceof XYBarChart)
202                 {
203                     jComboBoxTypeOfData.addItem(new Tag("it.businesslogic.ireport.chart.TimePeriodDataset", "Time period dataset"));
204                     jComboBoxTypeOfData.addItem(new Tag("it.businesslogic.ireport.chart.TimeSeriesDataset", "Time series dataset"));
205                     jComboBoxTypeOfData.addItem(new Tag("it.businesslogic.ireport.chart.XYDataset", "XY dataset"));
206                 }
207                 else if ( currentSelectedChartElement.getChart() instanceof XYLineChart ||
208                           currentSelectedChartElement.getChart() instanceof XYAreaChart ||
209                           currentSelectedChartElement.getChart() instanceof ScatterChart )
210                 {
211                     jComboBoxTypeOfData.addItem(new Tag("it.businesslogic.ireport.chart.XYDataset", "XY dataset"));
212                 }
213                 else if ( currentSelectedChartElement.getChart() instanceof BubbleChart )
214                 {
215                     jComboBoxTypeOfData.addItem(new Tag("it.businesslogic.ireport.chart.XYZDataset", "XYZ dataset"));
216                 }
217                 else if ( currentSelectedChartElement.getChart() instanceof TimeSeriesChart )
218                 {
219                     jComboBoxTypeOfData.addItem(new Tag("it.businesslogic.ireport.chart.TimeSeriesDataset", "Time series dataset"));
220                 }
221                 else if ( currentSelectedChartElement.getChart() instanceof HighLowChart ||
222                           currentSelectedChartElement.getChart() instanceof CandlestickChart)
223                 {
224                     jComboBoxTypeOfData.addItem(new Tag("it.businesslogic.ireport.chart.HighLowDataset", "High low dataset"));
225                 }
226                 else if ( currentSelectedChartElement.getChart() instanceof MeterChart ||
227                           currentSelectedChartElement.getChart() instanceof ThermometerChart)
228                 {
229                     jComboBoxTypeOfData.addItem(new Tag("it.businesslogic.ireport.chart.ValueDataset", "Value dataset"));
230                 }
231
232                 setDatasetPanel( currentSelectedChartElement.getChart().getDataset() );
233             }
234             
235             setPlotSheetProperties( currentSelectedChartElement.getChart().getPlot() );
236         
237         }
238         
239         sheetPanel.setShowResetButton(false);
240         sheetPanel.recreateSheet();
241         
242         } catch (Exception JavaDoc ex)
243         {
244             ex.printStackTrace();
245         }
246         setInit(false);
247     }
248          
249     /** Creates new dialog ChartPropertiesDialog */
250     public ChartPropertiesDialog(java.awt.Dialog JavaDoc parent, boolean modal) {
251         super(parent,modal);
252         initAll();
253     }
254      
255     /** Creates new dialog ChartPropertiesDialog */
256     public ChartPropertiesDialog(java.awt.Frame JavaDoc parent, boolean modal) {
257         super(parent,modal);
258         initAll();
259     }
260      
261     public void initAll()
262     {
263         initComponents();
264         
265         
266         java.awt.GridBagConstraints JavaDoc gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
267         gridBagConstraints.gridx = 4;
268         gridBagConstraints.gridy = 2;
269         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
270         gridBagConstraints.weightx = 1.0;
271         gridBagConstraints.weighty = 1.0;
272         gridBagConstraints.fill = gridBagConstraints.BOTH;
273         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, -1, -1, -1);
274         sheetPanel = new CategorySheetPanel();
275         sheetPanel.addSheetPropertyValueChangedListener(this);
276         
277         jPanelProperties.add(sheetPanel, gridBagConstraints);
278         
279         Vector JavaDoc values = new Vector JavaDoc();
280         values.add( new Tag("leftOrTop", it.businesslogic.ireport.util.I18n.getString("leftOrTop","Left or top")));
281         values.add( new Tag("rightOrBottom", it.businesslogic.ireport.util.I18n.getString("rightOrBottom","Right or bottom")));
282         TableColumn JavaDoc col = jTable1.getColumnModel().getColumn(1);
283         jTable1.setRowHeight(21);
284         TagComboCellEditor comboEditor = new TagComboCellEditor(values);
285         col.setCellEditor(comboEditor);
286         col.setCellRenderer(new TagComboBoxRenderer(values));
287         comboEditor.addCellEditorListener( new CellEditorListener JavaDoc()
288             {
289                 public void editingCanceled(ChangeEvent JavaDoc e)
290                 {
291
292                 }
293
294                 public void editingStopped(ChangeEvent JavaDoc e)
295                 {
296                     jTable1editingStopped(e);
297                 }
298             });
299         
300         applyI18n();
301         
302         this.jComboBoxResetType.addItem(new Tag("None",it.businesslogic.ireport.util.I18n.getString("resetType.None","None")));
303         this.jComboBoxResetType.addItem(new Tag("Report",it.businesslogic.ireport.util.I18n.getString("resetType.Report","Report")));
304         this.jComboBoxResetType.addItem(new Tag("Page",it.businesslogic.ireport.util.I18n.getString("resetType.Page","Page")));
305         this.jComboBoxResetType.addItem(new Tag("Column",it.businesslogic.ireport.util.I18n.getString("resetType.Column","Column")));
306         this.jComboBoxResetType.addItem(new Tag("Group",it.businesslogic.ireport.util.I18n.getString("resetType.Group","Group")));
307
308         this.jComboBoxIncrementType.addItem(new Tag("None",it.businesslogic.ireport.util.I18n.getString("incrementType.None","None")));
309         this.jComboBoxIncrementType.addItem(new Tag("Report",it.businesslogic.ireport.util.I18n.getString("incrementType.Report","Report")));
310         this.jComboBoxIncrementType.addItem(new Tag("Page",it.businesslogic.ireport.util.I18n.getString("incrementType.Page","Page")));
311         this.jComboBoxIncrementType.addItem(new Tag("Column",it.businesslogic.ireport.util.I18n.getString("incrementType.Column","Column")));
312         this.jComboBoxIncrementType.addItem(new Tag("Group",it.businesslogic.ireport.util.I18n.getString("incrementType.Group","Group")));
313          
314         jComboBoxDatasetConnectionType.addItem(new Tag("Don't use connection or datasource",it.businesslogic.ireport.util.I18n.getString("ConnectionType.1","Don't use connection or datasource")));
315         jComboBoxDatasetConnectionType.addItem(new Tag("Use connection expression",it.businesslogic.ireport.util.I18n.getString("ConnectionType.2","Use connection expression")));
316         jComboBoxDatasetConnectionType.addItem(new Tag("Use datasource expression",it.businesslogic.ireport.util.I18n.getString("ConnectionType.3","Use datasource expression")));
317         
318         this.jRTextExpressionAreaMapExpression.getDocument().addDocumentListener( new javax.swing.event.DocumentListener JavaDoc() {
319             public void changedUpdate(javax.swing.event.DocumentEvent JavaDoc evt) {
320                 jRTextExpressionAreaMapExpressionTextChanged();
321             }
322             public void insertUpdate(javax.swing.event.DocumentEvent JavaDoc evt) {
323                 jRTextExpressionAreaMapExpressionTextChanged();
324             }
325             public void removeUpdate(javax.swing.event.DocumentEvent JavaDoc evt) {
326                 jRTextExpressionAreaMapExpressionTextChanged();
327             }
328         });
329         
330         this.jRTextExpressionAreaFilterExpression.getDocument().addDocumentListener( new javax.swing.event.DocumentListener JavaDoc() {
331             public void changedUpdate(javax.swing.event.DocumentEvent JavaDoc evt) {
332                 jRTextExpressionAreaFilterExpressionTextChanged();
333             }
334             public void insertUpdate(javax.swing.event.DocumentEvent JavaDoc evt) {
335                 jRTextExpressionAreaFilterExpressionTextChanged();
336             }
337             public void removeUpdate(javax.swing.event.DocumentEvent JavaDoc evt) {
338                 jRTextExpressionAreaFilterExpressionTextChanged();
339             }
340         });
341         
342         this.jRTextExpressionAreaTextConnectionExpression.getDocument().addDocumentListener( new javax.swing.event.DocumentListener JavaDoc() {
343             public void changedUpdate(javax.swing.event.DocumentEvent JavaDoc evt) {
344                 jRTextExpressionAreaTextConnectionExpressionTextChanged();
345             }
346             public void insertUpdate(javax.swing.event.DocumentEvent JavaDoc evt) {
347                 jRTextExpressionAreaTextConnectionExpressionTextChanged();
348             }
349             public void removeUpdate(javax.swing.event.DocumentEvent JavaDoc evt) {
350                 jRTextExpressionAreaTextConnectionExpressionTextChanged();
351             }
352         });
353         
354         javax.swing.DefaultListSelectionModel JavaDoc dlsm = (javax.swing.DefaultListSelectionModel JavaDoc)this.jTableDatasetParameters.getSelectionModel();
355         dlsm.addListSelectionListener(new javax.swing.event.ListSelectionListener JavaDoc() {
356             public void valueChanged(javax.swing.event.ListSelectionEvent JavaDoc e) {
357                 jTableDatasetParametersListSelectionValueChanged(e);
358             }
359         });
360         
361         
362         jTable1.getSelectionModel().addListSelectionListener( new ListSelectionListener JavaDoc()
363             {
364                 public void valueChanged(ListSelectionEvent JavaDoc e)
365                 {
366                     jTable1ValueChanged(e);
367                 }
368             });
369         
370         this.pack();
371         it.businesslogic.ireport.util.Misc.centerFrame(this);
372         
373         javax.swing.KeyStroke JavaDoc escape = javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0, false);
374         javax.swing.Action JavaDoc escapeAction = new javax.swing.AbstractAction JavaDoc() {
375             public void actionPerformed(java.awt.event.ActionEvent JavaDoc e) {
376                 jButtonCloseActionPerformed(e);
377             }
378         };
379        
380         getRootPane().getInputMap(javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW).put(escape, "ESCAPE");
381         getRootPane().getActionMap().put("ESCAPE", escapeAction);
382
383         
384         //to make the default button ...
385
this.getRootPane().setDefaultButton(this.jButtonClose);
386     }
387     
388     private void jTable1ValueChanged(javax.swing.event.ListSelectionEvent JavaDoc evt) {
389
390         
391         if (jTable1.getSelectedRowCount() > 0)
392         {
393             jButtonDelete.setEnabled(true);
394             jButtonModify.setEnabled(true);
395             jButtonMoveUp.setEnabled(jTable1.getSelectedRow() > 0);
396             jButtonMoveDown.setEnabled(jTable1.getSelectedRow() < jTable1.getRowCount()-1);
397         }
398         else
399         {
400             jButtonModify.setEnabled(false);
401             jButtonDelete.setEnabled(false);
402             jButtonMoveUp.setEnabled(false);
403             jButtonMoveDown.setEnabled(false);
404         }
405     
406     }
407     
408     public void jRTextExpressionAreaMapExpressionTextChanged() {
409         if (this.isInit()) return;
410         if (currentSelectedChartElement != null)
411         {
412             currentSelectedChartElement.getChart().getDataset().setParametersMapExpression(""+jRTextExpressionAreaMapExpression.getText());
413         }
414     }
415     
416     public void jRTextExpressionAreaFilterExpressionTextChanged() {
417         if (this.isInit()) return;
418         if (currentSelectedChartElement != null)
419         {
420             currentSelectedChartElement.getChart().getDataset().setIncrementWhenExpression(""+jRTextExpressionAreaFilterExpression.getText());
421         }
422     }
423
424     public void jRTextExpressionAreaTextConnectionExpressionTextChanged() {
425         if (this.isInit()) return;
426         if (currentSelectedChartElement != null)
427         {
428             if (currentSelectedChartElement.getChart().getDataset().isUseConnection())
429                 currentSelectedChartElement.getChart().getDataset().setConnectionExpression(""+jRTextExpressionAreaTextConnectionExpression.getText());
430             else
431                 currentSelectedChartElement.getChart().getDataset().setDataSourceExpression(""+jRTextExpressionAreaTextConnectionExpression.getText());
432         }
433     }
434     
435     public void jTableDatasetParametersListSelectionValueChanged(javax.swing.event.ListSelectionEvent JavaDoc e) {
436         if (this.jTableDatasetParameters.getSelectedRowCount() > 0) {
437             this.jButtonModParameter.setEnabled(true);
438             this.jButtonRemParameter.setEnabled(true);
439         }
440         else {
441             this.jButtonModParameter.setEnabled(false);
442             this.jButtonRemParameter.setEnabled(false);
443         }
444     }
445     
446     
447     /** This method is called from within the constructor to
448      * initialize the form.
449      * WARNING: Do NOT modify this code. The content of this method is
450      * always regenerated by the Form Editor.
451      */

452     // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
453
private void initComponents() {
454         java.awt.GridBagConstraints JavaDoc gridBagConstraints;
455
456         jTabbedPane1 = new javax.swing.JTabbedPane JavaDoc();
457         jPanelProperties = new javax.swing.JPanel JavaDoc();
458         jPanelData = new javax.swing.JPanel JavaDoc();
459         jLabelTypeOfData = new javax.swing.JLabel JavaDoc();
460         jComboBoxTypeOfData = new javax.swing.JComboBox JavaDoc();
461         jTabbedPaneData = new javax.swing.JTabbedPane JavaDoc();
462         jPanelDataset = new javax.swing.JPanel JavaDoc();
463         jLabelResetType = new javax.swing.JLabel JavaDoc();
464         jComboBoxResetType = new javax.swing.JComboBox JavaDoc();
465         jLabelResetGroup = new javax.swing.JLabel JavaDoc();
466         jComboBoxResetGroup = new javax.swing.JComboBox JavaDoc();
467         jLabelIncrementType = new javax.swing.JLabel JavaDoc();
468         jComboBoxIncrementType = new javax.swing.JComboBox JavaDoc();
469         jLabelIncrementGroup = new javax.swing.JLabel JavaDoc();
470         jComboBoxIncrementGroup = new javax.swing.JComboBox JavaDoc();
471         jLabelIncrementType2 = new javax.swing.JLabel JavaDoc();
472         jPanel1 = new javax.swing.JPanel JavaDoc();
473         jLabelIncrementType1 = new javax.swing.JLabel JavaDoc();
474         jComboBoxSubDataset = new javax.swing.JComboBox JavaDoc();
475         jPanel7 = new javax.swing.JPanel JavaDoc();
476         jTabbedPaneSubDataset = new javax.swing.JTabbedPane JavaDoc();
477         jPanel4 = new javax.swing.JPanel JavaDoc();
478         jPanel16 = new javax.swing.JPanel JavaDoc();
479         jScrollPane2 = new javax.swing.JScrollPane JavaDoc();
480         jTableDatasetParameters = new javax.swing.JTable JavaDoc();
481         jPanel10 = new javax.swing.JPanel JavaDoc();
482         jButtonAddParameter = new javax.swing.JButton JavaDoc();
483         jButtonModParameter = new javax.swing.JButton JavaDoc();
484         jButtonRemParameter = new javax.swing.JButton JavaDoc();
485         jPanel5 = new javax.swing.JPanel JavaDoc();
486         jLabel26 = new javax.swing.JLabel JavaDoc();
487         jRTextExpressionAreaMapExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea();
488         jPanel6 = new javax.swing.JPanel JavaDoc();
489         jLabel41 = new javax.swing.JLabel JavaDoc();
490         jComboBoxDatasetConnectionType = new javax.swing.JComboBox JavaDoc();
491         jRTextExpressionAreaTextConnectionExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea();
492         jPanel2 = new javax.swing.JPanel JavaDoc();
493         jButtonCopy = new javax.swing.JButton JavaDoc();
494         jButtonPaste = new javax.swing.JButton JavaDoc();
495         jPanel3 = new javax.swing.JPanel JavaDoc();
496         jRTextExpressionAreaFilterExpression = new it.businesslogic.ireport.gui.JRTextExpressionArea();
497         jPanelDataDefinition = new javax.swing.JPanel JavaDoc();
498         jPanelMultiAxis = new javax.swing.JPanel JavaDoc();
499         jScrollPane1 = new javax.swing.JScrollPane JavaDoc();
500         jTable1 = new javax.swing.JTable JavaDoc();
501         jPanel9 = new javax.swing.JPanel JavaDoc();
502         jButtonAdd = new javax.swing.JButton JavaDoc();
503         jButtonModify = new javax.swing.JButton JavaDoc();
504         jButtonDelete = new javax.swing.JButton JavaDoc();
505         jButtonMoveUp = new javax.swing.JButton JavaDoc();
506         jButtonMoveDown = new javax.swing.JButton JavaDoc();
507         jPanel8 = new javax.swing.JPanel JavaDoc();
508         jButtonClose = new javax.swing.JButton JavaDoc();
509
510         setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
511         setTitle("Chart details");
512         addWindowListener(new java.awt.event.WindowAdapter JavaDoc() {
513             public void windowClosing(java.awt.event.WindowEvent JavaDoc evt) {
514                 formWindowClosing(evt);
515             }
516         });
517
518         jTabbedPane1.setMinimumSize(new java.awt.Dimension JavaDoc(450, 454));
519         jTabbedPane1.setPreferredSize(new java.awt.Dimension JavaDoc(450, 500));
520         jPanelProperties.setLayout(new java.awt.GridBagLayout JavaDoc());
521
522         jTabbedPane1.addTab("Chart properties", jPanelProperties);
523
524         jPanelData.setLayout(new java.awt.GridBagLayout JavaDoc());
525
526         jLabelTypeOfData.setText("Type of dataset");
527         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
528         gridBagConstraints.insets = new java.awt.Insets JavaDoc(4, 4, 4, 4);
529         jPanelData.add(jLabelTypeOfData, gridBagConstraints);
530
531         jComboBoxTypeOfData.addActionListener(new java.awt.event.ActionListener JavaDoc() {
532             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
533                 jComboBoxTypeOfDataActionPerformed(evt);
534             }
535         });
536
537         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
538         gridBagConstraints.gridx = 1;
539         gridBagConstraints.gridy = 0;
540         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
541         gridBagConstraints.weightx = 1.0;
542         gridBagConstraints.insets = new java.awt.Insets JavaDoc(4, 0, 4, 4);
543         jPanelData.add(jComboBoxTypeOfData, gridBagConstraints);
544
545         jPanelDataset.setLayout(new java.awt.GridBagLayout JavaDoc());
546
547         jLabelResetType.setText("Reset type");
548         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
549         gridBagConstraints.gridx = 0;
550         gridBagConstraints.gridy = 4;
551         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
552         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 0, 3);
553         jPanelDataset.add(jLabelResetType, gridBagConstraints);
554
555         jComboBoxResetType.addActionListener(new java.awt.event.ActionListener JavaDoc() {
556             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
557                 jComboBoxResetTypeActionPerformed(evt);
558             }
559         });
560
561         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
562         gridBagConstraints.gridx = 0;
563         gridBagConstraints.gridy = 5;
564         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
565         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
566         gridBagConstraints.weightx = 1.0;
567         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
568         jPanelDataset.add(jComboBoxResetType, gridBagConstraints);
569
570         jLabelResetGroup.setText("Reset group");
571         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
572         gridBagConstraints.gridx = 1;
573         gridBagConstraints.gridy = 4;
574         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
575         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 0, 3);
576         jPanelDataset.add(jLabelResetGroup, gridBagConstraints);
577
578         jComboBoxResetGroup.addActionListener(new java.awt.event.ActionListener JavaDoc() {
579             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
580                 jComboBoxResetGroupActionPerformed(evt);
581             }
582         });
583
584         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
585         gridBagConstraints.gridx = 1;
586         gridBagConstraints.gridy = 5;
587         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
588         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
589         gridBagConstraints.weightx = 1.0;
590         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
591         jPanelDataset.add(jComboBoxResetGroup, gridBagConstraints);
592
593         jLabelIncrementType.setText("Increment type");
594         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
595         gridBagConstraints.gridx = 0;
596         gridBagConstraints.gridy = 6;
597         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
598         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 0, 3);
599         jPanelDataset.add(jLabelIncrementType, gridBagConstraints);
600
601         jComboBoxIncrementType.addActionListener(new java.awt.event.ActionListener JavaDoc() {
602             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
603                 jComboBoxIncrementTypeActionPerformed(evt);
604             }
605         });
606
607         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
608         gridBagConstraints.gridx = 0;
609         gridBagConstraints.gridy = 7;
610         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
611         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
612         gridBagConstraints.weightx = 1.0;
613         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
614         jPanelDataset.add(jComboBoxIncrementType, gridBagConstraints);
615
616         jLabelIncrementGroup.setText("Increment group");
617         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
618         gridBagConstraints.gridx = 1;
619         gridBagConstraints.gridy = 6;
620         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
621         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 0, 3);
622         jPanelDataset.add(jLabelIncrementGroup, gridBagConstraints);
623
624         jComboBoxIncrementGroup.addActionListener(new java.awt.event.ActionListener JavaDoc() {
625             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
626                 jComboBoxIncrementGroupActionPerformed(evt);
627             }
628         });
629
630         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
631         gridBagConstraints.gridx = 1;
632         gridBagConstraints.gridy = 7;
633         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
634         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
635         gridBagConstraints.weightx = 1.0;
636         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
637         jPanelDataset.add(jComboBoxIncrementGroup, gridBagConstraints);
638
639         jLabelIncrementType2.setText("Increment When expression");
640         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
641         gridBagConstraints.gridx = 0;
642         gridBagConstraints.gridy = 8;
643         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
644         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 0, 3);
645         jPanelDataset.add(jLabelIncrementType2, gridBagConstraints);
646
647         jPanel1.setLayout(new java.awt.GridBagLayout JavaDoc());
648
649         jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Dataset run"));
650         jPanel1.setPreferredSize(new java.awt.Dimension JavaDoc(329, 192));
651         jLabelIncrementType1.setText("Sub dataset");
652         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
653         gridBagConstraints.gridx = 0;
654         gridBagConstraints.gridy = 0;
655         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
656         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 0, 3);
657         jPanel1.add(jLabelIncrementType1, gridBagConstraints);
658
659         jComboBoxSubDataset.addActionListener(new java.awt.event.ActionListener JavaDoc() {
660             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
661                 jComboBoxSubDatasetActionPerformed(evt);
662             }
663         });
664
665         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
666         gridBagConstraints.gridx = 1;
667         gridBagConstraints.gridy = 0;
668         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
669         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
670         gridBagConstraints.weightx = 1.0;
671         gridBagConstraints.insets = new java.awt.Insets JavaDoc(3, 3, 3, 3);
672         jPanel1.add(jComboBoxSubDataset, gridBagConstraints);
673
674         jPanel7.setLayout(new java.awt.GridBagLayout JavaDoc());
675
676         jPanel4.setLayout(new java.awt.GridBagLayout JavaDoc());
677
678         jPanel16.setLayout(new java.awt.GridBagLayout JavaDoc());
679
680         jScrollPane2.setMinimumSize(new java.awt.Dimension JavaDoc(300, 50));
681         jScrollPane2.setPreferredSize(new java.awt.Dimension JavaDoc(300, 50));
682         jTableDatasetParameters.setModel(new javax.swing.table.DefaultTableModel JavaDoc(
683             new Object JavaDoc [][] {
684
685             },
686             new String JavaDoc [] {
687                 "Parameter", "Expression"
688             }
689         ) {
690             boolean[] canEdit = new boolean [] {
691                 false, false
692             };
693
694             public boolean isCellEditable(int rowIndex, int columnIndex) {
695                 return canEdit [columnIndex];
696             }
697         });
698         jTableDatasetParameters.addMouseListener(new java.awt.event.MouseAdapter JavaDoc() {
699             public void mouseClicked(java.awt.event.MouseEvent JavaDoc evt) {
700                 jTableDatasetParametersMouseClicked(evt);
701             }
702         });
703
704         jScrollPane2.setViewportView(jTableDatasetParameters);
705
706         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
707         gridBagConstraints.gridx = 0;
708         gridBagConstraints.gridy = 0;
709         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
710         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
711         gridBagConstraints.weightx = 1.0;
712         gridBagConstraints.weighty = 1.0;
713         gridBagConstraints.insets = new java.awt.Insets JavaDoc(4, 4, 4, 4);
714         jPanel16.add(jScrollPane2, gridBagConstraints);
715
716         jPanel10.setLayout(new java.awt.GridBagLayout JavaDoc());
717
718         jPanel10.setMinimumSize(new java.awt.Dimension JavaDoc(150, 33));
719         jButtonAddParameter.setText("Add");
720         jButtonAddParameter.addActionListener(new java.awt.event.ActionListener JavaDoc() {
721             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
722                 jButtonAddParameterActionPerformed(evt);
723             }
724         });
725
726         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
727         gridBagConstraints.gridx = 0;
728         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
729         gridBagConstraints.weightx = 1.0;
730         jPanel10.add(jButtonAddParameter, gridBagConstraints);
731
732         jButtonModParameter.setText("Modify");
733         jButtonModParameter.setEnabled(false);
734         jButtonModParameter.addActionListener(new java.awt.event.ActionListener JavaDoc() {
735             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
736                 jButtonModParameterActionPerformed(evt);
737             }
738         });
739
740         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
741         gridBagConstraints.gridx = 0;
742         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
743         gridBagConstraints.weightx = 1.0;
744         jPanel10.add(jButtonModParameter, gridBagConstraints);
745
746         jButtonRemParameter.setText("Remove");
747         jButtonRemParameter.setEnabled(false);
748         jButtonRemParameter.addActionListener(new java.awt.event.ActionListener JavaDoc() {
749             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
750                 jButtonRemParameterActionPerformed(evt);
751             }
752         });
753
754         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
755         gridBagConstraints.gridx = 0;
756         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
757         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
758         gridBagConstraints.weightx = 1.0;
759         gridBagConstraints.weighty = 1.0;
760         jPanel10.add(jButtonRemParameter, gridBagConstraints);
761
762         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
763         gridBagConstraints.gridx = 1;
764         gridBagConstraints.gridy = 0;
765         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
766         gridBagConstraints.weighty = 1.0;
767         gridBagConstraints.insets = new java.awt.Insets JavaDoc(4, 0, 4, 4);
768         jPanel16.add(jPanel10, gridBagConstraints);
769
770         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
771         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
772         gridBagConstraints.weightx = 1.0;
773         gridBagConstraints.weighty = 1.0;
774         jPanel4.add(jPanel16, gridBagConstraints);
775
776         jTabbedPaneSubDataset.addTab("Parameters", jPanel4);
777
778         jPanel5.setLayout(new java.awt.GridBagLayout JavaDoc());
779
780         jLabel26.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
781         jLabel26.setText("Parameters Map Expression");
782         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
783         gridBagConstraints.gridx = 0;
784         gridBagConstraints.gridy = 2;
785         gridBagConstraints.gridwidth = 3;
786         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
787         gridBagConstraints.insets = new java.awt.Insets JavaDoc(6, 8, 0, 0);
788         jPanel5.add(jLabel26, gridBagConstraints);
789
790         jRTextExpressionAreaMapExpression.setBorder(javax.swing.BorderFactory.createEtchedBorder());
791         jRTextExpressionAreaMapExpression.setElectricScroll(0);
792         jRTextExpressionAreaMapExpression.setMinimumSize(new java.awt.Dimension JavaDoc(0, 0));
793         jRTextExpressionAreaMapExpression.setPreferredSize(new java.awt.Dimension JavaDoc(300, 50));
794         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
795         gridBagConstraints.gridx = 0;
796         gridBagConstraints.gridy = 3;
797         gridBagConstraints.gridwidth = 3;
798         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
799         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
800         gridBagConstraints.weightx = 1.0;
801         gridBagConstraints.weighty = 1.0;
802         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 4, 4, 4);
803         jPanel5.add(jRTextExpressionAreaMapExpression, gridBagConstraints);
804
805         jTabbedPaneSubDataset.addTab("Parameters map exp", jPanel5);
806
807         jPanel6.setLayout(new java.awt.GridBagLayout JavaDoc());
808
809         jLabel41.setText("Connection / Datasource Expression");
810         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
811         gridBagConstraints.gridx = 0;
812         gridBagConstraints.gridy = 2;
813         gridBagConstraints.gridwidth = 2;
814         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
815         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 6, 0, 0);
816         jPanel6.add(jLabel41, gridBagConstraints);
817
818         jComboBoxDatasetConnectionType.setMinimumSize(new java.awt.Dimension JavaDoc(300, 20));
819         jComboBoxDatasetConnectionType.setPreferredSize(new java.awt.Dimension JavaDoc(300, 20));
820         jComboBoxDatasetConnectionType.addActionListener(new java.awt.event.ActionListener JavaDoc() {
821             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
822                 jComboBoxDatasetConnectionTypeActionPerformed(evt);
823             }
824         });
825
826         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
827         gridBagConstraints.gridx = 0;
828         gridBagConstraints.gridy = 3;
829         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
830         gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
831         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 6, 0, 6);
832         jPanel6.add(jComboBoxDatasetConnectionType, gridBagConstraints);
833
834         jRTextExpressionAreaTextConnectionExpression.setBorder(javax.swing.BorderFactory.createEtchedBorder());
835         jRTextExpressionAreaTextConnectionExpression.setEnabled(false);
836         jRTextExpressionAreaTextConnectionExpression.setMinimumSize(new java.awt.Dimension JavaDoc(300, 50));
837         jRTextExpressionAreaTextConnectionExpression.setPreferredSize(new java.awt.Dimension JavaDoc(300, 50));
838         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
839         gridBagConstraints.gridx = 0;
840         gridBagConstraints.gridy = 4;
841         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
842         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
843         gridBagConstraints.weightx = 1.0;
844         gridBagConstraints.weighty = 1.0;
845         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 4, 4, 4);
846         jPanel6.add(jRTextExpressionAreaTextConnectionExpression, gridBagConstraints);
847
848         jTabbedPaneSubDataset.addTab("Connection/Datasource exp", jPanel6);
849
850         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
851         gridBagConstraints.gridy = 1;
852         gridBagConstraints.gridwidth = 2;
853         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
854         gridBagConstraints.weightx = 1.0;
855         gridBagConstraints.weighty = 1.0;
856         gridBagConstraints.insets = new java.awt.Insets JavaDoc(4, 0, 0, 0);
857         jPanel7.add(jTabbedPaneSubDataset, gridBagConstraints);
858
859         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
860         gridBagConstraints.gridx = 0;
861         gridBagConstraints.gridwidth = 2;
862         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
863         gridBagConstraints.weightx = 1.0;
864         gridBagConstraints.weighty = 1.0;
865         jPanel1.add(jPanel7, gridBagConstraints);
866
867         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
868         gridBagConstraints.gridy = 100;
869         gridBagConstraints.gridwidth = 2;
870         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
871         gridBagConstraints.weightx = 1.0;
872         gridBagConstraints.weighty = 1.0;
873         gridBagConstraints.insets = new java.awt.Insets JavaDoc(4, 4, 4, 4);
874         jPanelDataset.add(jPanel1, gridBagConstraints);
875
876         jPanel2.setLayout(new java.awt.GridBagLayout JavaDoc());
877
878         jButtonCopy.setText("Copy dataset");
879         jButtonCopy.addActionListener(new java.awt.event.ActionListener JavaDoc() {
880             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
881                 jButtonCopyActionPerformed(evt);
882             }
883         });
884
885         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
886         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 0, 0, 4);
887         jPanel2.add(jButtonCopy, gridBagConstraints);
888
889         jButtonPaste.setText("Paste dataset");
890         jButtonPaste.addActionListener(new java.awt.event.ActionListener JavaDoc() {
891             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
892                 jButtonPasteActionPerformed(evt);
893             }
894         });
895
896         jPanel2.add(jButtonPaste, new java.awt.GridBagConstraints JavaDoc());
897
898         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
899         gridBagConstraints.weightx = 1.0;
900         jPanel2.add(jPanel3, gridBagConstraints);
901
902         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
903         gridBagConstraints.gridx = 0;
904         gridBagConstraints.gridy = 101;
905         gridBagConstraints.gridwidth = 2;
906         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
907         gridBagConstraints.insets = new java.awt.Insets JavaDoc(4, 4, 4, 0);
908         jPanelDataset.add(jPanel2, gridBagConstraints);
909
910         jRTextExpressionAreaFilterExpression.setBorder(javax.swing.BorderFactory.createEtchedBorder());
911         jRTextExpressionAreaFilterExpression.setCaretVisible(false);
912         jRTextExpressionAreaFilterExpression.setElectricScroll(0);
913         jRTextExpressionAreaFilterExpression.setMinimumSize(new java.awt.Dimension JavaDoc(400, 50));
914         jRTextExpressionAreaFilterExpression.setPreferredSize(new java.awt.Dimension JavaDoc(400, 50));
915         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
916         gridBagConstraints.gridx = 0;
917         gridBagConstraints.gridy = 9;
918         gridBagConstraints.gridwidth = 2;
919         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
920         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
921         gridBagConstraints.weightx = 1.0;
922         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 3, 3, 3);
923         jPanelDataset.add(jRTextExpressionAreaFilterExpression, gridBagConstraints);
924
925         jTabbedPaneData.addTab("Dataset", jPanelDataset);
926
927         jPanelDataDefinition.setLayout(new java.awt.GridBagLayout JavaDoc());
928
929         jTabbedPaneData.addTab("Details", jPanelDataDefinition);
930
931         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
932         gridBagConstraints.gridx = 0;
933         gridBagConstraints.gridy = 1;
934         gridBagConstraints.gridwidth = 2;
935         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
936         gridBagConstraints.weightx = 1.0;
937         gridBagConstraints.weighty = 1.0;
938         gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 4, 4, 4);
939         jPanelData.add(jTabbedPaneData, gridBagConstraints);
940
941         jTabbedPane1.addTab("Chart data", jPanelData);
942
943         jPanelMultiAxis.setLayout(new java.awt.GridBagLayout JavaDoc());
944
945         jTable1.setModel(new javax.swing.table.DefaultTableModel JavaDoc(
946             new Object JavaDoc [][] {
947
948             },
949             new String JavaDoc [] {
950                 "Chart", "Axis position"
951             }
952         ) {
953             boolean[] canEdit = new boolean [] {
954                 false, true
955             };
956
957             public boolean isCellEditable(int rowIndex, int columnIndex) {
958                 return canEdit [columnIndex];
959             }
960         });
961         jTable1.addMouseListener(new java.awt.event.MouseAdapter JavaDoc() {
962             public void mouseClicked(java.awt.event.MouseEvent JavaDoc evt) {
963                 jTable1MouseClicked1(evt);
964             }
965         });
966
967         jScrollPane1.setViewportView(jTable1);
968
969         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
970         gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
971         gridBagConstraints.weightx = 1.0;
972         gridBagConstraints.weighty = 1.0;
973         gridBagConstraints.insets = new java.awt.Insets JavaDoc(4, 4, 4, 4);
974         jPanelMultiAxis.add(jScrollPane1, gridBagConstraints);
975
976         jPanel9.setLayout(new java.awt.GridBagLayout JavaDoc());
977
978         jButtonAdd.setText("Add");
979         jButtonAdd.setMargin(new java.awt.Insets JavaDoc(2, 8, 2, 8));
980         jButtonAdd.addActionListener(new java.awt.event.ActionListener JavaDoc() {
981             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
982                 jButtonAddActionPerformed(evt);
983             }
984         });
985
986         gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
987         gridBagConstraints.gridx = 0;
988         gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
989         gridBagConstraints.weightx = 1.0;
990         gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 4, 4, 4);
991         jPanel9.add(jButtonAdd, gridBagConstraints);
992
993         jButtonModify.setText("Edit chart");
994         jButtonModify.setEnabled(false);
995         jButtonModify.setMargin(new java.awt.Insets JavaDoc(2, 8, 2, 8));
996         jButtonModify.addActionListener(new java.awt.event.ActionListener JavaDoc() {
997             public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
998                 jButtonModifyActionPerformed(evt);
999             }
1000        });
1001
1002        gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
1003        gridBagConstraints.gridx = 0;
1004        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1005        gridBagConstraints.weightx = 1.0;
1006        gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 4, 4, 4);
1007        jPanel9.add(jButtonModify, gridBagConstraints);
1008
1009        jButtonDelete.setText("Delete");
1010        jButtonDelete.setEnabled(false);
1011        jButtonDelete.setMargin(new java.awt.Insets JavaDoc(2, 8, 2, 8));
1012        jButtonDelete.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1013            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1014                jButtonDeleteActionPerformed(evt);
1015            }
1016        });
1017
1018        gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
1019        gridBagConstraints.gridx = 0;
1020        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1021        gridBagConstraints.weightx = 1.0;
1022        gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 4, 4, 4);
1023        jPanel9.add(jButtonDelete, gridBagConstraints);
1024
1025        jButtonMoveUp.setText("Move up");
1026        jButtonMoveUp.setEnabled(false);
1027        jButtonMoveUp.setMargin(new java.awt.Insets JavaDoc(2, 8, 2, 8));
1028        jButtonMoveUp.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1029            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1030                jButtonMoveUpActionPerformed(evt);
1031            }
1032        });
1033
1034        gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
1035        gridBagConstraints.gridx = 0;
1036        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1037        gridBagConstraints.weightx = 1.0;
1038        gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 4, 4, 4);
1039        jPanel9.add(jButtonMoveUp, gridBagConstraints);
1040
1041        jButtonMoveDown.setText("Move down");
1042        jButtonMoveDown.setEnabled(false);
1043        jButtonMoveDown.setMargin(new java.awt.Insets JavaDoc(2, 8, 2, 8));
1044        jButtonMoveDown.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1045            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1046                jButtonMoveDownActionPerformed(evt);
1047            }
1048        });
1049
1050        gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
1051        gridBagConstraints.gridx = 0;
1052        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1053        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
1054        gridBagConstraints.weightx = 1.0;
1055        gridBagConstraints.weighty = 1.0;
1056        gridBagConstraints.insets = new java.awt.Insets JavaDoc(0, 4, 14, 4);
1057        jPanel9.add(jButtonMoveDown, gridBagConstraints);
1058
1059        gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
1060        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1061        gridBagConstraints.weighty = 1.0;
1062        gridBagConstraints.insets = new java.awt.Insets JavaDoc(4, 4, 4, 4);
1063        jPanelMultiAxis.add(jPanel9, gridBagConstraints);
1064
1065        jTabbedPane1.addTab("Multiaxis charts", jPanelMultiAxis);
1066
1067        getContentPane().add(jTabbedPane1, java.awt.BorderLayout.CENTER);
1068
1069        jPanel8.setLayout(new java.awt.GridBagLayout JavaDoc());
1070
1071        jButtonClose.setText("Close");
1072        jButtonClose.addActionListener(new java.awt.event.ActionListener JavaDoc() {
1073            public void actionPerformed(java.awt.event.ActionEvent JavaDoc evt) {
1074                jButtonCloseActionPerformed(evt);
1075            }
1076        });
1077
1078        gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
1079        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
1080        gridBagConstraints.weightx = 1.0;
1081        gridBagConstraints.insets = new java.awt.Insets JavaDoc(2, 4, 2, 4);
1082        jPanel8.add(jButtonClose, gridBagConstraints);
1083
1084        getContentPane().add(jPanel8, java.awt.BorderLayout.SOUTH);
1085
1086        pack();
1087    }// </editor-fold>//GEN-END:initComponents
1088

1089    private void jTable1MouseClicked1(java.awt.event.MouseEvent JavaDoc evt) {//GEN-FIRST:event_jTable1MouseClicked1
1090

1091        if (evt.getButton() == evt.BUTTON1 && evt.getClickCount() == 2)
1092        {
1093            jButtonModifyActionPerformed(null);
1094        }
1095    }//GEN-LAST:event_jTable1MouseClicked1
1096

1097    private void jButtonMoveDownActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonMoveDownActionPerformed
1098

1099        if (jTable1.getSelectedRowCount() > 0) {
1100            DefaultTableModel JavaDoc dtm = (DefaultTableModel JavaDoc)jTable1.getModel();
1101            int[] indices = jTable1.getSelectedRows();
1102            java.util.List JavaDoc axes = ((MultiAxisPlot)currentSelectedChartElement.getChart().getPlot() ).getAxis();
1103            
1104            for (int i=indices.length-1; i>=0; --i) {
1105                if (indices[i] >= (jTable1.getRowCount() -1)) continue;
1106                
1107                Axis axis = (Axis)jTable1.getValueAt( indices[i], 0);
1108                dtm.removeRow(indices[i]);
1109                axes.remove(indices[i]);
1110                dtm.insertRow(indices[i]+1, new Object JavaDoc[] { axis, axis.getPosition() } );
1111                axes.add(indices[i]+1, axis);
1112                indices[i]++;
1113            }
1114            
1115            DefaultListSelectionModel JavaDoc dlsm = (DefaultListSelectionModel JavaDoc)jTable1.getSelectionModel();
1116            dlsm.setValueIsAdjusting(true);
1117            dlsm.clearSelection();
1118            for (int i=0; i<indices.length; ++i) {
1119                dlsm.addSelectionInterval(indices[i], indices[i]);
1120            }
1121            dlsm.setValueIsAdjusting( false );
1122            jTable1.updateUI();
1123        }
1124    }//GEN-LAST:event_jButtonMoveDownActionPerformed
1125

1126    private void jButtonMoveUpActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonMoveUpActionPerformed
1127
if (jTable1.getSelectedRow() > 0) {
1128            DefaultTableModel JavaDoc dtm = (DefaultTableModel JavaDoc)jTable1.getModel();
1129            java.util.List JavaDoc axes = ((MultiAxisPlot)currentSelectedChartElement.getChart().getPlot() ).getAxis();
1130            
1131            int[] indices = jTable1.getSelectedRows();
1132            for (int i=0; i < indices.length; ++i) {
1133                if (indices[i] == 0) continue;
1134                
1135                Axis axis = (Axis)jTable1.getValueAt( indices[i], 0);
1136                dtm.removeRow(indices[i]);
1137                axes.remove(indices[i]);
1138                dtm.insertRow(indices[i]-1, new Object JavaDoc[] { axis, axis.getPosition() } );
1139                axes.add(indices[i]-1, axis);
1140                indices[i]--;
1141            }
1142            
1143            DefaultListSelectionModel JavaDoc dlsm = (DefaultListSelectionModel JavaDoc)jTable1.getSelectionModel();
1144            dlsm.setValueIsAdjusting(true);
1145            dlsm.clearSelection();
1146            for (int i=0; i<indices.length; ++i) {
1147                dlsm.addSelectionInterval(indices[i], indices[i]);
1148            }
1149            dlsm.setValueIsAdjusting( false );
1150        }
1151    }//GEN-LAST:event_jButtonMoveUpActionPerformed
1152

1153    private void jButtonDeleteActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonDeleteActionPerformed
1154
int[] indexes = jTable1.getSelectedRows();
1155        java.util.List JavaDoc axes = ((MultiAxisPlot)currentSelectedChartElement.getChart().getPlot() ).getAxis();
1156        
1157        for (int i=indexes.length-1; i>=0; --i) {
1158            ((DefaultTableModel JavaDoc)jTable1.getModel()).removeRow(indexes[i]);
1159            axes.remove(indexes[i]);
1160        }
1161        jTable1.updateUI();
1162    }//GEN-LAST:event_jButtonDeleteActionPerformed
1163

1164    private void jButtonModifyActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonModifyActionPerformed
1165
int index = jTable1.getSelectedRow();
1166        if (index >=0) {
1167            Axis c = (Axis)jTable1.getValueAt(jTable1.getSelectedRow(), 0);
1168            ChartPropertiesDialog cpd = new ChartPropertiesDialog(this, true);
1169            cpd.setChartElement( c.getChartReportElement() );
1170            cpd.setVisible(true);
1171        }
1172    }//GEN-LAST:event_jButtonModifyActionPerformed
1173

1174    private void jButtonAddActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonAddActionPerformed
1175
ChartSelectionJDialog chartSelector = new ChartSelectionJDialog(this, true);
1176        chartSelector.setMultiAxisMode(true);
1177        chartSelector.setVisible(true);
1178        
1179        if (chartSelector.getDialogResult() == JOptionPane.OK_OPTION) {
1180            
1181            Axis axis = new Axis();
1182            axis.getChartReportElement().setChart( chartSelector.getChart());
1183        
1184            ((DefaultTableModel JavaDoc)jTable1.getModel()).addRow(new Object JavaDoc[] { axis, axis.getPosition() });
1185            
1186            java.util.List JavaDoc axes = ((MultiAxisPlot)currentSelectedChartElement.getChart().getPlot() ).getAxis();
1187            axes.add(axis);
1188        }
1189    }//GEN-LAST:event_jButtonAddActionPerformed
1190

1191    private void formWindowClosing(java.awt.event.WindowEvent JavaDoc evt) {//GEN-FIRST:event_formWindowClosing
1192

1193        MainFrame.getMainInstance().getActiveReportFrame().getReport().incrementReportChanges();
1194        
1195    }//GEN-LAST:event_formWindowClosing
1196

1197    private void jButtonCloseActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonCloseActionPerformed
1198

1199        this.setVisible(false);
1200        this.dispose();
1201    }//GEN-LAST:event_jButtonCloseActionPerformed
1202

1203    private void jTableDatasetParametersMouseClicked(java.awt.event.MouseEvent JavaDoc evt) {//GEN-FIRST:event_jTableDatasetParametersMouseClicked
1204

1205        if (evt.getClickCount() == 2 && evt.getButton() == evt.BUTTON1)
1206        {
1207            if (jTableDatasetParameters.getSelectedRowCount() > 0)
1208            {
1209                jButtonModParameterActionPerformed(null);
1210            }
1211        }
1212        
1213    }//GEN-LAST:event_jTableDatasetParametersMouseClicked
1214

1215    private void jButtonRemParameterActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonRemParameterActionPerformed
1216
if (this.isInit()) return;
1217        
1218        if (currentSelectedChartElement == null) return;
1219        
1220        javax.swing.table.DefaultTableModel JavaDoc dtm = (javax.swing.table.DefaultTableModel JavaDoc)jTableDatasetParameters.getModel();
1221        
1222        while (jTableDatasetParameters.getSelectedRowCount() > 0) {
1223            int i=jTableDatasetParameters.getSelectedRow();
1224            currentSelectedChartElement.getChart().getDataset().getSubreportParameters().removeElement( jTableDatasetParameters.getValueAt( i, 0) );
1225            dtm.removeRow(i);
1226        }
1227    }//GEN-LAST:event_jButtonRemParameterActionPerformed
1228

1229    private void jButtonModParameterActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonModParameterActionPerformed
1230

1231        if (this.isInit()) return;
1232        
1233        if (currentSelectedChartElement == null) return;
1234                int rowNumber = jTableDatasetParameters.getSelectedRow();
1235        JRSubreportParameter parameter = (JRSubreportParameter)jTableDatasetParameters.getValueAt( jTableDatasetParameters.getSelectedRow(), 0);
1236        
1237        JRSubreportParameterDialog jrpd = new JRSubreportParameterDialog(this, true);
1238        jrpd.setParameter( parameter );
1239        jrpd.setVisible(true);
1240        
1241        if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) {
1242            parameter.setName( jrpd.getParameter().getName() );
1243            parameter.setExpression( jrpd.getParameter().getExpression());
1244            javax.swing.table.DefaultTableModel JavaDoc dtm = (javax.swing.table.DefaultTableModel JavaDoc)jTableDatasetParameters.getModel();
1245            dtm.setValueAt(parameter, rowNumber, 0);
1246            dtm.setValueAt(parameter.getExpression(), rowNumber, 1);
1247            jTableDatasetParameters.updateUI();
1248        }
1249    }//GEN-LAST:event_jButtonModParameterActionPerformed
1250

1251    private void jButtonAddParameterActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonAddParameterActionPerformed
1252
if (this.isInit()) return;
1253        
1254        if (currentSelectedChartElement == null) return;
1255        // Set the new value for all selected elements...
1256

1257        JRSubreportParameterDialog jrpd = new JRSubreportParameterDialog(this, true);
1258        jrpd.setVisible(true);
1259        
1260        if (jrpd.getDialogResult() == javax.swing.JOptionPane.OK_OPTION) {
1261            it.businesslogic.ireport.JRSubreportParameter parameter = jrpd.getParameter();
1262            currentSelectedChartElement.getChart().getDataset().getSubreportParameters().addElement( parameter );
1263            javax.swing.table.DefaultTableModel JavaDoc dtm = (javax.swing.table.DefaultTableModel JavaDoc)jTableDatasetParameters.getModel();
1264            dtm.addRow(new Object JavaDoc[]{parameter, parameter.getExpression()});
1265        }
1266    }//GEN-LAST:event_jButtonAddParameterActionPerformed
1267

1268    private void jComboBoxSubDatasetActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jComboBoxSubDatasetActionPerformed
1269

1270        if (this.isInit()) return;
1271
1272       
1273            if (currentSelectedChartElement != null)
1274            {
1275                if (this.jComboBoxSubDataset.getSelectedIndex() > 0)
1276                {
1277                        if ( currentSelectedChartElement.getChart().getDataset().getSubDataset() != jComboBoxSubDataset.getSelectedItem())
1278                        {
1279                            currentSelectedChartElement.getChart().getDataset().setSubDataset( (SubDataset)jComboBoxSubDataset.getSelectedItem() );
1280                            setDatasetSubDataset( currentSelectedChartElement.getChart().getDataset().getSubDataset() );
1281                            
1282                            jTabbedPaneSubDataset.setVisible(true);
1283                        }
1284                        jRTextExpressionAreaFilterExpression.setSubDataset( (SubDataset)jComboBoxSubDataset.getSelectedItem() );
1285                // Check subdataset parameters.... (TODO)
1286
}
1287                else
1288                {
1289                    jRTextExpressionAreaFilterExpression.setSubDataset(null);
1290                    currentSelectedChartElement.getChart().getDataset().setSubDataset( null );
1291                    currentSelectedChartElement.getChart().getDataset().getSubreportParameters().removeAllElements();
1292                    currentSelectedChartElement.getChart().getDataset().setParametersMapExpression("");
1293                    currentSelectedChartElement.getChart().getDataset().setConnectionExpression("");
1294                    currentSelectedChartElement.getChart().getDataset().setDataSourceExpression("");
1295                    currentSelectedChartElement.getChart().getDataset().setUseConnection(false);
1296                    
1297                    setDatasetSubDataset( null );
1298                    
1299                    javax.swing.table.DefaultTableModel JavaDoc dtm = (javax.swing.table.DefaultTableModel JavaDoc)jTableDatasetParameters.getModel();
1300                    dtm.setRowCount(0);
1301                    this.jComboBoxDatasetConnectionType.setSelectedIndex(0);
1302                    this.jRTextExpressionAreaTextConnectionExpression.setEnabled(false);
1303                    this.jRTextExpressionAreaTextConnectionExpression.setBackground(Color.LIGHT_GRAY);
1304                    this.jRTextExpressionAreaTextConnectionExpression.setText("");
1305                    jRTextExpressionAreaMapExpression.setText("");
1306                
1307                    jTabbedPaneSubDataset.setVisible(false);
1308                    jTabbedPaneSubDataset.updateUI();
1309                }
1310        }
1311    }//GEN-LAST:event_jComboBoxSubDatasetActionPerformed
1312

1313    private void jComboBoxDatasetConnectionTypeActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jComboBoxDatasetConnectionTypeActionPerformed
1314
if (isInit() || currentSelectedChartElement == null) return;
1315                
1316        if (jComboBoxDatasetConnectionType.getSelectedIndex() == 0) {
1317            currentSelectedChartElement.getChart().getDataset().setUseConnection(false);
1318            currentSelectedChartElement.getChart().getDataset().setConnectionExpression("");
1319            currentSelectedChartElement.getChart().getDataset().setDataSourceExpression("");
1320            jRTextExpressionAreaTextConnectionExpression.setText("");
1321            jRTextExpressionAreaTextConnectionExpression.setEnabled(false);
1322            jRTextExpressionAreaTextConnectionExpression.setBackground(Color.LIGHT_GRAY);
1323        }
1324        else if (jComboBoxDatasetConnectionType.getSelectedIndex() == 1) {
1325            currentSelectedChartElement.getChart().getDataset().setUseConnection(true);
1326            currentSelectedChartElement.getChart().getDataset().setDataSourceExpression("");
1327            currentSelectedChartElement.getChart().getDataset().setConnectionExpression("$P{REPORT_CONNECTION}");
1328            jRTextExpressionAreaTextConnectionExpression.setText("$P{REPORT_CONNECTION}");
1329            jRTextExpressionAreaTextConnectionExpression.setEnabled(true);
1330            jRTextExpressionAreaTextConnectionExpression.setBackground(Color.WHITE);
1331        }
1332        else if (jComboBoxDatasetConnectionType.getSelectedIndex() == 2) {
1333            currentSelectedChartElement.getChart().getDataset().setUseConnection(false);
1334            currentSelectedChartElement.getChart().getDataset().setDataSourceExpression("$P{MyDataource}");
1335            currentSelectedChartElement.getChart().getDataset().setConnectionExpression("");
1336            jRTextExpressionAreaTextConnectionExpression.setText("$P{MyDataource}");
1337            jRTextExpressionAreaTextConnectionExpression.setEnabled(true);
1338            jRTextExpressionAreaTextConnectionExpression.setBackground(Color.WHITE);
1339        }
1340    }//GEN-LAST:event_jComboBoxDatasetConnectionTypeActionPerformed
1341

1342    private void jButtonPasteActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonPasteActionPerformed
1343

1344        
1345        if (currentSelectedChartElement == null) return;
1346        if (it.businesslogic.ireport.gui.MainFrame.getMainInstance().getChartDatasetClipBoard() == null) return;
1347        
1348        Dataset theDataset = it.businesslogic.ireport.gui.MainFrame.getMainInstance().getChartDatasetClipBoard();
1349        
1350        currentSelectedChartElement.getChart().getDataset().setIncrementType( it.businesslogic.ireport.gui.MainFrame.getMainInstance().getChartDatasetClipBoard().getIncrementType());
1351        currentSelectedChartElement.getChart().getDataset().setIncrementGroup( it.businesslogic.ireport.gui.MainFrame.getMainInstance().getChartDatasetClipBoard().getIncrementGroup());
1352        currentSelectedChartElement.getChart().getDataset().setResetType( it.businesslogic.ireport.gui.MainFrame.getMainInstance().getChartDatasetClipBoard().getResetType());
1353        currentSelectedChartElement.getChart().getDataset().setResetGroup( it.businesslogic.ireport.gui.MainFrame.getMainInstance().getChartDatasetClipBoard().getResetGroup());
1354        
1355        currentSelectedChartElement.getChart().getDataset().setUseConnection( theDataset.isUseConnection());
1356        currentSelectedChartElement.getChart().getDataset().setSubDataset( theDataset.getSubDataset());
1357        currentSelectedChartElement.getChart().getDataset().setParametersMapExpression( theDataset.getParametersMapExpression());
1358        currentSelectedChartElement.getChart().getDataset().setConnectionExpression( theDataset.getConnectionExpression());
1359        currentSelectedChartElement.getChart().getDataset().setDataSourceExpression( theDataset.getDataSourceExpression());
1360        
1361        for (int i=0; i< theDataset.getSubreportParameters().size(); ++i)
1362        {
1363            currentSelectedChartElement.getChart().getDataset().getSubreportParameters().add( ((JRSubreportParameter)theDataset.getSubreportParameters().elementAt(i)).cloneMe() );
1364        }
1365            
1366        if (it.businesslogic.ireport.gui.MainFrame.getMainInstance().getChartDatasetClipBoard().getClass().getName().equals(
1367            currentSelectedChartElement.getChart().getDataset().getClass().getName() ) )
1368        {
1369            currentSelectedChartElement.getChart().setDataset( it.businesslogic.ireport.gui.MainFrame.getMainInstance().getChartDatasetClipBoard().cloneMe() );
1370            this.setDatasetPanel( currentSelectedChartElement.getChart().getDataset() );
1371        }
1372        
1373        init = true;
1374        
1375        Misc.setComboboxSelectedTagValue(jComboBoxIncrementType, currentSelectedChartElement.getChart().getDataset().getIncrementType());
1376        jComboBoxIncrementGroup.setSelectedItem( currentSelectedChartElement.getChart().getDataset().getIncrementGroup() );
1377        Misc.setComboboxSelectedTagValue(jComboBoxResetType, currentSelectedChartElement.getChart().getDataset().getResetType());
1378        jComboBoxResetGroup.setSelectedItem( currentSelectedChartElement.getChart().getDataset().getResetGroup() );
1379        
1380        if (currentSelectedChartElement.getChart().getDataset().getSubDataset() != null)
1381            {
1382                jComboBoxSubDataset.setSelectedItem(currentSelectedChartElement.getChart().getDataset().getSubDataset());
1383                jTabbedPaneSubDataset.setVisible(true);
1384            
1385                jRTextExpressionAreaMapExpression.setText( currentSelectedChartElement.getChart().getDataset().getParametersMapExpression() );
1386                if (!currentSelectedChartElement.getChart().getDataset().isUseConnection() && Misc.nvl( currentSelectedChartElement.getChart().getDataset().getDataSourceExpression(),"").trim().equals("")) {
1387                    this.jComboBoxDatasetConnectionType.setSelectedIndex(0);
1388                    this.jRTextExpressionAreaTextConnectionExpression.setEnabled(false);
1389                    this.jRTextExpressionAreaTextConnectionExpression.setBackground(Color.LIGHT_GRAY);
1390                    this.jRTextExpressionAreaTextConnectionExpression.setText("");
1391                }
1392                else if (currentSelectedChartElement.getChart().getDataset().isUseConnection()) {
1393                    this.jComboBoxDatasetConnectionType.setSelectedIndex(1);
1394                    this.jRTextExpressionAreaTextConnectionExpression.setEnabled(true);
1395                    this.jRTextExpressionAreaTextConnectionExpression.setBackground(Color.WHITE);
1396                    this.jRTextExpressionAreaTextConnectionExpression.setText( currentSelectedChartElement.getChart().getDataset().getConnectionExpression());
1397                }
1398                else {
1399                    this.jComboBoxDatasetConnectionType.setSelectedIndex(2);
1400                    this.jRTextExpressionAreaTextConnectionExpression.setEnabled(true);
1401                    this.jRTextExpressionAreaTextConnectionExpression.setBackground(Color.WHITE);
1402                    this.jRTextExpressionAreaTextConnectionExpression.setText( currentSelectedChartElement.getChart().getDataset().getDataSourceExpression());
1403                }
1404
1405                //Add parameters...
1406
javax.swing.table.DefaultTableModel JavaDoc dtm = (javax.swing.table.DefaultTableModel JavaDoc)jTableDatasetParameters.getModel();
1407                dtm.setRowCount(0);
1408
1409                java.util.Enumeration JavaDoc enum_parameters = currentSelectedChartElement.getChart().getDataset().getSubreportParameters().elements();
1410                while (enum_parameters.hasMoreElements()) {
1411                    it.businesslogic.ireport.JRSubreportParameter parameter = (it.businesslogic.ireport.JRSubreportParameter)enum_parameters.nextElement();
1412                    Vector JavaDoc row = new Vector JavaDoc();
1413                    row.addElement(parameter);
1414                    row.addElement(parameter.getExpression());
1415                    dtm.addRow(row);
1416                }
1417            
1418            }
1419            else
1420            {
1421                javax.swing.table.DefaultTableModel JavaDoc dtm = (javax.swing.table.DefaultTableModel JavaDoc)jTableDatasetParameters.getModel();
1422                dtm.setRowCount(0);
1423                this.jComboBoxDatasetConnectionType.setSelectedIndex(0);
1424                this.jRTextExpressionAreaTextConnectionExpression.setEnabled(false);
1425                this.jRTextExpressionAreaTextConnectionExpression.setBackground(Color.LIGHT_GRAY);
1426                this.jRTextExpressionAreaTextConnectionExpression.setText("");
1427                jRTextExpressionAreaMapExpression.setText("");
1428                
1429                jComboBoxSubDataset.setSelectedIndex(0);
1430                jTabbedPaneSubDataset.setVisible(false);
1431            }
1432        
1433        init = false;
1434        
1435    }//GEN-LAST:event_jButtonPasteActionPerformed
1436

1437    private void jButtonCopyActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jButtonCopyActionPerformed
1438

1439        if (currentSelectedChartElement == null) return;
1440        it.businesslogic.ireport.gui.MainFrame.getMainInstance().setChartDatasetClipBoard( currentSelectedChartElement.getChart().getDataset().cloneMe() );
1441        jButtonPaste.setEnabled(true);
1442    }//GEN-LAST:event_jButtonCopyActionPerformed
1443

1444    private void jComboBoxTypeOfDataActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jComboBoxTypeOfDataActionPerformed
1445

1446        if (isInit() || currentSelectedChartElement == null || !(currentSelectedChartElement.getChart() instanceof XYBarChart )) return;
1447        
1448        if (jComboBoxTypeOfData.getSelectedItem() != null)
1449        {
1450            String JavaDoc typeOfDataset = ((Tag)jComboBoxTypeOfData.getSelectedItem()).getValue()+"";
1451            if (currentSelectedChartElement.getChart().getDataset().getClass().getName().equals(typeOfDataset)) return;
1452            
1453            try {
1454                jPanelDataDefinition.removeAll();
1455                Dataset dataset = (Dataset)this.getClass().forName( typeOfDataset ).newInstance();
1456                currentSelectedChartElement.getChart().setDataset(dataset);
1457                
1458            
1459            } catch (Exception JavaDoc ex)
1460            {
1461                 currentSelectedChartElement.getChart().setDataset(new Dataset());
1462            }
1463            setDatasetPanel(currentSelectedChartElement.getChart().getDataset());
1464        }
1465        
1466    }//GEN-LAST:event_jComboBoxTypeOfDataActionPerformed
1467

1468    
1469    
1470    
1471    
1472    private void jComboBoxIncrementGroupActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jComboBoxIncrementGroupActionPerformed
1473
if (isInit() || currentSelectedChartElement == null) return;
1474        currentSelectedChartElement.getChart().getDataset().setIncrementGroup( ""+jComboBoxIncrementGroup.getSelectedItem());
1475    }//GEN-LAST:event_jComboBoxIncrementGroupActionPerformed
1476

1477    private void jComboBoxIncrementTypeActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jComboBoxIncrementTypeActionPerformed
1478

1479        if (isInit() || currentSelectedChartElement == null) return;
1480        currentSelectedChartElement.getChart().getDataset().setIncrementType( ((Tag)jComboBoxIncrementType.getSelectedItem()).getValue()+"");
1481        
1482        if (currentSelectedChartElement.getChart().getDataset().getIncrementType().equals("Group"))
1483        {
1484            // We have to removethe null entry...
1485
if (jComboBoxIncrementGroup.getItemAt(0).equals(""))
1486            {
1487                jComboBoxIncrementGroup.removeItemAt(0);
1488            }
1489            jComboBoxIncrementGroup.setSelectedIndex(0);
1490        }
1491        else
1492        {
1493            if (!jComboBoxIncrementGroup.getItemAt(0).equals(""))
1494            {
1495                jComboBoxIncrementGroup.insertItemAt("",0);
1496            }
1497            jComboBoxIncrementGroup.setSelectedIndex(0);
1498        }
1499    }//GEN-LAST:event_jComboBoxIncrementTypeActionPerformed
1500

1501    private void jComboBoxResetGroupActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jComboBoxResetGroupActionPerformed
1502

1503        if (isInit() || currentSelectedChartElement == null) return;
1504        currentSelectedChartElement.getChart().getDataset().setResetGroup( ""+jComboBoxResetGroup.getSelectedItem());
1505        
1506    }//GEN-LAST:event_jComboBoxResetGroupActionPerformed
1507

1508    private void jComboBoxResetTypeActionPerformed(java.awt.event.ActionEvent JavaDoc evt) {//GEN-FIRST:event_jComboBoxResetTypeActionPerformed
1509

1510        if (isInit() || currentSelectedChartElement == null) return;
1511        currentSelectedChartElement.getChart().getDataset().setResetType( ((Tag)jComboBoxResetType.getSelectedItem()).getValue()+"" );
1512        
1513        if (currentSelectedChartElement.getChart().getDataset().getResetType().equals("Group"))
1514        {
1515            // We have to remove the null entry...
1516
if (jComboBoxResetGroup.getItemAt(0).equals(""))
1517            {
1518                jComboBoxResetGroup.removeItemAt(0);
1519            }
1520            jComboBoxResetGroup.setSelectedIndex(0);
1521        }
1522        else
1523        {
1524            if (!jComboBoxResetGroup.getItemAt(0).equals(""))
1525            {
1526                jComboBoxResetGroup.insertItemAt("",0);
1527            }
1528            jComboBoxResetGroup.setSelectedIndex(0);
1529        }
1530        
1531    }//GEN-LAST:event_jComboBoxResetTypeActionPerformed
1532

1533    
1534    // Variables declaration - do not modify//GEN-BEGIN:variables
1535
private javax.swing.JButton JavaDoc jButtonAdd;
1536    private javax.swing.JButton JavaDoc jButtonAddParameter;
1537    private javax.swing.JButton JavaDoc jButtonClose;
1538    private javax.swing.JButton JavaDoc jButtonCopy;
1539    private javax.swing.JButton JavaDoc jButtonDelete;
1540    private javax.swing.JButton JavaDoc jButtonModParameter;
1541    private javax.swing.JButton JavaDoc jButtonModify;
1542    private javax.swing.JButton JavaDoc jButtonMoveDown;
1543    private javax.swing.JButton JavaDoc jButtonMoveUp;
1544    private javax.swing.JButton JavaDoc jButtonPaste;
1545    private javax.swing.JButton JavaDoc jButtonRemParameter;
1546    private javax.swing.JComboBox JavaDoc jComboBoxDatasetConnectionType;
1547    private javax.swing.JComboBox JavaDoc jComboBoxIncrementGroup;
1548    private javax.swing.JComboBox JavaDoc jComboBoxIncrementType;
1549    private javax.swing.JComboBox JavaDoc jComboBoxResetGroup;
1550    private javax.swing.JComboBox JavaDoc jComboBoxResetType;
1551    private javax.swing.JComboBox JavaDoc jComboBoxSubDataset;
1552    private javax.swing.JComboBox JavaDoc jComboBoxTypeOfData;
1553    private javax.swing.JLabel JavaDoc jLabel26;
1554    private javax.swing.JLabel JavaDoc jLabel41;
1555    private javax.swing.JLabel JavaDoc jLabelIncrementGroup;
1556    private javax.swing.JLabel JavaDoc jLabelIncrementType;
1557    private javax.swing.JLabel JavaDoc jLabelIncrementType1;
1558    private javax.swing.JLabel JavaDoc jLabelIncrementType2;
1559    private javax.swing.JLabel JavaDoc jLabelResetGroup;
1560    private javax.swing.JLabel JavaDoc jLabelResetType;
1561    private javax.swing.JLabel JavaDoc jLabelTypeOfData;
1562    private javax.swing.JPanel JavaDoc jPanel1;
1563    private javax.swing.JPanel JavaDoc jPanel10;
1564    private javax.swing.JPanel JavaDoc jPanel16;
1565    private javax.swing.JPanel JavaDoc jPanel2;
1566    private javax.swing.JPanel JavaDoc jPanel3;
1567    private javax.swing.JPanel JavaDoc jPanel4;
1568    private javax.swing.JPanel JavaDoc jPanel5;
1569    private javax.swing.JPanel JavaDoc jPanel6;
1570    private javax.swing.JPanel JavaDoc jPanel7;
1571    private javax.swing.JPanel JavaDoc jPanel8;
1572    private javax.swing.JPanel JavaDoc jPanel9;
1573    private javax.swing.JPanel JavaDoc jPanelData;
1574    private javax.swing.JPanel JavaDoc jPanelDataDefinition;
1575    private javax.swing.JPanel JavaDoc jPanelDataset;
1576    private javax.swing.JPanel JavaDoc jPanelMultiAxis;
1577    private javax.swing.JPanel JavaDoc jPanelProperties;
1578    private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaFilterExpression;
1579    private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaMapExpression;
1580    private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionAreaTextConnectionExpression;
1581    private javax.swing.JScrollPane JavaDoc jScrollPane1;
1582    private javax.swing.JScrollPane JavaDoc jScrollPane2;
1583    private javax.swing.JTabbedPane JavaDoc jTabbedPane1;
1584    private javax.swing.JTabbedPane JavaDoc jTabbedPaneData;
1585    private javax.swing.JTabbedPane JavaDoc jTabbedPaneSubDataset;
1586    private javax.swing.JTable JavaDoc jTable1;
1587    private javax.swing.JTable JavaDoc jTableDatasetParameters;
1588    // End of variables declaration//GEN-END:variables
1589

1590    /**
1591     * This method add entries in the properties sheet to edit all common chart properties.
1592     * The common chart properties are all the ones listed in the chart tag:
1593     * isShowLegend
1594     * evaluationTime
1595     *
1596     */

1597    public void addCommonChartProperties()
1598    {
1599        if (currentSelectedChartElement != null)
1600        {
1601            ExpressionSheetProperty chartTitleProperty = new ExpressionSheetProperty("chartTitle",I18n.getString("chartPropertiesDialog.property.chartTitle","Chart title expression"));
1602            chartTitleProperty.setValue( currentSelectedChartElement.getChart().getTitle().getTitleExpression());
1603            
1604            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), chartTitleProperty);
1605            
1606            FontSheetProperty chartTitleFontProperty = new FontSheetProperty("chartTitleFont",I18n.getString("chartPropertiesDialog.property.chartTitleFont","Chart title font"));
1607            chartTitleFontProperty.setValue( currentSelectedChartElement.getChart().getTitle().getFont());
1608            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), chartTitleFontProperty);
1609            
1610            SheetProperty chartTitleColorProperty = new SheetProperty("chartTitleColor",I18n.getString("chartPropertiesDialog.property.chartTitleColor","Chart title color"), SheetProperty.COLOR);
1611            chartTitleColorProperty.setValue( currentSelectedChartElement.getChart().getTitle().getColor());
1612            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), chartTitleColorProperty);
1613            
1614            SheetProperty chartTitlePositionProperty = new SheetProperty("chartTitlePosition",I18n.getString("chartPropertiesDialog.property.chartTitlePosition","Chart title position"), SheetProperty.COMBOBOX);
1615            chartTitlePositionProperty.setTags( new Tag[]{ new Tag("Top","Top"),
1616                                                           new Tag("Bottom","Bottom"),
1617                                                           new Tag("Left","Left"),
1618                                                           new Tag("Right","Right")});
1619            chartTitlePositionProperty.setValue( currentSelectedChartElement.getChart().getTitle().getPosition());
1620            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), chartTitlePositionProperty);
1621            
1622            ExpressionSheetProperty chartSubTitleProperty = new ExpressionSheetProperty("chartSubTitle",I18n.getString("chartPropertiesDialog.property.chartSubTitle","Chart subtitle expression"));
1623            chartSubTitleProperty.setValue( currentSelectedChartElement.getChart().getSubTitle().getTitleExpression());
1624            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), chartSubTitleProperty);
1625            
1626            FontSheetProperty chartSubTitleFontProperty = new FontSheetProperty("chartSubTitleFont",I18n.getString("chartPropertiesDialog.property.chartSubTitleFont","Chart subtitle font"));
1627            chartSubTitleFontProperty.setValue( currentSelectedChartElement.getChart().getSubTitle().getFont());
1628            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), chartSubTitleFontProperty);
1629            
1630            SheetProperty chartSubTitleColorProperty = new SheetProperty("chartSubTitleColor",I18n.getString("chartPropertiesDialog.property.chartSubTitleColor","Chart subtitle color"), SheetProperty.COLOR);
1631            chartSubTitleColorProperty.setValue( currentSelectedChartElement.getChart().getSubTitle().getColor());
1632            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), chartSubTitleColorProperty);
1633
1634            SheetProperty isShowLegendProperty = new SheetProperty("isShowLegend",I18n.getString("chartPropertiesDialog.property.isShowLegend","Show legend"), SheetProperty.BOOLEAN);
1635            isShowLegendProperty.setValue(new Boolean JavaDoc( currentSelectedChartElement.getChart().isShowLegend() ));
1636            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), isShowLegendProperty);
1637            
1638            // From jr 1.2.7 -------
1639
FontSheetProperty chartLegendFontProperty = new FontSheetProperty("chartLegendFont",I18n.getString("chartPropertiesDialog.property.chartLegendFont","Legend font"));
1640            chartLegendFontProperty.setShowResetButton(true);
1641            chartLegendFontProperty.setValue( currentSelectedChartElement.getChart().getLegend().getFont());
1642            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), chartLegendFontProperty);
1643            
1644            SheetProperty chartLegendTextColorProperty = new SheetProperty("chartLegendTextColor",I18n.getString("chartPropertiesDialog.property.chartLegendTextColor","Legend text color"), SheetProperty.COLOR);
1645            chartLegendTextColorProperty.setValue( currentSelectedChartElement.getChart().getLegend().getTextColor());
1646            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), chartLegendTextColorProperty);
1647            
1648            SheetProperty chartLegendBackgroundColorProperty = new SheetProperty("chartLegendBackgroundColor",I18n.getString("chartPropertiesDialog.property.chartLegendBackgroundColor","Legend background color"), SheetProperty.COLOR);
1649            chartLegendBackgroundColorProperty.setValue( currentSelectedChartElement.getChart().getLegend().getBackgroundColor());
1650            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), chartLegendBackgroundColorProperty);
1651            // end from jr 1.2.7 ------
1652

1653            SheetProperty plotOrientationProperty = new SheetProperty("orientation",I18n.getString("chartPropertiesDialog.property.orientation","Orientation"), SheetProperty.COMBOBOX);
1654            plotOrientationProperty.setTags( new Tag[]{ new Tag("Vertical","Vertical"),
1655                                                        new Tag("Horizontal","Horizontal")});
1656            plotOrientationProperty.setValue( currentSelectedChartElement.getChart().getPlot().getOrientation());
1657            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), plotOrientationProperty);
1658            
1659            SheetProperty chartBackcolorProperty = new SheetProperty("chartBackcolor",I18n.getString("chartPropertiesDialog.property.chartBackcolor","Backcolor"), SheetProperty.COLOR);
1660            chartBackcolorProperty.setValue( currentSelectedChartElement.getChart().getPlot().getBackcolor() );
1661            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), chartBackcolorProperty);
1662            
1663            SheetProperty backgroundAlphaProperty = new DoubleSheetProperty("backgroundAlpha",I18n.getString("chartPropertiesDialog.property.backgroundAlpha","Background Alpha (%)"));
1664            backgroundAlphaProperty.setValue( new Double JavaDoc(currentSelectedChartElement.getChart().getPlot().getBackgroundAlpha() ));
1665            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), backgroundAlphaProperty);
1666            
1667            SheetProperty foregroundAlphaProperty = new DoubleSheetProperty("foregroundAlpha",I18n.getString("chartPropertiesDialog.property.foregroundAlpha","Foreground Alpha (%)"));
1668            foregroundAlphaProperty.setValue( new Double JavaDoc(currentSelectedChartElement.getChart().getPlot().getForegroundAlpha() ));
1669            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), foregroundAlphaProperty);
1670            
1671            SheetProperty labelRotationProperty = new DoubleSheetProperty("labelRotation",I18n.getString("chartPropertiesDialog.property.labelRotation","Label rotation"));
1672            labelRotationProperty.setValue( new Double JavaDoc(currentSelectedChartElement.getChart().getPlot().getLabelRotation() ));
1673            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), labelRotationProperty);
1674            
1675            SheetProperty seriesColorsProperty = new SeriesColorsSheetProperty("seriesColors",I18n.getString("chartPropertiesDialog.property.seriesColors","Series colors"));
1676            seriesColorsProperty.setValue( currentSelectedChartElement.getChart().getPlot().getSeriesColors() );
1677            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), seriesColorsProperty);
1678            
1679            SheetProperty customizerClassProperty = new SheetProperty("customizerClass",I18n.getString("chartPropertiesDialog.property.customizerClass","Customizer class"), SheetProperty.STRING);
1680            customizerClassProperty.setValue( currentSelectedChartElement.getChart().getCustomizerClass());
1681            sheetPanel.addSheetProperty(I18n.getString("chartPropertiesDialog.propertySet.Common","Common"), customizerClassProperty);
1682            
1683            
1684        }
1685    }
1686
1687    public int getDialogResult() {
1688        return dialogResult;
1689    }
1690
1691    public void setDialogResult(int dialogResult) {
1692        this.dialogResult = dialogResult;
1693    }
1694
1695    public JReportFrame getJReportFrame() {
1696        return jReportFrame;
1697    }
1698
1699    public void setJReportFrame(JReportFrame jReportFrame) {
1700        this.jReportFrame = jReportFrame;
1701        
1702    }
1703    
1704     public void sheetPropertyValueChanged(SheetPropertyValueChangedEvent evt)
1705     {
1706         if (currentSelectedChartElement == null) return;
1707        
1708         String JavaDoc property = evt.getPropertyName();
1709         Plot currentPlot = currentSelectedChartElement.getChart().getPlot();
1710
1711         if (property.equals("chartTitle")) currentSelectedChartElement.getChart().getTitle().setTitleExpression( ""+evt.getNewValue() );
1712         else if (property.equals("chartTitleFont")) currentSelectedChartElement.getChart().getTitle().setFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1713         else if (property.equals("chartTitleColor")) currentSelectedChartElement.getChart().getTitle().setColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1714         else if (property.equals("chartTitlePosition")) currentSelectedChartElement.getChart().getTitle().setPosition( ""+evt.getNewValue() );
1715         else if (property.equals("chartSubTitle")) currentSelectedChartElement.getChart().getSubTitle().setTitleExpression( ""+evt.getNewValue() );
1716         else if (property.equals("chartSubTitleFont")) currentSelectedChartElement.getChart().getSubTitle().setFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1717         else if (property.equals("chartSubTitleColor")) currentSelectedChartElement.getChart().getSubTitle().setColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1718         else if (property.equals("isShowLegend")) currentSelectedChartElement.getChart().setShowLegend( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1719         else if (property.equals("chartLegendFont")) currentSelectedChartElement.getChart().getLegend().setFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1720         else if (property.equals("chartLegendTextColor")) currentSelectedChartElement.getChart().getLegend().setTextColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1721         else if (property.equals("chartLegendBackgroundColor")) currentSelectedChartElement.getChart().getLegend().setBackgroundColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1722         else if (property.equals("chartBackcolor")) currentPlot.setBackcolor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1723         else if (property.equals("orientation")) currentPlot.setOrientation( ""+evt.getNewValue() );
1724         else if (property.equals("seriesColors")) currentPlot.setSeriesColors( (java.util.List JavaDoc)evt.getNewValue() );
1725         else if (property.equals("customizerClass")) currentSelectedChartElement.getChart().setCustomizerClass( ""+evt.getNewValue() );
1726         else if (property.equals("backgroundAlpha")) {
1727             double newval = ((Double JavaDoc)evt.getNewValue()).doubleValue();
1728             if (newval < 0.0 || newval > 1.0)
1729             {
1730                 JOptionPane.showMessageDialog(this,
1731                         I18n.getString("messages.error.backGroundAlphaInvalidValue",
1732                         "Background Alpha must be a number between 0 and 1."),
1733                         I18n.getString("messages.error.valueNotValid","Value not valid"),JOptionPane.ERROR_MESSAGE);
1734                 sheetPanel.setPropertyValue(evt.getPropertyName(), evt.getOldValue() );
1735             }
1736             else
1737             {
1738                currentPlot.setBackgroundAlpha( ((Double JavaDoc)evt.getNewValue()).doubleValue());
1739             }
1740         }
1741         else if (property.equals("foregroundAlpha")){
1742             double newval = ((Double JavaDoc)evt.getNewValue()).doubleValue();
1743             if (newval < 0.0 || newval > 1.0)
1744             {
1745                 JOptionPane.showMessageDialog(this,
1746                         I18n.getString("messages.error.foreGroundAlphaInvalidValue","Foreground Alpha must be a number between 0 and 1."),
1747                         I18n.getString("messages.error.valueNotValid","Value not valid"),JOptionPane.ERROR_MESSAGE);
1748                 sheetPanel.setPropertyValue(evt.getPropertyName(), evt.getOldValue() );
1749             }
1750             else
1751             {
1752                currentPlot.setForegroundAlpha( ((Double JavaDoc)evt.getNewValue()).doubleValue());
1753             }
1754         }
1755         else if (property.equals("labelRotation")){
1756             double newval = ((Double JavaDoc)evt.getNewValue()).doubleValue();
1757             //if (newval < 0.0 || newval > 365)
1758
//{
1759
// JOptionPane.showMessageDialog(this,"Label rotation must be a number between 0 and 365.","Value not valid",JOptionPane.ERROR_MESSAGE);
1760
// sheetPanel.setPropertyValue(evt.getPropertyName(), evt.getOldValue() );
1761
//}
1762
//else
1763
//{
1764
currentPlot.setLabelRotation( ((Double JavaDoc)evt.getNewValue()).doubleValue());
1765             //}
1766
}
1767         else if (property.equals("depthFactor") && currentPlot instanceof Pie3DPlot) ((Pie3DPlot)currentPlot).setDepthFactor( ((Double JavaDoc)evt.getNewValue()).doubleValue() );
1768         
1769         else if (property.equals("isShowLabelsBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).setShowLabels( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1770         else if (property.equals("isShowTickMarksBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).setShowTickMarks( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1771         else if (property.equals("isShowTickLabelsBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).setShowTickLabels( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1772         else if (property.equals("categoryAxisLabelExpressionBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).setCategoryAxisLabelExpression( ""+evt.getNewValue() );
1773         else if (property.equals("valueAxisLabelExpressionBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).setValueAxisLabelExpression( ""+evt.getNewValue() );
1774         // Bar plot > categoryAxisFormat
1775
else if (property.equals("categoryAxisLabelColorBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).getCategoryAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1776         else if (property.equals("categoryAxisTickLabelColorBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).getCategoryAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1777         else if (property.equals("categoryAxisTickLabelMaskBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).getCategoryAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1778         else if (property.equals("categoryAxisLineColorBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).getCategoryAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1779         else if (property.equals("categoryAxisLabelFontBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).getCategoryAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1780         else if (property.equals("categoryAxisTickLabelFontBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).getCategoryAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1781         // Bar plot > valueAxisFormat
1782
else if (property.equals("valueAxisLabelColorBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).getValueAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1783         else if (property.equals("valueAxisTickLabelColorBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).getValueAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1784         else if (property.equals("valueAxisTickLabelMaskBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).getValueAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1785         else if (property.equals("valueAxisLineColorBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).getValueAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1786         else if (property.equals("valueAxisLabelFontBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).getValueAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1787         else if (property.equals("valueAxisTickLabelFontBarPlot") && currentPlot instanceof BarPlot) ((BarPlot)currentPlot).getValueAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1788         
1789         else if (property.equals("isShowLabelsBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).setShowLabels( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1790         else if (property.equals("xOffsetBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).setXOffset( ((Double JavaDoc)evt.getNewValue()).doubleValue() );
1791         else if (property.equals("yOffsetBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).setYOffset( ((Double JavaDoc)evt.getNewValue()).doubleValue() );
1792         else if (property.equals("categoryAxisLabelExpressionBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).setCategoryAxisLabelExpression( ""+evt.getNewValue() );
1793         else if (property.equals("valueAxisLabelExpressionBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).setValueAxisLabelExpression( ""+evt.getNewValue() );
1794         // Bar3D plot > categoryAxisFormat
1795
else if (property.equals("categoryAxisLabelColorBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).getCategoryAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1796         else if (property.equals("categoryAxisTickLabelColorBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).getCategoryAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1797         else if (property.equals("categoryAxisTickLabelMaskBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).getCategoryAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1798         else if (property.equals("categoryAxisLineColorBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).getCategoryAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1799         else if (property.equals("categoryAxisLabelFontBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).getCategoryAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1800         else if (property.equals("categoryAxisTickLabelFontBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).getCategoryAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1801         // Bar3D plot > valueAxisFormat
1802
else if (property.equals("valueAxisLabelColorBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).getValueAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1803         else if (property.equals("valueAxisTickLabelColorBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).getValueAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1804         else if (property.equals("valueAxisTickLabelMaskBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).getValueAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1805         else if (property.equals("valueAxisLineColorBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).getValueAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1806         else if (property.equals("valueAxisLabelFontBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).getValueAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1807         else if (property.equals("valueAxisTickLabelFontBar3DPlot") && currentPlot instanceof Bar3DPlot) ((Bar3DPlot)currentPlot).getValueAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1808         
1809         
1810         
1811         else if (property.equals("isShowLinesLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).setShowLines( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1812         else if (property.equals("isShowShapesLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).setShowShapes( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1813         else if (property.equals("categoryAxisLabelExpressionLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).setCategoryAxisLabelExpression( ""+evt.getNewValue() );
1814         else if (property.equals("valueAxisLabelExpressionLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).setValueAxisLabelExpression( ""+evt.getNewValue() );
1815         // Line plot > categoryAxisFormat
1816
else if (property.equals("categoryAxisLabelColorLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).getCategoryAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1817         else if (property.equals("categoryAxisTickLabelColorLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).getCategoryAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1818         else if (property.equals("categoryAxisTickLabelMaskLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).getCategoryAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1819         else if (property.equals("categoryAxisLineColorLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).getCategoryAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1820         else if (property.equals("categoryAxisLabelFontLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).getCategoryAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1821         else if (property.equals("categoryAxisTickLabelFontLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).getCategoryAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1822         // Line plot > valueAxisFormat
1823
else if (property.equals("valueAxisLabelColorLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).getValueAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1824         else if (property.equals("valueAxisTickLabelColorLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).getValueAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1825         else if (property.equals("valueAxisTickLabelMaskLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).getValueAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1826         else if (property.equals("valueAxisLineColorLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).getValueAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1827         else if (property.equals("valueAxisLabelFontLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).getValueAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1828         else if (property.equals("valueAxisTickLabelFontLinePlot") && currentPlot instanceof LinePlot) ((LinePlot)currentPlot).getValueAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1829         
1830         
1831         else if (property.equals("categoryAxisLabelExpressionAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).setCategoryAxisLabelExpression( ""+evt.getNewValue() );
1832         else if (property.equals("valueAxisLabelExpressionAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).setValueAxisLabelExpression( ""+evt.getNewValue() );
1833         // Area plot > categoryAxisFormat
1834
else if (property.equals("categoryAxisLabelColorAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).getCategoryAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1835         else if (property.equals("categoryAxisTickLabelColorAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).getCategoryAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1836         else if (property.equals("categoryAxisTickLabelMaskAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).getCategoryAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1837         else if (property.equals("categoryAxisLineColorAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).getCategoryAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1838         else if (property.equals("categoryAxisLabelFontAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).getCategoryAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1839         else if (property.equals("categoryAxisTickLabelFontAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).getCategoryAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1840         // Area plot > valueAxisFormat
1841
else if (property.equals("valueAxisLabelColorAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).getValueAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1842         else if (property.equals("valueAxisTickLabelColorAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).getValueAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1843         else if (property.equals("valueAxisTickLabelMaskAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).getValueAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1844         else if (property.equals("valueAxisLineColorAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).getValueAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1845         else if (property.equals("valueAxisLabelFontAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).getValueAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1846         else if (property.equals("valueAxisTickLabelFontAreaPlot") && currentPlot instanceof AreaPlot) ((AreaPlot)currentPlot).getValueAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1847         
1848         
1849         else if (property.equals("isShowLinesScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).setShowLines( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1850         else if (property.equals("isShowShapesScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).setShowShapes( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1851         else if (property.equals("xAxisLabelExpressionScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).setXAxisLabelExpression( ""+evt.getNewValue() );
1852         else if (property.equals("yAxisLabelExpressionScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).setYAxisLabelExpression( ""+evt.getNewValue() );
1853         // Scatter plot > categoryAxisFormat
1854
else if (property.equals("xAxisLabelColorScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).getXAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1855         else if (property.equals("xAxisTickLabelColorScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).getXAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1856         else if (property.equals("xAxisTickLabelMaskScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).getXAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1857         else if (property.equals("xAxisLineColorScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).getXAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1858         else if (property.equals("xAxisLabelFontScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).getXAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1859         else if (property.equals("xAxisTickLabelFontScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).getXAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1860         // Scatter plot > valueAxisFormat
1861
else if (property.equals("yAxisLabelColorScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).getYAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1862         else if (property.equals("yAxisTickLabelColorScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).getYAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1863         else if (property.equals("yAxisTickLabelMaskScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).getYAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1864         else if (property.equals("yAxisLineColorScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).getYAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1865         else if (property.equals("yAxisLabelFontScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).getYAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1866         else if (property.equals("yAxisTickLabelFontScatterPlot") && currentPlot instanceof ScatterPlot) ((ScatterPlot)currentPlot).getYAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1867         
1868         
1869         else if (property.equals("scaleTypeBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).setScaleType( ""+evt.getNewValue() );
1870         else if (property.equals("xAxisLabelExpressionBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).setXAxisLabelExpression( ""+evt.getNewValue() );
1871         else if (property.equals("yAxisLabelExpressionBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).setYAxisLabelExpression( ""+evt.getNewValue() );
1872         // Bubble plot > categoryAxisFormat
1873
else if (property.equals("xAxisLabelColorBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).getXAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1874         else if (property.equals("xAxisTickLabelColorBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).getXAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1875         else if (property.equals("xAxisTickLabelMaskBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).getXAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1876         else if (property.equals("xAxisLineColorBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).getXAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1877         else if (property.equals("xAxisLabelFontBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).getXAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1878         else if (property.equals("xAxisTickLabelFontBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).getXAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1879         // Bubble plot > valueAxisFormat
1880
else if (property.equals("yAxisLabelColorBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).getYAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1881         else if (property.equals("yAxisTickLabelColorBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).getYAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1882         else if (property.equals("yAxisTickLabelMaskBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).getYAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1883         else if (property.equals("yAxisLineColorBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).getYAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1884         else if (property.equals("yAxisLabelFontBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).getYAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1885         else if (property.equals("yAxisTickLabelFontBubblePlot") && currentPlot instanceof BubblePlot) ((BubblePlot)currentPlot).getYAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1886         
1887         
1888         else if (property.equals("isShowLinesTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).setShowLines( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1889         else if (property.equals("isShowShapesTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).setShowShapes( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1890         else if (property.equals("timeAxisLabelExpressionTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).setTimeAxisLabelExpression( ""+evt.getNewValue() );
1891         else if (property.equals("valueAxisLabelExpressionTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).setValueAxisLabelExpression( ""+evt.getNewValue() );
1892            // TimeSeriesPlot plot > categoryAxisFormat
1893
else if (property.equals("timeAxisLabelColorTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).getTimeAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1894         else if (property.equals("timeAxisTickLabelColorTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).getTimeAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1895         else if (property.equals("timeAxisTickLabelMaskTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).getTimeAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1896         else if (property.equals("timeAxisLineColorTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).getTimeAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1897         else if (property.equals("timeAxisLabelFontTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).getTimeAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1898         else if (property.equals("timeAxisTickLabelFontTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).getTimeAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1899         // TimeSeriesPlot plot > valueAxisFormat
1900
else if (property.equals("valueAxisLabelColorTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).getValueAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1901         else if (property.equals("valueAxisTickLabelColorTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).getValueAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1902         else if (property.equals("valueAxisTickLabelMaskTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).getValueAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1903         else if (property.equals("valueAxisLineColorTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).getValueAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1904         else if (property.equals("valueAxisLabelFontTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).getValueAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1905         else if (property.equals("valueAxisTickLabelFontTimeSeriesPlot") && currentPlot instanceof TimeSeriesPlot) ((TimeSeriesPlot)currentPlot).getValueAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1906         
1907         
1908         else if (property.equals("isShowOpenTicksHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).setShowOpenTicks( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1909         else if (property.equals("isShowCloseTicksHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).setShowCloseTicks( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1910         else if (property.equals("timeAxisLabelExpressionHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).setTimeAxisLabelExpression( ""+evt.getNewValue() );
1911         else if (property.equals("valueAxisLabelExpressionHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).setValueAxisLabelExpression( ""+evt.getNewValue() );
1912         // HighLowPlot plot > categoryAxisFormat
1913
else if (property.equals("timeAxisLabelColorHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).getTimeAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1914         else if (property.equals("timeAxisTickLabelColorHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).getTimeAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1915         else if (property.equals("timeAxisTickLabelMaskHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).getTimeAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1916         else if (property.equals("timeAxisLineColorHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).getTimeAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1917         else if (property.equals("timeAxisLabelFontHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).getTimeAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1918         else if (property.equals("timeAxisTickLabelFontHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).getTimeAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1919         // HighLowPlot plot > valueAxisFormat
1920
else if (property.equals("valueAxisLabelColorHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).getValueAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1921         else if (property.equals("valueAxisTickLabelColorHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).getValueAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1922         else if (property.equals("valueAxisTickLabelMaskHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).getValueAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1923         else if (property.equals("valueAxisLineColorHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).getValueAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1924         else if (property.equals("valueAxisLabelFontHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).getValueAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1925         else if (property.equals("valueAxisTickLabelFontHighLowPlot") && currentPlot instanceof HighLowPlot) ((HighLowPlot)currentPlot).getValueAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1926         
1927         
1928         else if (property.equals("isShowVolumeCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).setShowVolume( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1929         else if (property.equals("timeAxisLabelExpressionCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).setTimeAxisLabelExpression( ""+evt.getNewValue() );
1930         else if (property.equals("valueAxisLabelExpressionCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).setValueAxisLabelExpression( ""+evt.getNewValue() );
1931         // CandlestickPlot plot > categoryAxisFormat
1932
else if (property.equals("timeAxisLabelColorCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).getTimeAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1933         else if (property.equals("timeAxisTickLabelColorCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).getTimeAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1934         else if (property.equals("timeAxisTickLabelMaskCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).getTimeAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1935         else if (property.equals("timeAxisLineColorCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).getTimeAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1936         else if (property.equals("timeAxisLabelFontCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).getTimeAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1937         else if (property.equals("timeAxisTickLabelFontCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).getTimeAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1938         // CandlestickPlot plot > valueAxisFormat
1939
else if (property.equals("valueAxisLabelColorCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).getValueAxisFormat().setLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1940         else if (property.equals("valueAxisTickLabelColorCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).getValueAxisFormat().setTickLabelColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1941         else if (property.equals("valueAxisTickLabelMaskCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).getValueAxisFormat().setTickLabelMask( ""+evt.getNewValue() );
1942         else if (property.equals("valueAxisLineColorCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).getValueAxisFormat().setAxisLineColor( (java.awt.Color JavaDoc) ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1943         else if (property.equals("valueAxisLabelFontCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).getValueAxisFormat().setLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1944         else if (property.equals("valueAxisTickLabelFontCandlestickPlot") && currentPlot instanceof CandlestickPlot) ((CandlestickPlot)currentPlot).getValueAxisFormat().setTickLabelFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1945         
1946         else if (property.equals("shapeMeterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).setShape( "" + evt.getNewValue() );
1947         else if (property.equals("angleMeterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).setAngle( ((Integer JavaDoc)evt.getNewValue()).intValue() );
1948         else if (property.equals("unitsMeterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).setUnits( "" + evt.getNewValue() );
1949         else if (property.equals("tickIntervalMeterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).setTickInterval( ((Double JavaDoc)evt.getNewValue()).doubleValue() );
1950         else if (property.equals("meterColorMaterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).setMeterColor( (java.awt.Color JavaDoc)ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1951         else if (property.equals("needleColorMaterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).setNeedleColor((java.awt.Color JavaDoc)ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1952         else if (property.equals("tickColorMaterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).setTickColor( (java.awt.Color JavaDoc)ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1953         else if (property.equals("vdColorMeterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).getValueDisplay().setColor( (java.awt.Color JavaDoc)ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1954         else if (property.equals("vdMaskMeterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).getValueDisplay().setMask( "" + evt.getNewValue() );
1955         else if (property.equals("vdFontMeterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).getValueDisplay().setFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1956         else if (property.equals("dataRangeLowExpressionMeterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).getDataRange().setLowExpression( "" + evt.getNewValue() );
1957         else if (property.equals("dataRangeHighExpressionMeterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).getDataRange().setHighExpression( "" + evt.getNewValue() );
1958         else if (property.equals("meterIntervalsMeterPlot") && currentPlot instanceof MeterPlot) ((MeterPlot)currentPlot).setMeterIntervals( (java.util.List JavaDoc)evt.getNewValue() );
1959        
1960         else if (property.equals("valueLocationThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).setValueLocation( "" + evt.getNewValue() );
1961         else if (property.equals("showValueLinesThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).setShowValueLines( ((Boolean JavaDoc)evt.getNewValue()).booleanValue() );
1962         else if (property.equals("mercuryColorThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).setMercuryColor( (java.awt.Color JavaDoc)ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1963         else if (property.equals("vdColorThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).getValueDisplay().setColor( (java.awt.Color JavaDoc)ColorSelectorPanel.parseColorString( ""+evt.getNewValue()) );
1964         else if (property.equals("vdMaskThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).getValueDisplay().setMask( "" + evt.getNewValue() );
1965         else if (property.equals("vdFontThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).getValueDisplay().setFont( (it.businesslogic.ireport.IReportFont)evt.getNewValue() );
1966         else if (property.equals("dataRangeLowExpressionThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).getDataRange().setLowExpression( "" + evt.getNewValue() );
1967         else if (property.equals("dataRangeHighExpressionThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).getDataRange().setHighExpression( "" + evt.getNewValue() );
1968         else if (property.equals("lowRangeLowExpressionThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).getLowRange().setLowExpression( "" + evt.getNewValue() );
1969         else if (property.equals("lowRangeHighExpressionThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).getLowRange().setHighExpression( "" + evt.getNewValue() );
1970         else if (property.equals("mediumRangeLowExpressionThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).getMediumRange().setLowExpression( "" + evt.getNewValue() );
1971         else if (property.equals("mediumRangeHighExpressionThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).getMediumRange().setHighExpression( "" + evt.getNewValue() );
1972         else if (property.equals("highRangeLowExpressionThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).getHighRange().setLowExpression( "" + evt.getNewValue() );
1973         else if (property.equals("highRangeHighExpressionThermometerPlot") && currentPlot instanceof ThermometerPlot) ((ThermometerPlot)currentPlot).getHighRange().setHighExpression( "" + evt.getNewValue() );
1974     }
1975     
1976     
1977     /**
1978     * This method update the comboboxes where is present the goup list.
1979     */

1980    public void updateGroups()
1981    {
1982
1983        if (it.businesslogic.ireport.gui.MainFrame.getMainInstance().getActiveReportFrame() == null)
1984    {
1985            jComboBoxResetGroup.removeAllItems();
1986            jComboBoxResetGroup.addItem("");
1987        }
1988        else
1989        {
1990            Misc.updateStringComboBox(jComboBoxResetGroup,
1991                                      it.businesslogic.ireport.gui.MainFrame.getMainInstance().getActiveReportFrame().getReport().getGroups(), true);
1992            Misc.updateStringComboBox(jComboBoxIncrementGroup,
1993                                      it.businesslogic.ireport.gui.MainFrame.getMainInstance().getActiveReportFrame().getReport().getGroups(), true);
1994        }
1995        
1996    }
1997    
1998    
1999    public void updateSubDatasets()
2000    {
2001
2002        if (it.businesslogic.ireport.gui.MainFrame.getMainInstance().getActiveReportFrame() == null)
2003    {
2004            jComboBoxSubDataset.removeAllItems();
2005            jComboBoxSubDataset.addItem("");
2006        }
2007        else
2008        {
2009            Misc.updateComboBox(jComboBoxSubDataset, it.businesslogic.ireport.gui.MainFrame.getMainInstance().getActiveReportFrame().getReport().getSubDatasets(), true);
2010        }
2011    }
2012    
2013    public void applyI18n()
2014        {
2015                // Start autogenerated code ----------------------
2016
jButtonAdd.setText(I18n.getString("chartPropertiesDialog.buttonAdd","Add"));
2017                jButtonAddParameter.setText(I18n.getString("chartPropertiesDialog.buttonAddParameter","Add"));
2018                jButtonClose.setText(I18n.getString("chartPropertiesDialog.buttonClose","Close"));
2019                jButtonDelete.setText(I18n.getString("chartPropertiesDialog.buttonDelete","Delete"));
2020                jButtonModParameter.setText(I18n.getString("chartPropertiesDialog.buttonModParameter","Modify"));
2021                jButtonModify.setText(I18n.getString("chartPropertiesDialog.buttonModify","Edit chart"));
2022                jButtonMoveDown.setText(I18n.getString("chartPropertiesDialog.buttonMoveDown","Move down"));
2023                jButtonMoveUp.setText(I18n.getString("chartPropertiesDialog.buttonMoveUp","Move up"));
2024                jButtonRemParameter.setText(I18n.getString("chartPropertiesDialog.buttonRemParameter","Remove"));
2025                jLabel26.setText(I18n.getString("chartPropertiesDialog.label26","Parameters Map Expression"));
2026                jLabel41.setText(I18n.getString("chartPropertiesDialog.label41","Connection / Datasource Expression"));
2027                jLabelIncrementType1.setText(I18n.getString("chartPropertiesDialog.labelIncrementType1","Sub dataset"));
2028                jLabelIncrementType2.setText(I18n.getString("chartPropertiesDialog.labelIncrementType2","Increment When expression"));
2029                // End autogenerated code ----------------------
2030
jTabbedPane1.setTitleAt(0, it.businesslogic.ireport.util.I18n.getString("gui.ChartPropertiesDialog.TabChartProperties","Chart properties"));
2031            jTabbedPane1.setTitleAt(1, it.businesslogic.ireport.util.I18n.getString("gui.ChartPropertiesDialog.TabChartData","Chart data"));
2032            jLabelTypeOfData.setText( it.businesslogic.ireport.util.I18n.getString("gui.ChartPropertiesDialog.LabelTypeOfDataset","Type of dataset"));
2033            jTabbedPaneData.setTitleAt(0, it.businesslogic.ireport.util.I18n.getString("gui.ChartPropertiesDialog.TabDataset","Dataset"));
2034            jTabbedPaneData.setTitleAt(1, it.businesslogic.ireport.util.I18n.getString("gui.ChartPropertiesDialog.TabDatasetDetails","Details"));
2035            
2036            jLabelResetType.setText( it.businesslogic.ireport.util.I18n.getString("resetType","Reset type"));
2037            jLabelResetGroup.setText( it.businesslogic.ireport.util.I18n.getString("resetGroup","Reset group"));
2038            jLabelIncrementType.setText( it.businesslogic.ireport.util.I18n.getString("incrementType","Increment type"));
2039            jLabelIncrementGroup.setText( it.businesslogic.ireport.util.I18n.getString("incrementGroup","Increment group"));
2040            
2041            jButtonCopy.setText( it.businesslogic.ireport.util.I18n.getString("charts.copyDataset","Copy dataset"));
2042            jButtonPaste.setText( it.businesslogic.ireport.util.I18n.getString("charts.pasteDataset","Paste dataset"));
2043            
2044            this.setTitle(it.businesslogic.ireport.util.I18n.getString("gui.ChartPropertiesDialog.title","Chart properties"));
2045            
2046            jTableDatasetParameters.getColumnModel().getColumn(0).setHeaderValue( I18n.getString("chartPropertiesDialog.tablecolumn.parameter","Parameter") );
2047            jTableDatasetParameters.getColumnModel().getColumn(1).setHeaderValue( I18n.getString("chartPropertiesDialog.tablecolumn.expression","Expression") );
2048            
2049            jTable1.getColumnModel().getColumn(0).setHeaderValue( I18n.getString("chartPropertiesDialog.tablecolumn.chart","Chart") );
2050            jTable1.getColumnModel().getColumn(1).setHeaderValue( I18n.getString("chartPropertiesDialog.tablecolumn.axisPosition","Axis position") );
2051                   
2052            jTabbedPaneSubDataset.setTitleAt(0, it.businesslogic.ireport.util.I18n.getString("datasetRun.tab.Parameters","Parameters"));
2053            jTabbedPaneSubDataset.setTitleAt(1, it.businesslogic.ireport.util.I18n.getString("datasetRun.tab.ParametersMapExp","Parameters map exp."));
2054            jTabbedPaneSubDataset.setTitleAt(2, it.businesslogic.ireport.util.I18n.getString("datasetRun.tab.ConnectionDatasourceExp","Connection/Datasource exp."));
2055            
2056            ((javax.swing.border.TitledBorder JavaDoc)jPanel1.getBorder()).setTitle( I18n.getString("datasetRun.panelBorder.DatasetRun","Dataset run") );
2057            
2058            this.getRootPane().updateUI();
2059        }
2060    
2061    private void setDatasetPanel( Dataset dataset )
2062    {
2063        jPanelDataDefinition.removeAll();
2064        
2065        java.awt.GridBagConstraints JavaDoc gridBagConstraints = new java.awt.GridBagConstraints JavaDoc();
2066        gridBagConstraints.gridx = 4;
2067        gridBagConstraints.gridy = 2;
2068        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
2069        gridBagConstraints.weightx = 1.0;
2070        gridBagConstraints.weighty = 1.0;
2071        gridBagConstraints.fill = gridBagConstraints.BOTH;
2072        gridBagConstraints.insets = new java.awt.Insets JavaDoc(4, 4, 4, 4);
2073                
2074        if (dataset instanceof TimePeriodDataset)
2075        {
2076             TimePeriodDatasetPanel pdp = new TimePeriodDatasetPanel();
2077             pdp.setTimePeriodDataset((TimePeriodDataset)dataset);
2078             this.jPanelDataDefinition.add(pdp, gridBagConstraints);
2079        }
2080        else if (dataset instanceof CategoryDataset)
2081        {
2082             CategoryDatasetPanel pdp = new CategoryDatasetPanel();
2083             pdp.setCategoryDataset((CategoryDataset)dataset);
2084             this.jPanelDataDefinition.add(pdp, gridBagConstraints);
2085        }
2086        else if (dataset instanceof PieDataset)
2087        {
2088             PieDatasetPanel pdp = new PieDatasetPanel();
2089             pdp.setPieDataset((PieDataset)dataset);
2090             this.jPanelDataDefinition.add(pdp, gridBagConstraints);
2091        }
2092        else if (dataset instanceof TimeSeriesDataset)
2093        {
2094             TimeSeriesDatasetPanel pdp = new TimeSeriesDatasetPanel();
2095             pdp.setTimeSeriesDataset((TimeSeriesDataset)dataset);
2096             this.jPanelDataDefinition.add(pdp, gridBagConstraints);
2097        }
2098        else if (dataset instanceof XYDataset)
2099        {
2100             XYDatasetPanel pdp = new XYDatasetPanel();
2101             pdp.setXYDataset((XYDataset)dataset);
2102             this.jPanelDataDefinition.add(pdp, gridBagConstraints);
2103        }
2104        else if (dataset instanceof XYZDataset)
2105        {
2106             XYZDatasetPanel pdp = new XYZDatasetPanel();
2107             pdp.setXYZDataset((XYZDataset)dataset);
2108             this.jPanelDataDefinition.add(pdp, gridBagConstraints);
2109        }
2110        else if (dataset instanceof HighLowDataset)
2111        {
2112            HighLowDatasetPanel pdp = new HighLowDatasetPanel();
2113             pdp.setHighLowDataset((HighLowDataset)dataset);
2114             this.jPanelDataDefinition.add(pdp, gridBagConstraints);
2115        }
2116        else if (dataset instanceof ValueDataset)
2117        {
2118            ValueDatasetPanel pdp = new ValueDatasetPanel();
2119             pdp.setValueDataset((ValueDataset)dataset);
2120             this.jPanelDataDefinition.add(pdp, gridBagConstraints);
2121        }
2122        
2123        Misc.setComboboxSelectedTagValue(jComboBoxTypeOfData, dataset.getClass().getName());
2124        
2125        if (dataset != null && dataset.getSubDataset() != null)
2126        {
2127            setDatasetSubDataset( dataset.getSubDataset() );
2128        }
2129        
2130        jPanelDataDefinition.updateUI();
2131    }
2132    
2133    
2134    /**
2135     * this method notifies a chart dataset panel the subdataset used to fill it
2136     */

2137    public void setDatasetSubDataset(SubDataset subdataset)
2138    {
2139        Component JavaDoc c = this.jPanelDataDefinition.getComponent(0);
2140        
2141        ((ChartDatasetPanel)c).setSubDataset( subdataset );
2142       
2143    }
2144    
2145    private void setPlotSheetProperties( Plot plot )
2146    {
2147        if (plot instanceof Pie3DPlot)
2148        {
2149             DoubleSheetProperty chartDepthFactorProperty = new DoubleSheetProperty("depthFactor",it.businesslogic.ireport.util.I18n.getString("charts.depthFactor","Depth factor"));
2150             chartDepthFactorProperty.setValue( new Double JavaDoc(((Pie3DPlot)plot).getDepthFactor()));
2151             sheetPanel.addSheetProperty("Pie3D plot", chartDepthFactorProperty);
2152        }
2153        else if (plot instanceof BarPlot)
2154        {
2155             SheetProperty isShowLabelsProperty = new SheetProperty("isShowLabelsBarPlot",it.businesslogic.ireport.util.I18n.getString("charts.isShowLabelsBarPlot","Show labels"), SheetProperty.BOOLEAN);
2156                isShowLabelsProperty.setValue( new Boolean JavaDoc(((BarPlot)plot).isShowLabels()) );
2157                sheetPanel.addSheetProperty("Bar plot", isShowLabelsProperty);
2158                
2159                SheetProperty isShowTickMarksProperty = new SheetProperty("isShowTickMarksBarPlot",it.businesslogic.ireport.util.I18n.getString("charts.isShowTickMarksBarPlot","Show tick marks"), SheetProperty.BOOLEAN);
2160                isShowTickMarksProperty.setValue( new Boolean JavaDoc(((BarPlot)plot).isShowTickMarks()) );
2161                sheetPanel.addSheetProperty("Bar plot", isShowTickMarksProperty);
2162                
2163                SheetProperty isShowTickLabelsProperty = new SheetProperty("isShowTickLabelsBarPlot",it.businesslogic.ireport.util.I18n.getString("charts.isShowTickLabelsBarPlot","Show tick labels"), SheetProperty.BOOLEAN);
2164                isShowTickLabelsProperty.setValue( new Boolean JavaDoc(((BarPlot)plot).isShowTickLabels()) );
2165                sheetPanel.addSheetProperty("Bar plot", isShowTickLabelsProperty);
2166                
2167                ExpressionSheetProperty categoryAxisLabelExpressionProperty = new ExpressionSheetProperty("categoryAxisLabelExpressionBarPlot",it.businesslogic.ireport.util.I18n.getString("charts.categoryAxisLabelExpressionPlot","Category axis label expression"));
2168                categoryAxisLabelExpressionProperty.setValue( ((BarPlot)plot).getCategoryAxisLabelExpression() );
2169                sheetPanel.addSheetProperty("Bar plot", categoryAxisLabelExpressionProperty);
2170            
2171                addAxisFormatEntries("category", ((BarPlot)plot).getCategoryAxisFormat(), "Bar plot", "BarPlot");
2172                
2173                ExpressionSheetProperty valueAxisLabelExpressionProperty = new ExpressionSheetProperty("valueAxisLabelExpressionBarPlot",it.businesslogic.ireport.util.I18n.getString("charts.valueAxisLabelExpressionPlot","Value axis label expression"));
2174                valueAxisLabelExpressionProperty.setValue( ((BarPlot)plot).getValueAxisLabelExpression() );
2175                sheetPanel.addSheetProperty("Bar plot", valueAxisLabelExpressionProperty);
2176                
2177                addAxisFormatEntries("value", ((BarPlot)plot).getValueAxisFormat(), "Bar plot", "BarPlot");
2178        }
2179        else if (plot instanceof Bar3DPlot)
2180        {
2181                SheetProperty isShowLabelsProperty = new SheetProperty("isShowLabelsBar3DPlot","Show labels", SheetProperty.BOOLEAN);
2182                isShowLabelsProperty.setValue( new Boolean JavaDoc(((Bar3DPlot)plot).isShowLabels()) );
2183                sheetPanel.addSheetProperty("Bar3D plot", isShowLabelsProperty);
2184                
2185                DoubleSheetProperty yOffsetProperty = new DoubleSheetProperty("xOffsetBar3DPlot","X offset");
2186                yOffsetProperty.setValue( new Double JavaDoc(((Bar3DPlot)plot).getXOffset()));
2187                sheetPanel.addSheetProperty("Bar3D plot", yOffsetProperty);
2188                
2189                DoubleSheetProperty xOffsetProperty = new DoubleSheetProperty("yOffsetBar3DPlot","Y offset");
2190                xOffsetProperty.setValue( new Double JavaDoc(((Bar3DPlot)plot).getYOffset()));
2191                sheetPanel.addSheetProperty("Bar3D plot", xOffsetProperty);
2192                
2193                ExpressionSheetProperty categoryAxisLabelExpressionProperty = new ExpressionSheetProperty("categoryAxisLabelExpressionBar3DPlot",it.businesslogic.ireport.util.I18n.getString("charts.categoryAxisLabelExpressionPlot","Category axis label expression"));
2194                categoryAxisLabelExpressionProperty.setValue( ((Bar3DPlot)plot).getCategoryAxisLabelExpression() );
2195                sheetPanel.addSheetProperty("Bar3D plot", categoryAxisLabelExpressionProperty);
2196            
2197                addAxisFormatEntries("category", ((Bar3DPlot)plot).getCategoryAxisFormat(), "Bar3D plot", "Bar3DPlot");
2198                
2199                ExpressionSheetProperty valueAxisLabelExpressionProperty = new ExpressionSheetProperty("valueAxisLabelExpressionBar3DPlot",it.businesslogic.ireport.util.I18n.getString("charts.valueAxisLabelExpressionPlot","Value axis label expression"));
2200                valueAxisLabelExpressionProperty.setValue( ((Bar3DPlot)plot).getValueAxisLabelExpression() );
2201                sheetPanel.addSheetProperty("Bar3D plot", valueAxisLabelExpressionProperty);
2202                
2203                addAxisFormatEntries("value", ((Bar3DPlot)plot).getValueAxisFormat(), "Bar3D plot", "Bar3DPlot");
2204        }
2205        else if (plot instanceof LinePlot)
2206        {
2207                SheetProperty isShowLinesProperty = new SheetProperty("isShowLinesLinePlot",it.businesslogic.ireport.util.I18n.getString("charts.isShowLinesPlot","Show lines"), SheetProperty.BOOLEAN);
2208                isShowLinesProperty.setValue( new Boolean JavaDoc(((LinePlot)plot).isShowLines()) );
2209                sheetPanel.addSheetProperty("Line plot", isShowLinesProperty);
2210                
2211                SheetProperty isShowShapesProperty = new SheetProperty("isShowShapesLinePlot",it.businesslogic.ireport.util.I18n.getString("charts.isShowShapesPlot","Show shapes"), SheetProperty.BOOLEAN);
2212                isShowShapesProperty.setValue( new Boolean JavaDoc(((LinePlot)plot).isShowShapes()) );
2213                sheetPanel.addSheetProperty("Line plot", isShowShapesProperty);
2214                
2215                ExpressionSheetProperty categoryAxisLabelExpressionProperty = new ExpressionSheetProperty("categoryAxisLabelExpressionLinePlot",it.businesslogic.ireport.util.I18n.getString("charts.categoryAxisLabelExpressionPlot","Category axis label expression"));
2216                categoryAxisLabelExpressionProperty.setValue( ((LinePlot)plot).getCategoryAxisLabelExpression() );
2217                sheetPanel.addSheetProperty("Line plot", categoryAxisLabelExpressionProperty);
2218            
2219                addAxisFormatEntries("category", ((LinePlot)plot).getCategoryAxisFormat(), "Line plot", "LinePlot");
2220                
2221                ExpressionSheetProperty valueAxisLabelExpressionProperty = new ExpressionSheetProperty("valueAxisLabelExpressionLinePlot",it.businesslogic.ireport.util.I18n.getString("charts.valueAxisLabelExpressionPlot","Value axis label expression"));
2222                valueAxisLabelExpressionProperty.setValue( ((LinePlot)plot).getValueAxisLabelExpression() );
2223                sheetPanel.addSheetProperty("Line plot", valueAxisLabelExpressionProperty);
2224                
2225                addAxisFormatEntries("value", ((LinePlot)plot).getValueAxisFormat(), "Line plot", "LinePlot");
2226                
2227                
2228                
2229        }
2230        else if (plot instanceof AreaPlot)
2231        {
2232                ExpressionSheetProperty categoryAxisLabelExpressionProperty = new ExpressionSheetProperty("categoryAxisLabelExpressionAreaPlot",it.businesslogic.ireport.util.I18n.getString("charts.categoryAxisLabelExpressionPlot","Category axis label expression"));
2233                categoryAxisLabelExpressionProperty.setValue( ((AreaPlot)plot).getCategoryAxisLabelExpression() );
2234                sheetPanel.addSheetProperty("Area plot", categoryAxisLabelExpressionProperty);
2235                
2236                addAxisFormatEntries("category", ((AreaPlot)plot).getCategoryAxisFormat(), "Area plot", "AreaPlot");
2237            
2238                ExpressionSheetProperty valueAxisLabelExpressionProperty = new ExpressionSheetProperty("valueAxisLabelExpressionAreaPlot",it.businesslogic.ireport.util.I18n.getString("charts.valueAxisLabelExpressionPlot","Value axis label expression"));
2239                valueAxisLabelExpressionProperty.setValue( ((AreaPlot)plot).getValueAxisLabelExpression() );
2240                sheetPanel.addSheetProperty("Area plot", valueAxisLabelExpressionProperty);
2241                
2242                addAxisFormatEntries("value", ((AreaPlot)plot).getValueAxisFormat(), "Area plot", "AreaPlot");
2243        }
2244        else if (plot instanceof ScatterPlot)
2245        {
2246                SheetProperty isShowLinesProperty = new SheetProperty("isShowLinesScatterPlot",it.businesslogic.ireport.util.I18n.getString("charts.isShowLinesPlot","Show lines"), SheetProperty.BOOLEAN);
2247                isShowLinesProperty.setValue( new Boolean JavaDoc(((ScatterPlot)plot).isShowLines()) );
2248                sheetPanel.addSheetProperty("Scatter plot", isShowLinesProperty);
2249                
2250                SheetProperty isShowShapesProperty = new SheetProperty("isShowShapesScatterPlot",it.businesslogic.ireport.util.I18n.getString("charts.isShowShapesPlot","Show shapes"), SheetProperty.BOOLEAN);
2251                isShowShapesProperty.setValue( new Boolean JavaDoc(((ScatterPlot)plot).isShowShapes()) );
2252                sheetPanel.addSheetProperty("Scatter plot", isShowShapesProperty);
2253                
2254                ExpressionSheetProperty categoryAxisLabelExpressionProperty = new ExpressionSheetProperty("xAxisLabelExpressionScatterPlot",it.businesslogic.ireport.util.I18n.getString("charts.xAxisLabelExpressionPlot","X axis label expression"));
2255                categoryAxisLabelExpressionProperty.setValue( ((ScatterPlot)plot).getXAxisLabelExpression() );
2256                sheetPanel.addSheetProperty("Scatter plot", categoryAxisLabelExpressionProperty);
2257            
2258                addAxisFormatEntries("x", ((ScatterPlot)plot).getXAxisFormat(), "Scatter plot", "ScatterPlot");
2259            
2260                ExpressionSheetProperty valueAxisLabelExpressionProperty = new ExpressionSheetProperty("yAxisLabelExpressionScatterPlot",it.businesslogic.ireport.util.I18n.getString("charts.yAxisLabelExpressionPlot","Y axis label expression"));
2261                valueAxisLabelExpressionProperty.setValue( ((ScatterPlot)plot).getYAxisLabelExpression() );
2262                sheetPanel.addSheetProperty("Scatter plot", valueAxisLabelExpressionProperty);
2263                
2264                addAxisFormatEntries("y", ((ScatterPlot)plot).getYAxisFormat(), "Scatter plot", "ScatterPlot");
2265            
2266        }
2267        else if (plot instanceof BubblePlot)
2268        {
2269                //BothAxes | DomainAxis | RangeAxis
2270
SheetProperty scaleTypeProperty = new SheetProperty("scaleTypeBubblePlot",it.businesslogic.ireport.util.I18n.getString("charts.scaleTypeBubblePlot","Scale type"), SheetProperty.COMBOBOX);
2271                scaleTypeProperty.setTags( new Tag[]{ new Tag("BothAxes",it.businesslogic.ireport.util.I18n.getString("charts.scaleType.BothAxes","Both axes")),
2272                                                           new Tag("DomainAxis",it.businesslogic.ireport.util.I18n.getString("charts.scaleType.DomainAxis","Domain axis")),
2273                                                           new Tag("RangeAxis",it.businesslogic.ireport.util.I18n.getString("charts.scaleType.RangeAxis","Range axis"))});
2274               scaleTypeProperty.setValue( ((BubblePlot)plot).getScaleType() );
2275               sheetPanel.addSheetProperty("Bubble plot", scaleTypeProperty);
2276                
2277                ExpressionSheetProperty categoryAxisLabelExpressionProperty = new ExpressionSheetProperty("xAxisLabelExpressionBubblePlot",it.businesslogic.ireport.util.I18n.getString("charts.xAxisLabelExpressionPlot","X axis label expression"));
2278                categoryAxisLabelExpressionProperty.setValue( ((BubblePlot)plot).getXAxisLabelExpression() );
2279                sheetPanel.addSheetProperty("Bubble plot", categoryAxisLabelExpressionProperty);
2280                
2281                addAxisFormatEntries("x", ((BubblePlot)plot).getXAxisFormat(), "Bubble plot", "BubblePlot");
2282            
2283                ExpressionSheetProperty valueAxisLabelExpressionProperty = new ExpressionSheetProperty("yAxisLabelExpressionBubblePlot",it.businesslogic.ireport.util.I18n.getString("charts.yAxisLabelExpressionPlot","Y axis label expression"));
2284                valueAxisLabelExpressionProperty.setValue( ((BubblePlot)plot).getYAxisLabelExpression() );
2285                sheetPanel.addSheetProperty("Bubble plot", valueAxisLabelExpressionProperty);
2286                
2287                addAxisFormatEntries("y", ((BubblePlot)plot).getYAxisFormat(), "Bubble plot", "BubblePlot");
2288            
2289        }
2290        else if (plot instanceof TimeSeriesPlot)
2291        {
2292                SheetProperty isShowLinesProperty = new SheetProperty("isShowLinesTimeSeriesPlot",it.businesslogic.ireport.util.I18n.getString("charts.isShowLinesPlot","Show lines"), SheetProperty.BOOLEAN);
2293                isShowLinesProperty.setValue( new Boolean JavaDoc(((TimeSeriesPlot)plot).isShowLines()) );
2294                sheetPanel.addSheetProperty("Time series plot", isShowLinesProperty);
2295                
2296                SheetProperty isShowShapesProperty = new SheetProperty("isShowShapesTimeSeriesPlot",it.businesslogic.ireport.util.I18n.getString("charts.isShowShapesPlot","Show shapes"), SheetProperty.BOOLEAN);
2297                isShowShapesProperty.setValue( new Boolean JavaDoc(((TimeSeriesPlot)plot).isShowShapes()) );
2298                sheetPanel.addSheetProperty("Time series plot", isShowShapesProperty);
2299                
2300                ExpressionSheetProperty timeAxisLabelExpressionProperty = new ExpressionSheetProperty("timeAxisLabelExpressionTimeSeriesPlot",it.businesslogic.ireport.util.I18n.getString("charts.timeAxisLabelExpressionPlot","Time axis label expression"));
2301                timeAxisLabelExpressionProperty.setValue( ((TimeSeriesPlot)plot).getTimeAxisLabelExpression() );
2302                sheetPanel.addSheetProperty("Time series plot", timeAxisLabelExpressionProperty);
2303            
2304                addAxisFormatEntries("time", ((TimeSeriesPlot)plot).getTimeAxisFormat(), "Time series plot", "TimeSeriesPlot");
2305                
2306                ExpressionSheetProperty valueAxisLabelExpressionProperty = new ExpressionSheetProperty("valueAxisLabelExpressionTimeSeriesPlot",it.businesslogic.ireport.util.I18n.getString("charts.valueAxisLabelExpressionPlot","Value axis label expression"));
2307                valueAxisLabelExpressionProperty.setValue( ((TimeSeriesPlot)plot).getValueAxisLabelExpression() );
2308                sheetPanel.addSheetProperty("Time series plot", valueAxisLabelExpressionProperty);
2309                
2310                addAxisFormatEntries("value", ((TimeSeriesPlot)plot).getValueAxisFormat(), "Time series plot", "TimeSeriesPlot");
2311        
2312        }
2313        else if (plot instanceof HighLowPlot)
2314        {
2315                SheetProperty isShowLinesProperty = new SheetProperty("isShowCloseTicksHighLowPlot",it.businesslogic.ireport.util.I18n.getString("charts.isShowCloseTicksPlot","Show close ticks"), SheetProperty.BOOLEAN);
2316                isShowLinesProperty.setValue( new Boolean JavaDoc(((HighLowPlot)plot).isShowCloseTicks()) );
2317                sheetPanel.addSheetProperty("High low plot", isShowLinesProperty);
2318                
2319                SheetProperty isShowShapesProperty = new SheetProperty("isShowOpenTicksHighLowPlot",it.businesslogic.ireport.util.I18n.getString("charts.isShowOpenTicksPlot","Show open ticks"), SheetProperty.BOOLEAN);
2320                isShowShapesProperty.setValue( new Boolean JavaDoc(((HighLowPlot)plot).isShowOpenTicks()) );
2321                sheetPanel.addSheetProperty("High low plot", isShowShapesProperty);
2322                
2323                ExpressionSheetProperty timeAxisLabelExpressionProperty = new ExpressionSheetProperty("timeAxisLabelExpressionHighLowPlot",it.businesslogic.ireport.util.I18n.getString("charts.timeAxisLabelExpressionPlot","Time axis label expression"));
2324                timeAxisLabelExpressionProperty.setValue( ((HighLowPlot)plot).getTimeAxisLabelExpression() );
2325                sheetPanel.addSheetProperty("High low plot", timeAxisLabelExpressionProperty);
2326            
2327                addAxisFormatEntries("time", ((HighLowPlot)plot).getTimeAxisFormat(), "High low plot", "HighLowPlot");
2328                
2329                ExpressionSheetProperty valueAxisLabelExpressionProperty = new ExpressionSheetProperty("valueAxisLabelExpressionHighLowPlot",it.businesslogic.ireport.util.I18n.getString("charts.valueAxisLabelExpressionPlot","Value axis label expression"));
2330                valueAxisLabelExpressionProperty.setValue( ((HighLowPlot)plot).getValueAxisLabelExpression() );
2331                sheetPanel.addSheetProperty("High low plot", valueAxisLabelExpressionProperty);
2332        
2333                addAxisFormatEntries("value", ((HighLowPlot)plot).getValueAxisFormat(), "High low plot", "HighLowPlot");
2334                
2335        }
2336        else if (plot instanceof CandlestickPlot)
2337        {
2338                SheetProperty isShowVolumeProperty = new SheetProperty("isShowVolumeCandlestickPlot",it.businesslogic.ireport.util.I18n.getString("charts.isShowVolumePlot","Show volume"), SheetProperty.BOOLEAN);
2339                isShowVolumeProperty.setValue( new Boolean JavaDoc(((CandlestickPlot)plot).isShowVolume()) );
2340                sheetPanel.addSheetProperty("Candlestick plot", isShowVolumeProperty);
2341                
2342                ExpressionSheetProperty timeAxisLabelExpressionProperty = new ExpressionSheetProperty("timeAxisLabelExpressionCandlestickPlot",it.businesslogic.ireport.util.I18n.getString("charts.timeAxisLabelExpressionPlot","Time axis label expression"));
2343                timeAxisLabelExpressionProperty.setValue( ((CandlestickPlot)plot).getTimeAxisLabelExpression() );
2344                sheetPanel.addSheetProperty("Candlestick plot", timeAxisLabelExpressionProperty);
2345            
2346                addAxisFormatEntries("time", ((CandlestickPlot)plot).getTimeAxisFormat(), "Candlestick plot", "CandlestickPlot");
2347                
2348                ExpressionSheetProperty valueAxisLabelExpressionProperty = new ExpressionSheetProperty("valueAxisLabelExpressionCandlestickPlot",it.businesslogic.ireport.util.I18n.getString("charts.valueAxisLabelExpressionPlot","Value axis label expression"));
2349                valueAxisLabelExpressionProperty.setValue( ((CandlestickPlot)plot).getValueAxisLabelExpression() );
2350                sheetPanel.addSheetProperty("Candlestick plot", valueAxisLabelExpressionProperty);
2351        
2352                addAxisFormatEntries("value", ((CandlestickPlot)plot).getValueAxisFormat(), "Candlestick plot", "CandlestickPlot");
2353        }
2354        else if (plot instanceof MeterPlot)
2355        {
2356                SheetProperty shapeProperty = new SheetProperty("shapeMeterPlot",it.businesslogic.ireport.util.I18n.getString("charts.shapeMeterPlot","Shape"), SheetProperty.COMBOBOX);
2357                shapeProperty.setTags( new Tag[]{ new Tag("chord",it.businesslogic.ireport.util.I18n.getString("charts.shape.Chord","Chord")),
2358                                                           new Tag("circle",it.businesslogic.ireport.util.I18n.getString("charts.shape.Circle","Circle")),
2359                                                           new Tag("pie",it.businesslogic.ireport.util.I18n.getString("charts.shape.Pie","Pie"))});
2360                shapeProperty.setValue( ((MeterPlot)plot).getShape() );
2361                sheetPanel.addSheetProperty("Meter plot", shapeProperty);
2362                
2363                SheetProperty angleProperty = new SheetProperty("angleMeterPlot",it.businesslogic.ireport.util.I18n.getString("charts.angle","Angle"), SheetProperty.INTEGER);
2364                angleProperty.setValue( new Integer JavaDoc(((MeterPlot)plot).getAngle()));
2365                sheetPanel.addSheetProperty("Meter plot", angleProperty);
2366                
2367                SheetProperty unitsProperty = new SheetProperty("unitsMeterPlot",it.businesslogic.ireport.util.I18n.getString("charts.units","Units"), SheetProperty.STRING);
2368                unitsProperty.setValue( ((MeterPlot)plot).getUnits() );
2369                sheetPanel.addSheetProperty("Meter plot", unitsProperty);
2370                
2371                DoubleSheetProperty tickIntervalProperty = new DoubleSheetProperty("tickIntervalMeterPlot",it.businesslogic.ireport.util.I18n.getString("charts.tickInterval","Tick interval"));
2372                tickIntervalProperty.setValue( new Double JavaDoc(((MeterPlot)plot).getTickInterval()));
2373                sheetPanel.addSheetProperty("Meter plot", tickIntervalProperty);
2374                
2375                SheetProperty meterColorProperty = new SheetProperty("meterColorMaterPlot",it.businesslogic.ireport.util.I18n.getString("charts.meterColor","Meter color"), SheetProperty.COLOR);
2376                meterColorProperty.setValue( ((MeterPlot)plot).getMeterColor() );
2377                sheetPanel.addSheetProperty("Meter plot", meterColorProperty);
2378                
2379                SheetProperty needleColorProperty = new SheetProperty("needleColorMaterPlot",it.businesslogic.ireport.util.I18n.getString("charts.needleColor","Needle color"), SheetProperty.COLOR);
2380                needleColorProperty.setValue( ((MeterPlot)plot).getNeedleColor() );
2381                sheetPanel.addSheetProperty("Meter plot", needleColorProperty);
2382                
2383                SheetProperty tickColorProperty = new SheetProperty("tickColorMaterPlot",it.businesslogic.ireport.util.I18n.getString("charts.tickColor","Tick color"), SheetProperty.COLOR);
2384                tickColorProperty.setValue( ((MeterPlot)plot).getTickColor() );
2385                sheetPanel.addSheetProperty("Meter plot", tickColorProperty);
2386                
2387                addValueDisplayEntries(((MeterPlot)plot).getValueDisplay(),"Meter plot", "MeterPlot");
2388                
2389                addDataRangeEntries("data", ((MeterPlot)plot).getDataRange(), "Meter plot", "MeterPlot");
2390                
2391                SheetProperty meterIntervalsSheetProperty = new MeterIntervalsSheetProperty("meterIntervalsMeterPlot",it.businesslogic.ireport.util.I18n.getString("charts.meterIntervals","Meter intervals"));
2392                meterIntervalsSheetProperty.setValue( ((MeterPlot)plot).getMeterIntervals() );
2393                sheetPanel.addSheetProperty("Meter plot", meterIntervalsSheetProperty);
2394            
2395                
2396        }
2397        else if (plot instanceof ThermometerPlot)
2398        {
2399                SheetProperty shapeProperty = new SheetProperty("valueLocationThermometerPlot",it.businesslogic.ireport.util.I18n.getString("charts.valuelocation","Value location"), SheetProperty.COMBOBOX);
2400                shapeProperty.setTags( new Tag[]{ new Tag("none",it.businesslogic.ireport.util.I18n.getString("charts.valuelocation.none","None")),
2401                                                           new Tag("left",it.businesslogic.ireport.util.I18n.getString("charts.valuelocation.left","Left")),
2402                                                           new Tag("right",it.businesslogic.ireport.util.I18n.getString("charts.valuelocation.right","Right")),
2403                                                           new Tag("bulb",it.businesslogic.ireport.util.I18n.getString("charts.valuelocation.bulb","Bulb"))});
2404                shapeProperty.setValue( ((ThermometerPlot)plot).getValueLocation() );
2405                sheetPanel.addSheetProperty("Thermometer plot", shapeProperty);
2406                
2407                SheetProperty showValueLinesProperty = new SheetProperty("showValueLinesThermometerPlot",it.businesslogic.ireport.util.I18n.getString("charts.showValueLines","Show value lines"), SheetProperty.BOOLEAN);
2408                showValueLinesProperty.setValue( new Boolean JavaDoc( ((ThermometerPlot)plot).isShowValueLines() ) );
2409                sheetPanel.addSheetProperty("Thermometer plot", showValueLinesProperty);
2410                
2411                SheetProperty mercuryColorProperty = new SheetProperty("mercuryColorThermometerPlot",it.businesslogic.ireport.util.I18n.getString("charts.mercuryColor","Mercury color"), SheetProperty.COLOR);
2412                mercuryColorProperty.setValue( ((ThermometerPlot)plot).getMercuryColor() );
2413                sheetPanel.addSheetProperty("Thermometer plot", mercuryColorProperty);
2414                
2415                addValueDisplayEntries(((ThermometerPlot)plot).getValueDisplay(),"Thermometer plot", "ThermometerPlot");
2416                
2417                addDataRangeEntries("data", ((ThermometerPlot)plot).getDataRange(), "Thermometer plot", "ThermometerPlot");
2418                
2419                addDataRangeEntries("low", ((ThermometerPlot)plot).getLowRange(), "Thermometer plot", "ThermometerPlot");
2420                
2421                addDataRangeEntries("medium", ((ThermometerPlot)plot).getMediumRange(), "Thermometer plot", "ThermometerPlot");
2422                
2423                addDataRangeEntries("high", ((ThermometerPlot)plot).getHighRange(), "Thermometer plot", "ThermometerPlot");
2424                
2425        }
2426
2427    }
2428
2429    public boolean isInit() {
2430        return init || (currentSelectedChartElement == null);
2431    }
2432
2433    public void setInit(boolean init) {
2434        this.init = init;
2435    }
2436    
2437 /**
2438 * Quick way to add a set of properties related to a ValueDisplay.<br>
2439 * Property name: property[propertyNamePostfix]
2440 *
2441 * @param axisFormat AxisFormat, the AxisFormat object from which take values
2442 * @param categoryName String, the sheet category name. I.e. Line Plot
2443 * @param propertyNamePostfix String, the value that complets the property name, i.e. LinePlot, BarPlot, ....
2444 */

2445   public void addValueDisplayEntries(ValueDisplay valueDisplay, String JavaDoc categoryName, String JavaDoc propertyNamePostfix)
2446    {
2447                SheetProperty vdColorProperty = new SheetProperty("vdColor" + propertyNamePostfix,it.businesslogic.ireport.util.I18n.getString("charts.valueColor","Value color"), SheetProperty.COLOR);
2448                vdColorProperty.setValue( valueDisplay.getColor() );
2449                sheetPanel.addSheetProperty(categoryName, vdColorProperty);
2450                
2451                SheetProperty vdMaskProperty = new SheetProperty("vdMask" + propertyNamePostfix,it.businesslogic.ireport.util.I18n.getString("charts.valueMask","Value mask"), SheetProperty.STRING);
2452                vdMaskProperty.setValue( valueDisplay.getMask());
2453                sheetPanel.addSheetProperty(categoryName, vdMaskProperty);
2454            
2455                FontSheetProperty vdFontProperty = new FontSheetProperty("vdFont" + propertyNamePostfix,it.businesslogic.ireport.util.I18n.getString("charts.valueFont","Value font"));
2456                vdFontProperty.setValue( valueDisplay.getFont() );
2457                sheetPanel.addSheetProperty(categoryName, vdFontProperty);
2458    }
2459   
2460   /**
2461 * Quick way to add a set of properties related to an AxisFormat.<br>
2462 * Property name: [axis]Property[propertyNamePostfix]
2463 *
2464 * @param axisType String, a name in {category, value, x, y, time}
2465 * @param axisFormat AxisFormat, the AxisFormat object from which take values
2466 * @param categoryName String, the sheet category name. I.e. Line Plot
2467 * @param propertyNamePostfix String, the value that complets the property name, i.e. LinePlot, BarPlot, ....
2468 */

2469   public void addAxisFormatEntries(String JavaDoc axisType, AxisFormat axisFormat, String JavaDoc categoryName, String JavaDoc propertyNamePostfix)
2470    {
2471        // ---- Category Axis Format -----
2472

2473                SheetProperty categoryAxisLabelColorPlot = new SheetProperty(axisType + "AxisLabelColor" + propertyNamePostfix,it.businesslogic.ireport.util.I18n.getString("charts." + axisType + "AxisLabelColorPlot","Category axis label color"), SheetProperty.COLOR);
2474                categoryAxisLabelColorPlot.setValue( axisFormat.getLabelColor() );
2475                sheetPanel.addSheetProperty(categoryName, categoryAxisLabelColorPlot);
2476                
2477                SheetProperty categoryAxisTickLabelColorPlot = new SheetProperty(axisType + "AxisTickLabelColor" + propertyNamePostfix,it.businesslogic.ireport.util.I18n.getString("charts." + axisType + "AxisTickLabelColorPlot","Category axis tick label color"), SheetProperty.COLOR);
2478                categoryAxisTickLabelColorPlot.setValue( axisFormat.getTickLabelColor() );
2479                sheetPanel.addSheetProperty(categoryName, categoryAxisTickLabelColorPlot);
2480                
2481                SheetProperty categoryAxisLabelMaskPlot = new SheetProperty(axisType + "AxisTickLabelMask" + propertyNamePostfix,it.businesslogic.ireport.util.I18n.getString("charts." + axisType + "AxisTickLabelMaskPlot","Category axis tick label mask"), SheetProperty.STRING);
2482                categoryAxisLabelMaskPlot.setValue( axisFormat.getTickLabelMask());
2483                sheetPanel.addSheetProperty(categoryName, categoryAxisLabelMaskPlot);
2484            
2485                SheetProperty categoryAxisLineColorPlot = new SheetProperty(axisType + "AxisLineColor" + propertyNamePostfix,it.businesslogic.ireport.util.I18n.getString("charts." + axisType + "AxisLineColorPlot","Category axis line color"), SheetProperty.COLOR);
2486                categoryAxisLineColorPlot.setValue( axisFormat.getAxisLineColor() );
2487                sheetPanel.addSheetProperty(categoryName, categoryAxisLineColorPlot);
2488                
2489                FontSheetProperty categoryAxisLableFontPlot = new FontSheetProperty(axisType + "AxisLabelFont" + propertyNamePostfix,it.businesslogic.ireport.util.I18n.getString("charts." + axisType + "AxisLabelFontPlot","Category axis label font"));
2490                categoryAxisLableFontPlot.setValue( axisFormat.getLabelFont() );
2491                sheetPanel.addSheetProperty(categoryName, categoryAxisLableFontPlot);
2492                
2493                FontSheetProperty categoryAxisTickLableFontPlot = new FontSheetProperty(axisType + "AxisTickLabelFont" + propertyNamePostfix,it.businesslogic.ireport.util.I18n.getString("charts." + axisType + "AxisTickLabelFontPlot","Category axis tick label font"));
2494                categoryAxisTickLableFontPlot.setValue( axisFormat.getTickLabelFont() );
2495                sheetPanel.addSheetProperty(categoryName, categoryAxisTickLableFontPlot);
2496            
2497                // ---- End Category Axis Format -----
2498
}
2499   
2500   
2501    /**
2502 * Quick way to add a set of properties related to an AxisFormat.<br>
2503 * Property name: [axis]Property[propertyNamePostfix]
2504 *
2505 * @param rangeType String, a name in {data, low, medium, high}
2506 * @param range DataRange, the DataRange object from which take values
2507 * @param categoryName String, the sheet category name. I.e. Line Plot
2508 * @param propertyNamePostfix String, the value that complets the property name, i.e. LinePlot, BarPlot, ....
2509 */

2510   public void addDataRangeEntries(String JavaDoc rangeType, DataRange range, String JavaDoc categoryName, String JavaDoc propertyNamePostfix)
2511    {
2512                ExpressionSheetProperty rangeLowExpressionProperty = new ExpressionSheetProperty(rangeType + "RangeLowExpression" + propertyNamePostfix,it.businesslogic.ireport.util.I18n.getString("charts." + rangeType + "RangeLow","Data range low"));
2513                rangeLowExpressionProperty.setValue( range.getLowExpression());
2514                sheetPanel.addSheetProperty(categoryName, rangeLowExpressionProperty);
2515                
2516                ExpressionSheetProperty rangeHighExpressionProperty = new ExpressionSheetProperty(rangeType + "RangeHighExpression" + propertyNamePostfix,it.businesslogic.ireport.util.I18n.getString("charts." + rangeType + "RangeHigh","Data range high"));
2517                rangeHighExpressionProperty.setValue( range.getHighExpression());
2518                sheetPanel.addSheetProperty(categoryName, rangeHighExpressionProperty);
2519    }
2520    
2521   
2522   public void jTable1editingStopped(ChangeEvent JavaDoc e)
2523   {
2524       int row = jTable1.getSelectedRow();
2525       
2526       //System.out.println("position changed!: " + jTable1.getValueAt(row,0) + " " + jTable1.getValueAt(row,1) + " " + jTable1.getValueAt(row,1).getClass().getName());
2527

2528       ((Axis)jTable1.getValueAt(row,0)).setPosition( ""+((Tag)jTable1.getValueAt(row,1)).getValue() );
2529       
2530   }
2531}
2532
Popular Tags