|
From: Carlos <ma...@us...> - 2007-10-03 21:10:19
|
Update of /cvsroot/tail/TailS/src/java/net/sf/tails/swing/frame In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25959/src/java/net/sf/tails/swing/frame Modified Files: Index.java Log Message: Adicionado mkdirs em todos lugares necessários... assim não há mais exception de uma pasta não existir no TailS. Index: Index.java =================================================================== RCS file: /cvsroot/tail/TailS/src/java/net/sf/tails/swing/frame/Index.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Index.java 3 Oct 2007 20:48:44 -0000 1.14 --- Index.java 3 Oct 2007 21:10:19 -0000 1.15 *************** *** 37,40 **** --- 37,41 ---- public class Index extends javax.swing.JFrame { + private static final ResourceBundle folderBundle = ResourceBundle.getBundle("net.sf.tails.i18n.Folders"); private static final ResourceBundle messageBundle = ResourceBundle.getBundle("net.sf.tails.i18n.Messages"); *************** *** 46,49 **** --- 47,51 ---- private javax.swing.JMenu newMenu; private javax.swing.JMenuItem newStockAnalysisMenuItem; + private javax.swing.JMenuItem newReportMenuItem; private javax.swing.JMenuItem openMenuItem; private javax.swing.JSeparator separator1; *************** *** 95,98 **** --- 97,101 ---- newMenu = new javax.swing.JMenu(); newStockAnalysisMenuItem = new javax.swing.JMenuItem(); + newReportMenuItem = new javax.swing.JMenuItem(); openMenuItem = new javax.swing.JMenuItem(); separator1 = new javax.swing.JSeparator(); *************** *** 153,157 **** addReportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ! addReportButtonActionPerformed(evt); } }); --- 156,160 ---- addReportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ! newReportActionPerformed(evt); } }); *************** *** 178,181 **** --- 181,185 ---- newMenu.setText("New..."); newStockAnalysisMenuItem.setText("Stock Analysis"); + newStockAnalysisMenuItem.setMnemonic('t'); newStockAnalysisMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { *************** *** 183,188 **** --- 187,201 ---- } }); + + newReportMenuItem.setText("Report"); + newReportMenuItem.setMnemonic('r'); + newReportMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + newReportActionPerformed(evt); + } + }); newMenu.add(newStockAnalysisMenuItem); + newMenu.add(newReportMenuItem); fileMenu.add(newMenu); *************** *** 291,295 **** public void run() { try { ! new File("Data/Xls").mkdirs(); HSSFWorkbook workbook = xlsGenerator.generate(report, stockAnalysis.getAdditionalCriteria(), stockAnalysis.getSlicer().getPeriod()); FileOutputStream fileOut = new FileOutputStream(xlsFileChooser.getSelectedFile().getAbsolutePath() + ".xls"); --- 304,308 ---- public void run() { try { ! FrameHelper.generateFolders(folderBundle.getString("XLS_DIR")); HSSFWorkbook workbook = xlsGenerator.generate(report, stockAnalysis.getAdditionalCriteria(), stockAnalysis.getSlicer().getPeriod()); FileOutputStream fileOut = new FileOutputStream(xlsFileChooser.getSelectedFile().getAbsolutePath() + ".xls"); *************** *** 329,333 **** } ! private void addReportButtonActionPerformed(java.awt.event.ActionEvent evt) { if(stockAnalysis == null) { --- 342,346 ---- } ! private void newReportActionPerformed(java.awt.event.ActionEvent evt) { if(stockAnalysis == null) { |