|
From: Carlos <ma...@us...> - 2007-10-17 23:15:03
|
Update of /cvsroot/tail/TailS/src/java/net/sf/tails/swing/frame In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv16835/src/java/net/sf/tails/swing/frame Modified Files: Index.java Log Message: Colocados icones na tela principal. Index: Index.java =================================================================== RCS file: /cvsroot/tail/TailS/src/java/net/sf/tails/swing/frame/Index.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Index.java 17 Oct 2007 21:37:39 -0000 1.24 --- Index.java 17 Oct 2007 23:15:04 -0000 1.25 *************** *** 12,15 **** --- 12,16 ---- package net.sf.tails.swing.frame; + import java.awt.event.ActionEvent; import java.io.BufferedOutputStream; import java.io.File; *************** *** 21,24 **** --- 22,26 ---- import java.util.ResourceBundle; + import javax.swing.ImageIcon; import javax.swing.JFileChooser; import javax.swing.JFrame; *************** *** 43,46 **** --- 45,49 ---- public class Index extends javax.swing.JFrame { private static final ResourceBundle messageBundle = ResourceBundle.getBundle("net.sf.tails.i18n.Messages"); + private static final ResourceBundle iconBundle = ResourceBundle.getBundle("net.sf.tails.i18n.icons"); private static final long serialVersionUID = 1L; *************** *** 62,68 **** private javax.swing.JPanel criteriaPanel; ! private javax.swing.JButton addReportButton; ! private javax.swing.JButton htmlButton; ! private javax.swing.JButton xlsButton; private javax.swing.JScrollPane reportScrollPane; private javax.swing.JTable reportTable; --- 65,78 ---- private javax.swing.JPanel criteriaPanel; ! private javax.swing.JButton newStockAnalysisButton; ! private javax.swing.JButton newReportButton; ! private javax.swing.JButton openStockAnalysisButton; ! private javax.swing.JButton saveStockAnalysisButton; ! private javax.swing.JButton saveAsStockAnalysisButton; ! private javax.swing.JButton exportHTMLButton; ! private javax.swing.JButton exportXLSButton; ! private javax.swing.JButton cleanConsoleButton; ! private javax.swing.JButton completeGraphButton; ! private javax.swing.JButton helpButton; private javax.swing.JScrollPane reportScrollPane; private javax.swing.JTable reportTable; *************** *** 122,128 **** criteriaPanel = new javax.swing.JPanel(); ! addReportButton = new javax.swing.JButton(); ! htmlButton = new javax.swing.JButton(); ! xlsButton = new javax.swing.JButton(); reportScrollPane = new javax.swing.JScrollPane(); reportTable = new javax.swing.JTable(); --- 132,146 ---- criteriaPanel = new javax.swing.JPanel(); ! newStockAnalysisButton = new javax.swing.JButton(new ImageIcon(iconBundle.getString("NEW_STOCKANALYSIS"))); ! newReportButton = new javax.swing.JButton(new ImageIcon(iconBundle.getString("NEW_REPORT"))); ! openStockAnalysisButton = new javax.swing.JButton(new ImageIcon(iconBundle.getString("OPEN"))); ! saveStockAnalysisButton = new javax.swing.JButton(new ImageIcon(iconBundle.getString("SAVE"))); ! saveAsStockAnalysisButton = new javax.swing.JButton(new ImageIcon(iconBundle.getString("SAVE_AS"))); ! exportHTMLButton = new javax.swing.JButton(new ImageIcon(iconBundle.getString("HTML"))); ! exportXLSButton = new javax.swing.JButton(new ImageIcon(iconBundle.getString("XLS"))); ! cleanConsoleButton = new javax.swing.JButton(new ImageIcon(iconBundle.getString("CONSOLE"))); ! completeGraphButton = new javax.swing.JButton(new ImageIcon(iconBundle.getString("GRAPH"))); ! helpButton = new javax.swing.JButton(new ImageIcon(iconBundle.getString("HELP"))); ! reportScrollPane = new javax.swing.JScrollPane(); reportTable = new javax.swing.JTable(); *************** *** 205,223 **** reportScrollPane.setViewportView(reportTable); reportScrollPane.setViewportBorder(javax.swing.BorderFactory.createEtchedBorder()); ! ! addReportButton.setFont(new java.awt.Font("Dialog", 0, 12)); ! addReportButton.setText("Add Report"); ! addReportButton.setMaximumSize(new java.awt.Dimension(101, 25)); ! addReportButton.setMinimumSize(new java.awt.Dimension(101, 25)); ! addReportButton.setPreferredSize(new java.awt.Dimension(101, 25)); ! addReportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newReportActionPerformed(evt); } }); ! ! htmlButton.setFont(new java.awt.Font("Dialog", 0, 12)); ! htmlButton.setText("Export to HTML"); ! htmlButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { htmlButtonActionPerformed(evt); --- 223,276 ---- reportScrollPane.setViewportView(reportTable); reportScrollPane.setViewportBorder(javax.swing.BorderFactory.createEtchedBorder()); ! ! newStockAnalysisButton.setToolTipText("New Stock Analysis..."); ! newStockAnalysisButton.setMaximumSize(new java.awt.Dimension(25, 25)); ! newStockAnalysisButton.setMinimumSize(new java.awt.Dimension(25, 25)); ! newStockAnalysisButton.addActionListener(new java.awt.event.ActionListener() { ! public void actionPerformed(java.awt.event.ActionEvent evt) { ! stockAnalysisMenuItemActionPerformed(evt); ! } ! }); ! ! newReportButton.setToolTipText("New Report..."); ! newReportButton.setMaximumSize(new java.awt.Dimension(25, 25)); ! newReportButton.setMinimumSize(new java.awt.Dimension(25, 25)); ! newReportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newReportActionPerformed(evt); } }); ! ! openStockAnalysisButton.setToolTipText("Open..."); ! openStockAnalysisButton.setMaximumSize(new java.awt.Dimension(25, 25)); ! openStockAnalysisButton.setMinimumSize(new java.awt.Dimension(25, 25)); ! openStockAnalysisButton.addActionListener(new java.awt.event.ActionListener() { ! public void actionPerformed(java.awt.event.ActionEvent evt) { ! openStockAnalysisMenuItemActionPerformed(evt); ! } ! }); ! ! saveStockAnalysisButton.setToolTipText("Save"); ! saveStockAnalysisButton.setMaximumSize(new java.awt.Dimension(25, 25)); ! saveStockAnalysisButton.setMinimumSize(new java.awt.Dimension(25, 25)); ! saveStockAnalysisButton.addActionListener(new java.awt.event.ActionListener() { ! public void actionPerformed(java.awt.event.ActionEvent evt) { ! saveMenuItemActionPerformed(evt); ! } ! }); ! ! saveAsStockAnalysisButton.setToolTipText("Save as..."); ! saveAsStockAnalysisButton.setMaximumSize(new java.awt.Dimension(25, 25)); ! saveAsStockAnalysisButton.setMinimumSize(new java.awt.Dimension(25, 25)); ! saveAsStockAnalysisButton.addActionListener(new java.awt.event.ActionListener() { ! public void actionPerformed(java.awt.event.ActionEvent evt) { ! saveAsMenuItemActionPerformed(evt); ! } ! }); ! ! exportHTMLButton.setToolTipText("Export to HTML..."); ! exportHTMLButton.setMaximumSize(new java.awt.Dimension(25, 25)); ! exportHTMLButton.setMinimumSize(new java.awt.Dimension(25, 25)); ! exportHTMLButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { htmlButtonActionPerformed(evt); *************** *** 225,235 **** }); ! xlsButton.setFont(new java.awt.Font("Dialog", 0, 12)); ! xlsButton.setText("Export to XLS"); ! xlsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { xlsButtonActionPerformed(evt); } }); fileMenu.setMnemonic('f'); --- 278,316 ---- }); ! exportXLSButton.setToolTipText("Export to XLS..."); ! exportXLSButton.setMaximumSize(new java.awt.Dimension(25, 25)); ! exportXLSButton.setMinimumSize(new java.awt.Dimension(25, 25)); ! exportXLSButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { xlsButtonActionPerformed(evt); } }); + + cleanConsoleButton.setToolTipText("Clean Console"); + cleanConsoleButton.setMaximumSize(new java.awt.Dimension(25, 25)); + cleanConsoleButton.setMinimumSize(new java.awt.Dimension(25, 25)); + cleanConsoleButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cleanConsoleButtonActionPerformed(evt); + } + }); + + completeGraphButton.setToolTipText("Generate Detailed Graphics"); + completeGraphButton.setMaximumSize(new java.awt.Dimension(25, 25)); + completeGraphButton.setMinimumSize(new java.awt.Dimension(25, 25)); + completeGraphButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + completeGraphButtonActionPerformed(evt); + } + }); + + helpButton.setToolTipText("Help"); + helpButton.setMaximumSize(new java.awt.Dimension(25, 25)); + helpButton.setMinimumSize(new java.awt.Dimension(25, 25)); + helpButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + helpButtonActionPerformed(evt); + } + }); fileMenu.setMnemonic('f'); *************** *** 317,325 **** .addComponent(chartsPane, javax.swing.GroupLayout.DEFAULT_SIZE, 776, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() ! .addComponent(addReportButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ! .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) ! .addComponent(htmlButton) ! .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) ! .addComponent(xlsButton) .addGap(200) .addComponent(reportProgress))) --- 398,420 ---- .addComponent(chartsPane, javax.swing.GroupLayout.DEFAULT_SIZE, 776, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() ! .addComponent(newStockAnalysisButton) ! .addGap(2) ! .addComponent(newReportButton) ! .addGap(2) ! .addComponent(openStockAnalysisButton) ! .addGap(2) ! .addComponent(saveStockAnalysisButton) ! .addGap(2) ! .addComponent(saveAsStockAnalysisButton) ! .addGap(2) ! .addComponent(exportHTMLButton) ! .addGap(2) ! .addComponent(exportXLSButton) ! .addGap(2) ! .addComponent(cleanConsoleButton) ! .addGap(2) ! .addComponent(completeGraphButton) ! .addGap(2) ! .addComponent(helpButton) .addGap(200) .addComponent(reportProgress))) *************** *** 329,337 **** layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() ! .addContainerGap(10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) ! .addComponent(xlsButton, 0, 0, Short.MAX_VALUE) ! .addComponent(htmlButton, 0, 0, Short.MAX_VALUE) ! .addComponent(addReportButton, javax.swing.GroupLayout.PREFERRED_SIZE, 17, Short.MAX_VALUE) .addComponent(reportProgress)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) --- 424,439 ---- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() ! .addContainerGap(2, 2) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) ! .addComponent(newStockAnalysisButton) ! .addComponent(newReportButton) ! .addComponent(openStockAnalysisButton) ! .addComponent(saveStockAnalysisButton) ! .addComponent(saveAsStockAnalysisButton) ! .addComponent(exportHTMLButton) ! .addComponent(exportXLSButton) ! .addComponent(cleanConsoleButton) ! .addComponent(completeGraphButton) ! .addComponent(helpButton) .addComponent(reportProgress)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) *************** *** 349,353 **** } ! private void xlsButtonActionPerformed(java.awt.event.ActionEvent evt) { if (reportTable.getSelectedRow() == -1) { --- 451,469 ---- } ! protected void cleanConsoleButtonActionPerformed(ActionEvent evt) { ! consoleArea.setText(""); ! } ! ! protected void helpButtonActionPerformed(ActionEvent evt) { ! // TODO AQUI ! ! } ! ! protected void completeGraphButtonActionPerformed(ActionEvent evt) { ! // TODO AQUI ! ! } ! ! private void xlsButtonActionPerformed(java.awt.event.ActionEvent evt) { if (reportTable.getSelectedRow() == -1) { |