001: /*
002: * Copyright (C) 2005 - 2008 JasperSoft Corporation. All rights reserved.
003: * http://www.jaspersoft.com.
004: *
005: * Unless you have purchased a commercial license agreement from JasperSoft,
006: * the following license terms apply:
007: *
008: * This program is free software; you can redistribute it and/or modify
009: * it under the terms of the GNU General Public License version 2 as published by
010: * the Free Software Foundation.
011: *
012: * This program is distributed WITHOUT ANY WARRANTY; and without the
013: * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
014: * See the GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
018: * or write to:
019: *
020: * Free Software Foundation, Inc.,
021: * 59 Temple Place - Suite 330,
022: * Boston, MA USA 02111-1307
023: *
024: *
025: *
026: *
027: * TimePeriodSeriesDialog.java
028: *
029: * Created on 17 agosto 2005, 11.19
030: *
031: */
032:
033: package it.businesslogic.ireport.chart;
034:
035: import it.businesslogic.ireport.SubDataset;
036: import it.businesslogic.ireport.util.I18n;
037: import it.businesslogic.ireport.util.Misc;
038:
039: /**
040: *
041: * @author Administrator
042: */
043: public class TimePeriodSeriesDialog extends javax.swing.JDialog {
044:
045: private String seriesExpression = "";
046: private String startDateExpression = "";
047: private String endDateExpression = "";
048: private String valueExpression = "";
049: private String labelExpression = "";
050:
051: private int dialogResult = javax.swing.JOptionPane.CANCEL_OPTION;
052:
053: /** Creates new form CategorySeriesDialog */
054: public TimePeriodSeriesDialog(java.awt.Frame parent, boolean modal) {
055: super (parent, modal);
056: initComponents();
057: applyI18n();
058:
059: this .setSize(500, 500);
060: it.businesslogic.ireport.util.Misc.centerFrame(this );
061:
062: javax.swing.KeyStroke escape = javax.swing.KeyStroke
063: .getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0,
064: false);
065: javax.swing.Action escapeAction = new javax.swing.AbstractAction() {
066: public void actionPerformed(java.awt.event.ActionEvent e) {
067: jButtonCancelActionPerformed(e);
068: }
069: };
070:
071: getRootPane().getInputMap(
072: javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW).put(
073: escape, "ESCAPE");
074: getRootPane().getActionMap().put("ESCAPE", escapeAction);
075:
076: //to make the default button ...
077: this .getRootPane().setDefaultButton(this .jButtonOK);
078: }
079:
080: /**
081: * this method is used to pass the correct subdataset to the expression editor
082: */
083: public void setSubDataset(SubDataset sds) {
084: jRTextExpressionEndDate.setSubDataset(sds);
085: jRTextExpressionLabel.setSubDataset(sds);
086: jRTextExpressionSeries.setSubDataset(sds);
087: jRTextExpressionStartDate.setSubDataset(sds);
088: jRTextExpressionValue.setSubDataset(sds);
089: sectionItemHyperlinkPanel1.setSubDataset(sds);
090: }
091:
092: /** This method is called from within the constructor to
093: * initialize the form.
094: * WARNING: Do NOT modify this code. The content of this method is
095: * always regenerated by the Form Editor.
096: */
097: // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
098: private void initComponents() {
099: java.awt.GridBagConstraints gridBagConstraints;
100:
101: jTabbedPane1 = new javax.swing.JTabbedPane();
102: jPanel1 = new javax.swing.JPanel();
103: jLabelSeriesExpression = new javax.swing.JLabel();
104: jLabelStartDateExpression = new javax.swing.JLabel();
105: jLabelEndDateExpression = new javax.swing.JLabel();
106: jLabelValueExpression = new javax.swing.JLabel();
107: jLabelLabelExpression = new javax.swing.JLabel();
108: jRTextExpressionSeries = new it.businesslogic.ireport.gui.JRTextExpressionArea();
109: jRTextExpressionStartDate = new it.businesslogic.ireport.gui.JRTextExpressionArea();
110: jRTextExpressionEndDate = new it.businesslogic.ireport.gui.JRTextExpressionArea();
111: jRTextExpressionValue = new it.businesslogic.ireport.gui.JRTextExpressionArea();
112: jRTextExpressionLabel = new it.businesslogic.ireport.gui.JRTextExpressionArea();
113: sectionItemHyperlinkPanel1 = new it.businesslogic.ireport.chart.gui.SectionItemHyperlinkPanel();
114: jPanel6 = new javax.swing.JPanel();
115: jPanel7 = new javax.swing.JPanel();
116: jButtonOK = new javax.swing.JButton();
117: jButtonCancel = new javax.swing.JButton();
118:
119: getContentPane().setLayout(new java.awt.GridBagLayout());
120:
121: setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
122: setTitle("Time period series");
123: addWindowListener(new java.awt.event.WindowAdapter() {
124: public void windowOpened(java.awt.event.WindowEvent evt) {
125: formWindowOpened(evt);
126: }
127: });
128:
129: jPanel1.setLayout(new java.awt.GridBagLayout());
130:
131: jLabelSeriesExpression.setText("Series expression (required)");
132: gridBagConstraints = new java.awt.GridBagConstraints();
133: gridBagConstraints.gridx = 0;
134: gridBagConstraints.gridy = 0;
135: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
136: gridBagConstraints.weightx = 1.0;
137: jPanel1.add(jLabelSeriesExpression, gridBagConstraints);
138:
139: jLabelStartDateExpression
140: .setText("Start date expression (required)");
141: gridBagConstraints = new java.awt.GridBagConstraints();
142: gridBagConstraints.gridx = 0;
143: gridBagConstraints.gridy = 2;
144: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
145: gridBagConstraints.weightx = 1.0;
146: gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
147: jPanel1.add(jLabelStartDateExpression, gridBagConstraints);
148:
149: jLabelEndDateExpression
150: .setText("End date expression (required)");
151: gridBagConstraints = new java.awt.GridBagConstraints();
152: gridBagConstraints.gridx = 0;
153: gridBagConstraints.gridy = 4;
154: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
155: gridBagConstraints.weightx = 1.0;
156: gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
157: jPanel1.add(jLabelEndDateExpression, gridBagConstraints);
158:
159: jLabelValueExpression.setText("Value expression (required)");
160: gridBagConstraints = new java.awt.GridBagConstraints();
161: gridBagConstraints.gridx = 0;
162: gridBagConstraints.gridy = 10;
163: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
164: gridBagConstraints.weightx = 1.0;
165: gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
166: jPanel1.add(jLabelValueExpression, gridBagConstraints);
167:
168: jLabelLabelExpression.setText("Label expression");
169: gridBagConstraints = new java.awt.GridBagConstraints();
170: gridBagConstraints.gridx = 0;
171: gridBagConstraints.gridy = 14;
172: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
173: gridBagConstraints.weightx = 1.0;
174: gridBagConstraints.insets = new java.awt.Insets(4, 0, 0, 0);
175: jPanel1.add(jLabelLabelExpression, gridBagConstraints);
176:
177: jRTextExpressionSeries.setBorder(javax.swing.BorderFactory
178: .createEtchedBorder());
179: jRTextExpressionSeries.setElectricScroll(0);
180: jRTextExpressionSeries.setMinimumSize(new java.awt.Dimension(
181: 10, 10));
182: jRTextExpressionSeries.setPreferredSize(new java.awt.Dimension(
183: 10, 10));
184: gridBagConstraints = new java.awt.GridBagConstraints();
185: gridBagConstraints.gridx = 0;
186: gridBagConstraints.gridy = 1;
187: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
188: gridBagConstraints.weightx = 1.0;
189: gridBagConstraints.weighty = 1.0;
190: jPanel1.add(jRTextExpressionSeries, gridBagConstraints);
191:
192: jRTextExpressionStartDate.setBorder(javax.swing.BorderFactory
193: .createEtchedBorder());
194: jRTextExpressionStartDate.setElectricScroll(0);
195: jRTextExpressionStartDate
196: .setMinimumSize(new java.awt.Dimension(10, 10));
197: jRTextExpressionStartDate
198: .setPreferredSize(new java.awt.Dimension(10, 10));
199: gridBagConstraints = new java.awt.GridBagConstraints();
200: gridBagConstraints.gridx = 0;
201: gridBagConstraints.gridy = 3;
202: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
203: gridBagConstraints.weightx = 1.0;
204: gridBagConstraints.weighty = 1.0;
205: jPanel1.add(jRTextExpressionStartDate, gridBagConstraints);
206:
207: jRTextExpressionEndDate.setBorder(javax.swing.BorderFactory
208: .createEtchedBorder());
209: jRTextExpressionEndDate.setElectricScroll(0);
210: jRTextExpressionEndDate.setMinimumSize(new java.awt.Dimension(
211: 10, 10));
212: jRTextExpressionEndDate
213: .setPreferredSize(new java.awt.Dimension(10, 10));
214: gridBagConstraints = new java.awt.GridBagConstraints();
215: gridBagConstraints.gridx = 0;
216: gridBagConstraints.gridy = 5;
217: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
218: gridBagConstraints.weightx = 1.0;
219: gridBagConstraints.weighty = 1.0;
220: jPanel1.add(jRTextExpressionEndDate, gridBagConstraints);
221:
222: jRTextExpressionValue.setBorder(javax.swing.BorderFactory
223: .createEtchedBorder());
224: jRTextExpressionValue.setElectricScroll(0);
225: jRTextExpressionValue.setMinimumSize(new java.awt.Dimension(10,
226: 10));
227: jRTextExpressionValue.setPreferredSize(new java.awt.Dimension(
228: 10, 10));
229: gridBagConstraints = new java.awt.GridBagConstraints();
230: gridBagConstraints.gridx = 0;
231: gridBagConstraints.gridy = 11;
232: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
233: gridBagConstraints.weightx = 1.0;
234: gridBagConstraints.weighty = 1.0;
235: jPanel1.add(jRTextExpressionValue, gridBagConstraints);
236:
237: jRTextExpressionLabel.setBorder(javax.swing.BorderFactory
238: .createEtchedBorder());
239: jRTextExpressionLabel.setElectricScroll(0);
240: jRTextExpressionLabel.setMinimumSize(new java.awt.Dimension(10,
241: 10));
242: jRTextExpressionLabel.setPreferredSize(new java.awt.Dimension(
243: 10, 10));
244: gridBagConstraints = new java.awt.GridBagConstraints();
245: gridBagConstraints.gridx = 0;
246: gridBagConstraints.gridy = 15;
247: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
248: gridBagConstraints.weightx = 1.0;
249: gridBagConstraints.weighty = 1.0;
250: jPanel1.add(jRTextExpressionLabel, gridBagConstraints);
251:
252: jTabbedPane1.addTab("Data", jPanel1);
253:
254: jTabbedPane1.addTab("Item hyperlink",
255: sectionItemHyperlinkPanel1);
256:
257: gridBagConstraints = new java.awt.GridBagConstraints();
258: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
259: gridBagConstraints.weightx = 1.0;
260: gridBagConstraints.weighty = 1.0;
261: getContentPane().add(jTabbedPane1, gridBagConstraints);
262:
263: jPanel6.setLayout(new java.awt.GridBagLayout());
264:
265: gridBagConstraints = new java.awt.GridBagConstraints();
266: gridBagConstraints.gridheight = 2;
267: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
268: gridBagConstraints.weightx = 1.0;
269: gridBagConstraints.weighty = 1.0;
270: jPanel6.add(jPanel7, gridBagConstraints);
271:
272: jButtonOK.setMnemonic('o');
273: jButtonOK.setText("OK");
274: jButtonOK
275: .addActionListener(new java.awt.event.ActionListener() {
276: public void actionPerformed(
277: java.awt.event.ActionEvent evt) {
278: jButtonOKActionPerformed(evt);
279: }
280: });
281:
282: gridBagConstraints = new java.awt.GridBagConstraints();
283: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
284: gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
285: jPanel6.add(jButtonOK, gridBagConstraints);
286:
287: jButtonCancel.setMnemonic('c');
288: jButtonCancel.setText("Cancel");
289: jButtonCancel
290: .addActionListener(new java.awt.event.ActionListener() {
291: public void actionPerformed(
292: java.awt.event.ActionEvent evt) {
293: jButtonCancelActionPerformed(evt);
294: }
295: });
296:
297: gridBagConstraints = new java.awt.GridBagConstraints();
298: gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
299: gridBagConstraints.insets = new java.awt.Insets(4, 0, 4, 0);
300: jPanel6.add(jButtonCancel, gridBagConstraints);
301:
302: gridBagConstraints = new java.awt.GridBagConstraints();
303: gridBagConstraints.gridx = 0;
304: gridBagConstraints.gridy = 18;
305: gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
306: gridBagConstraints.weightx = 1.0;
307: getContentPane().add(jPanel6, gridBagConstraints);
308:
309: pack();
310: }// </editor-fold>//GEN-END:initComponents
311:
312: private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened
313: sectionItemHyperlinkPanel1.openExtraWindows();
314: }//GEN-LAST:event_formWindowOpened
315:
316: private void jButtonCancelActionPerformed(
317: java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelActionPerformed
318: this .setVisible(false);
319: this .dispose();
320: }//GEN-LAST:event_jButtonCancelActionPerformed
321:
322: private void jButtonOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOKActionPerformed
323:
324: seriesExpression = jRTextExpressionSeries.getText();
325: setStartDateExpression(jRTextExpressionStartDate.getText());
326: setEndDateExpression(jRTextExpressionEndDate.getText());
327: valueExpression = jRTextExpressionValue.getText();
328: labelExpression = jRTextExpressionLabel.getText();
329:
330: java.text.MessageFormat formatter = new java.text.MessageFormat(
331: it.businesslogic.ireport.util.I18n.getString(
332: "gui.notvalidexp", "{0} cannot be blank!"));
333:
334: if (seriesExpression.trim().length() == 0) {
335:
336: javax.swing.JOptionPane
337: .showMessageDialog(
338: this ,
339: formatter
340: .format(new Object[] { it.businesslogic.ireport.util.I18n
341: .getString(
342: "charts.seriesExpression",
343: "Series expression") }),
344: I18n.getString(
345: "message.title.invalidExpression",
346: "Invalid expression"),
347: javax.swing.JOptionPane.ERROR_MESSAGE);
348: return;
349: }
350:
351: if (getStartDateExpression().trim().length() == 0) {
352: javax.swing.JOptionPane
353: .showMessageDialog(
354: this ,
355: formatter
356: .format(new Object[] { it.businesslogic.ireport.util.I18n
357: .getString(
358: "charts.startDateExpression",
359: "Start date expression") }),
360: I18n.getString(
361: "message.title.invalidExpression",
362: "Invalid expression"),
363: javax.swing.JOptionPane.ERROR_MESSAGE);
364: return;
365: }
366:
367: if (getEndDateExpression().trim().length() == 0) {
368: javax.swing.JOptionPane
369: .showMessageDialog(
370: this ,
371: formatter
372: .format(new Object[] { it.businesslogic.ireport.util.I18n
373: .getString(
374: "charts.endDateExpression",
375: "End date expression") }),
376: I18n.getString(
377: "message.title.invalidExpression",
378: "Invalid expression"),
379: javax.swing.JOptionPane.ERROR_MESSAGE);
380: return;
381: }
382:
383: if (valueExpression.trim().length() == 0) {
384: javax.swing.JOptionPane
385: .showMessageDialog(
386: this ,
387: formatter
388: .format(new Object[] { it.businesslogic.ireport.util.I18n
389: .getString(
390: "charts.valueExpression",
391: "Value expression") }),
392: I18n.getString(
393: "message.title.invalidExpression",
394: "Invalid expression"),
395: javax.swing.JOptionPane.ERROR_MESSAGE);
396: return;
397: }
398:
399: this .setDialogResult(javax.swing.JOptionPane.OK_OPTION);
400: this .setVisible(false);
401: this .dispose();
402: }//GEN-LAST:event_jButtonOKActionPerformed
403:
404: /**
405: * @param args the command line arguments
406: */
407: public static void main(String args[]) {
408: java.awt.EventQueue.invokeLater(new Runnable() {
409: public void run() {
410: new CategorySeriesDialog(new javax.swing.JFrame(), true)
411: .setVisible(true);
412: }
413: });
414: }
415:
416: public String getSeriesExpression() {
417: return seriesExpression;
418: }
419:
420: public void setSeriesExpression(String seriesExpression) {
421: this .seriesExpression = seriesExpression;
422: jRTextExpressionSeries.setText(seriesExpression);
423: }
424:
425: public String getValueExpression() {
426: return valueExpression;
427: }
428:
429: public void setValueExpression(String valueExpression) {
430: this .valueExpression = valueExpression;
431: jRTextExpressionValue.setText(valueExpression);
432: }
433:
434: public String getLabelExpression() {
435: return labelExpression;
436: }
437:
438: public void setLabelExpression(String labelExpression) {
439: this .labelExpression = labelExpression;
440: jRTextExpressionLabel.setText(labelExpression);
441: }
442:
443: public void setSectionItemHyperlink(
444: SectionItemHyperlink sectionItemHyperlink) {
445: sectionItemHyperlinkPanel1
446: .setSectionItemHyperlink(sectionItemHyperlink.cloneMe());
447: }
448:
449: public SectionItemHyperlink getSectionItemHyperlink() {
450: return sectionItemHyperlinkPanel1.getSectionItemHyperlink();
451: }
452:
453: public int getDialogResult() {
454: return dialogResult;
455: }
456:
457: public void setDialogResult(int dialogResult) {
458: this .dialogResult = dialogResult;
459: }
460:
461: // Variables declaration - do not modify//GEN-BEGIN:variables
462: private javax.swing.JButton jButtonCancel;
463: private javax.swing.JButton jButtonOK;
464: private javax.swing.JLabel jLabelEndDateExpression;
465: private javax.swing.JLabel jLabelLabelExpression;
466: private javax.swing.JLabel jLabelSeriesExpression;
467: private javax.swing.JLabel jLabelStartDateExpression;
468: private javax.swing.JLabel jLabelValueExpression;
469: private javax.swing.JPanel jPanel1;
470: private javax.swing.JPanel jPanel6;
471: private javax.swing.JPanel jPanel7;
472: private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionEndDate;
473: private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionLabel;
474: private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionSeries;
475: private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionStartDate;
476: private it.businesslogic.ireport.gui.JRTextExpressionArea jRTextExpressionValue;
477: private javax.swing.JTabbedPane jTabbedPane1;
478: private it.businesslogic.ireport.chart.gui.SectionItemHyperlinkPanel sectionItemHyperlinkPanel1;
479:
480: // End of variables declaration//GEN-END:variables
481:
482: public void applyI18n() {
483: // Start autogenerated code ----------------------
484: // End autogenerated code ----------------------
485: jButtonOK.setText(it.businesslogic.ireport.util.I18n.getString(
486: "ok", "Ok"));
487: jButtonCancel.setText(it.businesslogic.ireport.util.I18n
488: .getString("cancel", "Cancel"));
489:
490: jLabelStartDateExpression
491: .setText(it.businesslogic.ireport.util.I18n.getString(
492: "charts.startDateExpression",
493: "Start date expression"));
494: jLabelEndDateExpression
495: .setText(it.businesslogic.ireport.util.I18n.getString(
496: "charts.endDateExpression",
497: "End date expression"));
498: jLabelSeriesExpression
499: .setText(it.businesslogic.ireport.util.I18n.getString(
500: "charts.seriesExpression", "Series expression"));
501: jLabelValueExpression
502: .setText(it.businesslogic.ireport.util.I18n.getString(
503: "charts.valueExpression", "Value expression"));
504: jLabelLabelExpression
505: .setText(it.businesslogic.ireport.util.I18n.getString(
506: "charts.labelExpression", "Label expression"));
507:
508: jTabbedPane1.setTitleAt(0, I18n.getString(
509: "chartSeries.tab.Data", "Data"));
510: jTabbedPane1.setTitleAt(1, I18n.getString(
511: "chartSeries.tab.ItemHyperlink", "Item hyperlink"));
512:
513: this .setTitle(it.businesslogic.ireport.util.I18n.getString(
514: "gui.ChartPropertiesDialog.title", "Chart properties"));
515:
516: jButtonCancel.setMnemonic(I18n.getString(
517: "timePeriodSeriesDialog.buttonCancelMnemonic", "c")
518: .charAt(0));
519: jButtonOK.setMnemonic(I18n.getString(
520: "timePeriodSeriesDialog.buttonOKMnemonic", "o").charAt(
521: 0));
522:
523: this .getRootPane().updateUI();
524: }
525:
526: public String getStartDateExpression() {
527: return startDateExpression;
528: }
529:
530: public void setStartDateExpression(String startDateExpression) {
531: this .startDateExpression = startDateExpression;
532: jRTextExpressionStartDate.setText(startDateExpression);
533: }
534:
535: public String getEndDateExpression() {
536: return endDateExpression;
537: }
538:
539: public void setEndDateExpression(String endDateExpression) {
540: this .endDateExpression = endDateExpression;
541: jRTextExpressionEndDate.setText(endDateExpression);
542: }
543:
544: public static final int COMPONENT_NONE = 0;
545: public static final int COMPONENT_SERIES_EXPRESSION = 1;
546: public static final int COMPONENT_START_DATE_EXPRESSION = 2;
547: public static final int COMPONENT_END_DATE_EXPRESSION = 3;
548: public static final int COMPONENT_VALUE_EXPRESSION = 4;
549: public static final int COMPONENT_LABEL_EXPRESSION = 5;
550: public static final int COMPONENT_HYPERLINK = 100;
551:
552: /**
553: * This method set the focus on a specific component.
554: *
555: * expressionInfo[0] can be something like:
556: * COMPONENT_SERIES_EXPRESSION, COMPONENT_START_DATE_EXPRESSION, COMPONENT_END_DATE_EXPRESSION...
557: *
558: * If it is COMPONENT_HYPERLINK, other parameters are expected...
559: * otherInfo is used here only for COMPONENT_HYPERLINK
560: * otherInfo[0] = expression ID
561: * otherInfo[1] = parameter #
562: * otherInfo[2] = parameter expression ID
563: */
564: public void setFocusedExpression(Object[] expressionInfo) {
565: if (expressionInfo == null)
566: return;
567: int expID = ((Integer) expressionInfo[0]).intValue();
568:
569: switch (expID) {
570: case COMPONENT_SERIES_EXPRESSION:
571: Misc.selectTextAndFocusArea(jRTextExpressionSeries);
572: break;
573: case COMPONENT_START_DATE_EXPRESSION:
574: Misc.selectTextAndFocusArea(jRTextExpressionStartDate);
575: break;
576: case COMPONENT_END_DATE_EXPRESSION:
577: Misc.selectTextAndFocusArea(jRTextExpressionEndDate);
578: break;
579: case COMPONENT_VALUE_EXPRESSION:
580: Misc.selectTextAndFocusArea(jRTextExpressionValue);
581: break;
582: case COMPONENT_LABEL_EXPRESSION:
583: Misc.selectTextAndFocusArea(jRTextExpressionLabel);
584: break;
585: case COMPONENT_HYPERLINK:
586: jTabbedPane1
587: .setSelectedComponent(sectionItemHyperlinkPanel1);
588: Object newInfo[] = new Object[expressionInfo.length - 1];
589: for (int i = 1; i < expressionInfo.length; ++i)
590: newInfo[i - 1] = expressionInfo[i];
591: sectionItemHyperlinkPanel1.setFocusedExpression(newInfo);
592: break;
593: }
594: }
595: }
|