woolfel 2005/09/06 19:50:15 Modified: src/reports/org/apache/jmeter/report/writers AbstractReportWriter.java src/reports/org/apache/jmeter JMeterReport.java src/reports/org/apache/jmeter/control/gui ReportGui.java src/reports/org/apache/jmeter/report/gui/tree ReportTreeModel.java src/reports/org/apache/jmeter/report/gui LineGraphGui.java BarChartGui.java src/reports/org/apache/jmeter/testelement AbstractChart.java Added: src/reports/org/apache/jmeter/report/writers HTMLReportWriter.java src/reports/org/apache/jmeter/report/writers/gui HTMLReportWriterGui.java src/reports/org/apache/jmeter/gui/util ReportFilePanel.java Removed: src/reports/org/apache/jmeter/report/writers/gui ReportWriterGui.java AbstractReportWriterGui.java Log: more updates to the reporting tool peter Revision Changes Path 1.2 +48 -21 jakarta-jmeter/src/reports/org/apache/jmeter/report/writers/AbstractReportWriter.java Index: AbstractReportWriter.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/reports/org/apache/jmeter/report/writers/AbstractReportWriter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AbstractReportWriter.java 29 Aug 2005 01:27:12 -0000 1.1 +++ AbstractReportWriter.java 7 Sep 2005 02:50:14 -0000 1.2 @@ -1,4 +1,4 @@ -//$Header: +// $Header: /* * Copyright 2005 The Apache Software Foundation. * @@ -17,48 +17,75 @@ */ package org.apache.jmeter.report.writers; +import java.io.File; +import java.util.Date; + +import org.apache.jmeter.testelement.AbstractTestElement; import org.apache.jmeter.testelement.TestElement; /** - * @author pete + * @author Peter Lin * - * TODO To change the template for this generated type comment go to - * Window - Preferences - Java - Code Style - Code Templates + * The abstract report writer provides the common implementation for subclasses + * to reuse. */ -public abstract class AbstractReportWriter implements ReportWriter { +public abstract class AbstractReportWriter extends AbstractTestElement implements ReportWriter { + public static final String TARGET_DIRECTORY = "ReportWriter.target.directory"; + /** * */ public AbstractReportWriter() { super(); - // TODO Auto-generated constructor stub } - /* (non-Javadoc) - * @see org.apache.jmeter.report.writers.ReportWriter#writeReport(org.apache.jmeter.testelement.TestElement) + /** + * Subclasses need to implement this method and provide the necessary + * logic to produce a ReportSummary object and write the report */ - public ReportSummary writeReport(TestElement element) { - // TODO Auto-generated method stub - return null; - } + public abstract ReportSummary writeReport(TestElement element); - /* (non-Javadoc) - * @see org.apache.jmeter.report.writers.ReportWriter#getTargetDirectory() + /** + * The method simply returns the target directory and doesn't + * validate it. the abstract class expects some other class will + * validate the target directory. */ public String getTargetDirectory() { - // TODO Auto-generated method stub - return null; + return getPropertyAsString(TARGET_DIRECTORY); } - /* (non-Javadoc) - * @see org.apache.jmeter.report.writers.ReportWriter#setTargetDirectory(java.lang.String) + /** + * Set the target directory where the report should be saved */ public void setTargetDirectory(String directory) { - // TODO Auto-generated method stub - + setProperty(TARGET_DIRECTORY,directory); } - public static void main(String[] args) { + public void makeDirectory() { + File output = new File(getTargetDirectory()); + if (!output.exists() || !output.isDirectory()) { + output.mkdir(); + } + } + + public void archiveDirectory() { + File output = new File(getTargetDirectory()); + if (output.exists() && output.isDirectory()) { + // if the directory already exists and is a directory, + // we just renamed to "archive.date" + output.renameTo(new File("archive." + getDayString())); + } + } + + public String getDayString() { + Date today = new Date(); + String year = String.valueOf(today.getYear()); + String month = String.valueOf(today.getMonth() + 1); + String day = String.valueOf(today.getDate()); + if (month.length() == 1) { + month = "0" + month; + } + return year + month + day; } } 1.1 jakarta-jmeter/src/reports/org/apache/jmeter/report/writers/HTMLReportWriter.java Index: HTMLReportWriter.java =================================================================== // $Header: /* * Copyright 2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.jmeter.report.writers; import org.apache.jmeter.testelement.TestElement; /** * HTMLReportWriter is a basic report writer that produces HTML pages. * It contains all the necessary helper method to write out the report. * * @author Peter Lin */ public class HTMLReportWriter extends AbstractReportWriter { public HTMLReportWriter() { super(); } public ReportSummary writeReport(TestElement element) { return null; } } 1.1 jakarta-jmeter/src/reports/org/apache/jmeter/report/writers/gui/HTMLReportWriterGui.java Index: HTMLReportWriterGui.java =================================================================== // $Header: /* * Copyright 2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.jmeter.report.writers.gui; import java.awt.BorderLayout; import java.awt.Color; import javax.swing.JPanel; import javax.swing.JPopupMenu; import org.apache.jmeter.gui.util.ReportFilePanel; import org.apache.jmeter.gui.util.ReportMenuFactory; import org.apache.jmeter.report.gui.AbstractReportGui; import org.apache.jmeter.report.writers.HTMLReportWriter; import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.util.JMeterUtils; /** * @author Peter Lin * */ public class HTMLReportWriterGui extends AbstractReportGui { ReportFilePanel outputDirectory = new ReportFilePanel( JMeterUtils.getResString("report_output_directory"), "*"); public HTMLReportWriterGui() { super(); init(); } public String getLabelResource() { return "report_writer_html"; } public JPopupMenu createPopupMenu() { JPopupMenu pop = new JPopupMenu(); ReportMenuFactory.addFileMenu(pop); ReportMenuFactory.addEditMenu(pop,true); return pop; } /** * init creates the necessary gui stuff. */ public void init() { setLayout(new BorderLayout(10, 10)); setBorder(makeBorder()); setBackground(Color.white); JPanel pane = new JPanel(); pane.setLayout(new BorderLayout(10,10)); pane.setBackground(Color.white); pane.add(this.getNamePanel(),BorderLayout.NORTH); outputDirectory.setBackground(Color.white); pane.add(outputDirectory,BorderLayout.SOUTH); add(pane,BorderLayout.NORTH); } /* (non-Javadoc) * @see org.apache.jmeter.gui.JMeterGUIComponent#createTestElement() */ public TestElement createTestElement() { HTMLReportWriter element = new HTMLReportWriter(); modifyTestElement(element); return element; } /* (non-Javadoc) * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(org.apache.jmeter.testelement.TestElement) */ public void modifyTestElement(TestElement element) { this.configureTestElement(element); HTMLReportWriter wr = (HTMLReportWriter)element; wr.setTargetDirectory(outputDirectory.getFilename()); } public void configure(TestElement element) { super.configure(element); HTMLReportWriter wr = (HTMLReportWriter)element; outputDirectory.setFilename(wr.getTargetDirectory()); } } 1.10 +2 -2 jakarta-jmeter/src/reports/org/apache/jmeter/JMeterReport.java Index: JMeterReport.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/reports/org/apache/jmeter/JMeterReport.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- JMeterReport.java 5 Sep 2005 04:19:08 -0000 1.9 +++ JMeterReport.java 7 Sep 2005 02:50:15 -0000 1.10 @@ -50,7 +50,7 @@ import org.apache.jmeter.report.gui.action.ReportCheckDirty; import org.apache.jmeter.report.gui.tree.ReportTreeListener; import org.apache.jmeter.report.gui.tree.ReportTreeModel; -import org.apache.jmeter.report.writers.gui.AbstractReportWriterGui; +import org.apache.jmeter.report.writers.gui.HTMLReportWriterGui; import org.apache.jmeter.reporters.ResultCollector; import org.apache.jmeter.reporters.Summariser; import org.apache.jmeter.util.JMeterUtils; @@ -161,7 +161,7 @@ private static final String[][] DEFAULT_ICONS = { { AbstractVisualizer.class.getName(), "org/apache/jmeter/images/meter.png" }, { AbstractConfigGui.class.getName(), "org/apache/jmeter/images/testtubes.png" }, - { AbstractReportWriterGui.class.getName(), "org/apache/jmeter/images/new/pencil.png" }, + { HTMLReportWriterGui.class.getName(), "org/apache/jmeter/images/new/pencil.png" }, { ReportPageGui.class.getName(), "org/apache/jmeter/images/new/scroll.png" }, { ReportGui.class.getName(), "org/apache/jmeter/images/new/book.png" } }; 1.9 +5 -1 jakarta-jmeter/src/reports/org/apache/jmeter/control/gui/ReportGui.java Index: ReportGui.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/reports/org/apache/jmeter/control/gui/ReportGui.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ReportGui.java 5 Sep 2005 04:19:09 -0000 1.8 +++ ReportGui.java 7 Sep 2005 02:50:15 -0000 1.9 @@ -35,6 +35,7 @@ import org.apache.jmeter.gui.util.ReportMenuFactory; import org.apache.jmeter.report.gui.AbstractReportGui; import org.apache.jmeter.report.gui.ReportPageGui; +import org.apache.jmeter.report.writers.gui.HTMLReportWriterGui; import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.testelement.ReportPlan; import org.apache.jmeter.util.JMeterUtils; @@ -72,6 +73,9 @@ addMenu.add(ReportMenuFactory.makeMenuItem(new ReportPageGui().getStaticLabel(), ReportPageGui.class.getName(), "Add")); + addMenu.add(ReportMenuFactory.makeMenuItem(new HTMLReportWriterGui().getStaticLabel(), + HTMLReportWriterGui.class.getName(), + "Add")); addMenu.add(ReportMenuFactory.makeMenu(ReportMenuFactory.CONFIG_ELEMENTS, "Add")); pop.add(addMenu); ReportMenuFactory.addFileMenu(pop); 1.6 +6 -1 jakarta-jmeter/src/reports/org/apache/jmeter/report/gui/tree/ReportTreeModel.java Index: ReportTreeModel.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/reports/org/apache/jmeter/report/gui/tree/ReportTreeModel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ReportTreeModel.java 5 Sep 2005 04:19:08 -0000 1.5 +++ ReportTreeModel.java 7 Sep 2005 02:50:15 -0000 1.6 @@ -30,6 +30,8 @@ import org.apache.jmeter.gui.ReportGuiPackage; import org.apache.jmeter.gui.JMeterGUIComponent; import org.apache.jmeter.report.gui.tree.ReportTreeNode; +import org.apache.jmeter.testelement.AbstractChart; +import org.apache.jmeter.testelement.AbstractTable; import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.testelement.ReportPlan; import org.apache.jmeter.testelement.property.NullProperty; @@ -106,6 +108,9 @@ guicomp.configure(component); guicomp.modifyTestElement(component); ReportGuiPackage.getInstance().getCurrentGui(); // put the gui object back + if (component instanceof AbstractChart) { + ((AbstractChart)component).setParentTable((AbstractTable)node.getUserObject()); + } // to the way it was. ReportTreeNode newNode = new ReportTreeNode(component, this); 1.3 +35 -14 jakarta-jmeter/src/reports/org/apache/jmeter/report/gui/LineGraphGui.java Index: LineGraphGui.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/reports/org/apache/jmeter/report/gui/LineGraphGui.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- LineGraphGui.java 6 Sep 2005 04:28:32 -0000 1.2 +++ LineGraphGui.java 7 Sep 2005 02:50:15 -0000 1.3 @@ -20,29 +20,31 @@ import java.awt.BorderLayout; import java.awt.Color; +import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JPopupMenu; +import javax.swing.border.EmptyBorder; +import org.apache.jmeter.gui.util.HorizontalPanel; import org.apache.jmeter.gui.util.ReportMenuFactory; import org.apache.jmeter.gui.util.VerticalPanel; +import org.apache.jmeter.testelement.AbstractTable; import org.apache.jmeter.testelement.LineGraph; import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.util.JMeterUtils; +import org.apache.jorphan.gui.JLabeledChoice; import org.apache.jorphan.gui.JLabeledTextField; public class LineGraphGui extends AbstractReportGui { - private JLabeledTextField xAxis = - new JLabeledTextField(JMeterUtils.getResString("report_chart_x_axis")); - - private JLabeledTextField yAxis = - new JLabeledTextField(JMeterUtils.getResString("report_chart_y_axis")); - private JLabeledTextField xAxisLabel = new JLabeledTextField(JMeterUtils.getResString("report_chart_x_axis_label")); private JLabeledTextField yAxisLabel = new JLabeledTextField(JMeterUtils.getResString("report_chart_y_axis_label")); + + private JLabeledChoice checkItems = null; + private JLabeledChoice xItems = null; public LineGraphGui() { super(); @@ -71,13 +73,28 @@ pane.add(this.getNamePanel(),BorderLayout.NORTH); VerticalPanel options = new VerticalPanel(Color.white); - xAxis.setBackground(Color.white); - yAxis.setBackground(Color.white); xAxisLabel.setBackground(Color.white); yAxisLabel.setBackground(Color.white); - options.add(xAxis); - options.add(yAxis); + + JLabel xLabel = new JLabel(JMeterUtils.getResString("report_chart_x_axis")); + HorizontalPanel xpanel = new HorizontalPanel(Color.white); + xLabel.setBorder(new EmptyBorder(5,2,5,2)); + xItems = new JLabeledChoice(); + xItems.setBackground(Color.white); + xItems.setValues(AbstractTable.xitems); + xpanel.add(xLabel); + xpanel.add(xItems); + options.add(xpanel); options.add(xAxisLabel); + + JLabel yLabel = new JLabel(JMeterUtils.getResString("report_chart_y_axis")); + HorizontalPanel ypanel = new HorizontalPanel(Color.white); + yLabel.setBorder(new EmptyBorder(5,2,5,2)); + checkItems = new JLabeledChoice(); + checkItems.setBackground(Color.white); + ypanel.add(yLabel); + ypanel.add(checkItems); + options.add(ypanel); options.add(yAxisLabel); add(pane,BorderLayout.NORTH); @@ -93,8 +110,8 @@ public void modifyTestElement(TestElement element) { this.configureTestElement(element); LineGraph bc = (LineGraph)element; - bc.setXAxis(xAxis.getText()); - bc.setYAxis(yAxis.getText()); + bc.setXAxis(xItems.getText()); + bc.setYAxis(checkItems.getText()); bc.setXLabel(xAxisLabel.getText()); bc.setYLabel(yAxisLabel.getText()); } @@ -102,9 +119,13 @@ public void configure(TestElement element) { super.configure(element); LineGraph bc = (LineGraph)element; - xAxis.setText(bc.getXAxis()); - yAxis.setText(bc.getYAxis()); + xItems.setText(bc.getXAxis()); + checkItems.setText(bc.getYAxis()); xAxisLabel.setText(bc.getXLabel()); yAxisLabel.setText(bc.getYLabel()); + if (bc.getCheckedItems() != null && bc.getCheckedItems().size() > 0) { + String[] its = new String[bc.getCheckedItems().size()]; + checkItems.setValues((String[])bc.getCheckedItems().toArray(its)); + } } } 1.3 +17 -16 jakarta-jmeter/src/reports/org/apache/jmeter/report/gui/BarChartGui.java Index: BarChartGui.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/reports/org/apache/jmeter/report/gui/BarChartGui.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- BarChartGui.java 6 Sep 2005 04:28:32 -0000 1.2 +++ BarChartGui.java 7 Sep 2005 02:50:15 -0000 1.3 @@ -76,8 +76,17 @@ VerticalPanel options = new VerticalPanel(Color.white); xAxisLabel.setBackground(Color.white); yAxisLabel.setBackground(Color.white); + + JLabel xLabel = new JLabel(JMeterUtils.getResString("report_chart_x_axis")); + HorizontalPanel xpanel = new HorizontalPanel(Color.white); + xLabel.setBorder(new EmptyBorder(5,2,5,2)); + xItems = new JLabeledChoice(); + xItems.setBackground(Color.white); + xItems.setValues(AbstractTable.xitems); + xpanel.add(xLabel); + xpanel.add(xItems); + options.add(xpanel); options.add(xAxisLabel); - options.add(yAxisLabel); JLabel yLabel = new JLabel(JMeterUtils.getResString("report_chart_y_axis")); HorizontalPanel ypanel = new HorizontalPanel(Color.white); @@ -87,16 +96,7 @@ ypanel.add(yLabel); ypanel.add(checkItems); options.add(ypanel); - - JLabel xLabel = new JLabel(JMeterUtils.getResString("report_chart_x_axis")); - HorizontalPanel xpanel = new HorizontalPanel(Color.white); - xLabel.setBorder(new EmptyBorder(5,2,5,2)); - xItems = new JLabeledChoice(); - xItems.setBackground(Color.white); - xItems.setValues(AbstractTable.xitems); - xpanel.add(xLabel); - xpanel.add(xItems); - options.add(xpanel); + options.add(yAxisLabel); add(pane,BorderLayout.NORTH); add(options,BorderLayout.CENTER); @@ -111,8 +111,8 @@ public void modifyTestElement(TestElement element) { this.configureTestElement(element); BarChart bc = (BarChart)element; - // bc.setXAxis(xAxis.getText()); - // bc.setYAxis(yAxis.getText()); + bc.setXAxis(xItems.getText()); + bc.setYAxis(checkItems.getText()); bc.setXLabel(xAxisLabel.getText()); bc.setYLabel(yAxisLabel.getText()); } @@ -120,13 +120,14 @@ public void configure(TestElement element) { super.configure(element); BarChart bc = (BarChart)element; - // xAxis.setText(bc.getXAxis()); - // yAxis.setText(bc.getYAxis()); + xItems.setText(bc.getXAxis()); + checkItems.setText(bc.getYAxis()); xAxisLabel.setText(bc.getXLabel()); yAxisLabel.setText(bc.getYLabel()); - if (bc.getCheckedItems().size() > 0) { + if (bc.getCheckedItems() != null && bc.getCheckedItems().size() > 0) { String[] its = new String[bc.getCheckedItems().size()]; checkItems.setValues((String[])bc.getCheckedItems().toArray(its)); } } + } 1.4 +7 -5 jakarta-jmeter/src/reports/org/apache/jmeter/testelement/AbstractChart.java Index: AbstractChart.java =================================================================== RCS file: /home/cvs/jakarta-jmeter/src/reports/org/apache/jmeter/testelement/AbstractChart.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- AbstractChart.java 6 Sep 2005 04:28:31 -0000 1.3 +++ AbstractChart.java 7 Sep 2005 02:50:15 -0000 1.4 @@ -93,11 +93,13 @@ */ public List getCheckedItems() { ArrayList checked = new ArrayList(); - for (int idx=0; idx < AbstractTable.items.length; idx++) { - if (this.parent.getPropertyAsString( - AbstractTable.items[idx]).equals(String.valueOf(true))) { - checked.add(AbstractTable.items[idx]); - } + if ( this.parent != null) { + for (int idx=0; idx < AbstractTable.items.length; idx++) { + if (this.parent.getPropertyAsString( + AbstractTable.items[idx]).equals(String.valueOf(true))) { + checked.add(AbstractTable.items[idx]); + } + } } return checked; } 1.1 jakarta-jmeter/src/reports/org/apache/jmeter/gui/util/ReportFilePanel.java Index: ReportFilePanel.java =================================================================== // $Header: /home/cvs/jakarta-jmeter/src/reports/org/apache/jmeter/gui/util/ReportFilePanel.java,v 1.1 2005/09/07 02:50:15 woolfel Exp $ /* * Copyright 2002-2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.jmeter.gui.util; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.JButton; import javax.swing.JFileChooser; import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import org.apache.jmeter.util.JMeterUtils; /** * @author Michael Stover Created April 18, 2002 * @version $Revision: 1.1 $ Last updated: $Date: 2005/09/07 02:50:15 $ */ public class ReportFilePanel extends HorizontalPanel implements ActionListener { JTextField filename = new JTextField(20); JLabel label = new JLabel(JMeterUtils.getResString("file_visualizer_filename")); JButton browse = new JButton(JMeterUtils.getResString("browse")); List listeners = new LinkedList(); String title; String filetype; /** * Constructor for the FilePanel object. */ public ReportFilePanel() { title = ""; init(); } public ReportFilePanel(String title) { this.title = title; init(); } public ReportFilePanel(String title, String filetype) { this(title); this.filetype = filetype; } /** * Constructor for the FilePanel object. */ public ReportFilePanel(ChangeListener l, String title) { this.title = title; init(); listeners.add(l); } public void addChangeListener(ChangeListener l) { listeners.add(l); } private void init() { setBorder(BorderFactory.createTitledBorder(title)); add(label); add(Box.createHorizontalStrut(5)); add(filename); add(Box.createHorizontalStrut(5)); filename.addActionListener(this); add(browse); browse.setActionCommand("browse"); browse.addActionListener(this); } /** * If the gui needs to enable/disable the FilePanel, call the method. * * @param enable */ public void enableFile(boolean enable) { browse.setEnabled(enable); filename.setEnabled(enable); } /** * Gets the filename attribute of the FilePanel object. * * @return the filename value */ public String getFilename() { return filename.getText(); } /** * Sets the filename attribute of the FilePanel object. * * @param f * the new filename value */ public void setFilename(String f) { filename.setText(f); } private void fireFileChanged() { Iterator iter = listeners.iterator(); while (iter.hasNext()) { ((ChangeListener) iter.next()).stateChanged(new ChangeEvent(this)); } } public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("browse")) { JFileChooser chooser = ReportFileDialoger.promptToOpenFile(new String[] { filetype }); if (chooser != null && chooser.getSelectedFile() != null) { filename.setText(chooser.getSelectedFile().getPath()); fireFileChanged(); } } else { fireFileChanged(); } } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]