|
From: Carlos <ma...@us...> - 2007-10-10 22:49:51
|
Update of /cvsroot/tail/TailS/src/java/net/sf/tails/swing/frame/report In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12654/src/java/net/sf/tails/swing/frame/report Modified Files: NewReportFrame.java Log Message: Adicionados default strategies na tela New Report. Index: NewReportFrame.java =================================================================== RCS file: /cvsroot/tail/TailS/src/java/net/sf/tails/swing/frame/report/NewReportFrame.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** NewReportFrame.java 10 Oct 2007 22:00:50 -0000 1.18 --- NewReportFrame.java 10 Oct 2007 22:46:39 -0000 1.19 *************** *** 30,33 **** --- 30,35 ---- private static final ResourceBundle messageBundle = ResourceBundle .getBundle("net.sf.tails.i18n.Messages"); + private static final ResourceBundle indicatorBundle = ResourceBundle + .getBundle("net.sf.tails.i18n.IndicatorDescription"); private static final long serialVersionUID = 4704921929974302846L; *************** *** 40,44 **** private javax.swing.JPanel defaultReportPanel; private javax.swing.JPanel radioGroupPanel; ! private javax.swing.JRadioButton jRadioButtonSMA; private javax.swing.JScrollPane customStrategyPane; private javax.swing.JScrollPane radioGroupScrollPane; --- 42,50 ---- private javax.swing.JPanel defaultReportPanel; private javax.swing.JPanel radioGroupPanel; ! private javax.swing.JRadioButton radioButtonSMA; ! private javax.swing.JRadioButton radioButtonEMA; ! private javax.swing.JRadioButton radioButtonRSI; ! private javax.swing.JRadioButton radioButtonBollingerBands; ! private javax.swing.JRadioButton radioButtonParabolicSAR; private javax.swing.JScrollPane customStrategyPane; private javax.swing.JScrollPane radioGroupScrollPane; *************** *** 70,74 **** radioGroupScrollPane = new javax.swing.JScrollPane(); radioGroupPanel = new javax.swing.JPanel(); ! jRadioButtonSMA = new javax.swing.JRadioButton(); customReportPanel = new javax.swing.JPanel(); customStrategyPane = new javax.swing.JScrollPane(); --- 76,84 ---- radioGroupScrollPane = new javax.swing.JScrollPane(); radioGroupPanel = new javax.swing.JPanel(); ! radioButtonSMA = new javax.swing.JRadioButton(); ! radioButtonEMA = new javax.swing.JRadioButton(); ! radioButtonRSI = new javax.swing.JRadioButton(); ! radioButtonBollingerBands = new javax.swing.JRadioButton(); ! radioButtonParabolicSAR = new javax.swing.JRadioButton(); customReportPanel = new javax.swing.JPanel(); customStrategyPane = new javax.swing.JScrollPane(); *************** *** 100,115 **** radioGroupScrollPane ! .setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); ! indicatorsButtonGroup.add(jRadioButtonSMA); ! jRadioButtonSMA.setText("SMA"); ! jRadioButtonSMA.setBorder(javax.swing.BorderFactory ! .createTitledBorder("")); ! jRadioButtonSMA.setBorderPainted(true); ! jRadioButtonSMA.setMargin(new java.awt.Insets(0, 0, 0, 0)); ! jRadioButtonSMA.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { selectedEnum = EnumIndicator.SMA; } }); javax.swing.GroupLayout radioGroupPanelLayout = new javax.swing.GroupLayout( radioGroupPanel); --- 110,160 ---- radioGroupScrollPane ! .setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); ! indicatorsButtonGroup.add(radioButtonSMA); ! indicatorsButtonGroup.add(radioButtonEMA); ! indicatorsButtonGroup.add(radioButtonRSI); ! indicatorsButtonGroup.add(radioButtonBollingerBands); ! indicatorsButtonGroup.add(radioButtonParabolicSAR); ! ! radioButtonSMA.setText("SMA - " + indicatorBundle.getString("SMAIndicator")); ! radioButtonSMA.setMargin(new java.awt.Insets(0, 0, 0, 0)); ! radioButtonSMA.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { selectedEnum = EnumIndicator.SMA; } }); + + radioButtonEMA.setText("EMA - " + indicatorBundle.getString("EMAIndicator")); + radioButtonEMA.setMargin(new java.awt.Insets(0, 0, 0, 0)); + radioButtonEMA.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + selectedEnum = EnumIndicator.EMA; + } + }); + + radioButtonRSI.setText("RSI - " + indicatorBundle.getString("RSIIndicator")); + radioButtonRSI.setMargin(new java.awt.Insets(0, 0, 0, 0)); + radioButtonRSI.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + selectedEnum = EnumIndicator.RSI; + } + }); + + radioButtonBollingerBands.setText("Bollinger Bands - " + indicatorBundle.getString("BollingerBandsIndicator")); + radioButtonBollingerBands.setMargin(new java.awt.Insets(0, 0, 0, 0)); + radioButtonBollingerBands.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + selectedEnum = EnumIndicator.BOLLINGERBANDS; + } + }); + + radioButtonParabolicSAR.setText("Parabolic SAR - " + indicatorBundle.getString("ParabolicSarIndicator")); + radioButtonParabolicSAR.setMargin(new java.awt.Insets(0, 0, 0, 0)); + radioButtonParabolicSAR.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + selectedEnum = EnumIndicator.PARABOLICSAR; + } + }); + javax.swing.GroupLayout radioGroupPanelLayout = new javax.swing.GroupLayout( radioGroupPanel); *************** *** 119,125 **** .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) - .addGroup( - radioGroupPanelLayout - .createSequentialGroup() .addGroup( radioGroupPanelLayout --- 164,167 ---- *************** *** 127,132 **** javax.swing.GroupLayout.Alignment.LEADING) .addComponent( ! jRadioButtonSMA)) ! .addGap(314, 314, 314))); radioGroupPanelLayout .setVerticalGroup(radioGroupPanelLayout --- 169,198 ---- javax.swing.GroupLayout.Alignment.LEADING) .addComponent( ! radioButtonSMA)) ! .addGroup( ! radioGroupPanelLayout ! .createParallelGroup( ! javax.swing.GroupLayout.Alignment.LEADING) ! .addComponent( ! radioButtonEMA)) ! .addGroup( ! radioGroupPanelLayout ! .createParallelGroup( ! javax.swing.GroupLayout.Alignment.LEADING) ! .addComponent( ! radioButtonRSI)) ! .addGroup( ! radioGroupPanelLayout ! .createParallelGroup( ! javax.swing.GroupLayout.Alignment.LEADING) ! .addComponent( ! radioButtonBollingerBands)) ! .addGroup( ! radioGroupPanelLayout ! .createParallelGroup( ! javax.swing.GroupLayout.Alignment.LEADING) ! .addComponent( ! radioButtonParabolicSAR)) ! .addGap(314, 314, 314)); radioGroupPanelLayout .setVerticalGroup(radioGroupPanelLayout *************** *** 136,140 **** radioGroupPanelLayout .createSequentialGroup() ! .addComponent(jRadioButtonSMA) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, --- 202,214 ---- radioGroupPanelLayout .createSequentialGroup() ! .addComponent(radioButtonSMA) ! .addGap(10,10,10) ! .addComponent(radioButtonEMA) ! .addGap(10,10,10) ! .addComponent(radioButtonRSI) ! .addGap(10,10,10) ! .addComponent(radioButtonBollingerBands) ! .addGap(10,10,10) ! .addComponent(radioButtonParabolicSAR) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, |