|
From: Carlos <ma...@us...> - 2007-10-03 20:48:43
|
Update of /cvsroot/tail/TailS/src/java/net/sf/tails/swing/frame In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv15823/src/java/net/sf/tails/swing/frame Modified Files: Index.java Log Message: Atualizando telas que tinha algo hard coded e jogadas para arquivos de properties (mensagens de erro, pastas e packages etc). Index: Index.java =================================================================== RCS file: /cvsroot/tail/TailS/src/java/net/sf/tails/swing/frame/Index.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Index.java 1 Oct 2007 23:16:58 -0000 1.13 --- Index.java 3 Oct 2007 20:48:44 -0000 1.14 *************** *** 19,22 **** --- 19,23 ---- import java.io.OutputStream; import java.io.PrintWriter; + import java.util.ResourceBundle; import javax.swing.JFileChooser; *************** *** 36,40 **** public class Index extends javax.swing.JFrame { ! static final String DEFAULT_TITLE = "TailS : Technical Analysis Library Software"; private static final long serialVersionUID = 1L; --- 37,41 ---- public class Index extends javax.swing.JFrame { ! private static final ResourceBundle messageBundle = ResourceBundle.getBundle("net.sf.tails.i18n.Messages"); private static final long serialVersionUID = 1L; *************** *** 71,75 **** this.setLocationByPlatform(true); this.setMinimumSize(new java.awt.Dimension(800, 600)); ! this.setTitle(DEFAULT_TITLE); } --- 72,76 ---- this.setLocationByPlatform(true); this.setMinimumSize(new java.awt.Dimension(800, 600)); ! this.setTitle(messageBundle.getString("DEFAULT_TITLE")); } *************** *** 80,84 **** this.setLocationByPlatform(true); this.setMinimumSize(new java.awt.Dimension(800, 600)); ! this.setTitle(DEFAULT_TITLE); } --- 81,85 ---- this.setLocationByPlatform(true); this.setMinimumSize(new java.awt.Dimension(800, 600)); ! this.setTitle(messageBundle.getString("DEFAULT_TITLE")); } *************** *** 275,279 **** if (reportTable.getSelectedRow() == -1) { ! JOptionPane.showMessageDialog(null, "Please select the report you want to export to XLS.", "Error", 2); } else --- 276,280 ---- if (reportTable.getSelectedRow() == -1) { ! JOptionPane.showMessageDialog(null, messageBundle.getString("REPORT_XLS"), "Error", 2); } else *************** *** 308,312 **** if (reportTable.getSelectedRow() == -1) { ! JOptionPane.showMessageDialog(null, "Please select the report you want to export to HTML.", "Error", 2); } else --- 309,313 ---- if (reportTable.getSelectedRow() == -1) { ! JOptionPane.showMessageDialog(null, messageBundle.getString("REPORT_HTML"), "Error", 2); } else *************** *** 331,335 **** if(stockAnalysis == null) { ! JOptionPane.showMessageDialog(null, "Please open or create a new stock analysis to generate a report.", "Error", 2); } else --- 332,336 ---- if(stockAnalysis == null) { ! JOptionPane.showMessageDialog(null, messageBundle.getString("OPEN_STOCKANALYSIS"), "Error", 2); } else *************** *** 389,393 **** String xmlFile = serializer.toXML(stockAnalysis); String filePath; ! if (this.getTitle().endsWith(" - " + DEFAULT_TITLE)) { filePath = FrameHelper.getStockAnalysisPath() + "/" + this.getTitle().split(" - ")[0]; --- 390,394 ---- String xmlFile = serializer.toXML(stockAnalysis); String filePath; ! if (this.getTitle().endsWith(" - " + messageBundle.getString("DEFAULT_TITLE"))) { filePath = FrameHelper.getStockAnalysisPath() + "/" + this.getTitle().split(" - ")[0]; *************** *** 408,412 **** write.print(xmlFile); write.close(); ! this.setTitle(stockAnalysisXML.getName() + " - " + DEFAULT_TITLE); } --- 409,413 ---- write.print(xmlFile); write.close(); ! this.setTitle(stockAnalysisXML.getName() + " - " + messageBundle.getString("DEFAULT_TITLE")); } *************** *** 433,437 **** write.print(xmlFile); write.close(); ! this.setTitle(stockAnalysisXML.getName() + " - " + DEFAULT_TITLE); break; } --- 434,438 ---- write.print(xmlFile); write.close(); ! this.setTitle(stockAnalysisXML.getName() + " - " + messageBundle.getString("DEFAULT_TITLE")); break; } |