[Home] DMelt member access. Java source code: org.statcato.dialogs.stat.hytest.HyTestConclusionDialog
/*
* HyTestConclusionDialog.java
*
* Created on September 25, 2008, 9:47 AM
*/
package org.statcato.dialogs.stat.hytest;
import org.statcato.*;
import javax.swing.*;
/**
* Dialog for hypothesis test conclusion tool. Allows user to specify original
* claim and choose a method for rejecting null hypothesis. Provides
* wording of a final conclusion.
*
* @author Margaret Yau
* @version %I%, %G%
* @since 1.0
*/
public class HyTestConclusionDialog extends StatcatoDialog {
private static final int LESS = 0;
private static final int LESSEQ = 1;
private static final int GREATER = 2;
private static final int GREATEREQ = 3;
private static final int EQUAL = 4;
private static final int NEQUAL = 5;
private static final int LEFTTAIL = 0;
private static final int RIGHTTAIL = 1;
private static final int TWOTAIL = 2;
private int tail = -1;
private String claim = "";
private String h0 = "";
private String h1 = "";
private String parameter; // for original claim
private int condition; // for original claim
private double value; // for original claim
/** Creates new form HyTestConclusionDialog */
public HyTestConclusionDialog(java.awt.Frame parent, boolean modal) {
super(parent, modal);
this.app = (Statcato)parent;
this.ParentSpreadsheet = app.getSpreadsheet();
initComponents();
ButtonGroup group = new ButtonGroup();
group.add(TradRadioButton);
group.add(PValueRadioButton);
getRootPane().setDefaultButton(Next1Button);
RejectPanel.setVisible(false);
ConclusionPanel.setVisible(false);
GraphPanel.setVisible(false);
setHelpFile("stat-hytest-conc");
name = "Hypothesis Test Conclusion Tool";
description = "For determining the conclusion of a hypothesis test " +
"using the traditional or p-value approaches.";
helpStrings.add("Enter the original claim of the hypothesis test.");
helpStrings.add("Enter the critial value and test statistic if " +
"using the traditional approach.");
helpStrings.add("Enter the significance and p-value if using " +
"the p-value approach.");
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// //GEN-BEGIN:initComponents
private void initComponents() {
ClearButton = new javax.swing.JButton();
CancelButton = new javax.swing.JButton();
ClaimPanel = new javax.swing.JPanel();
ParamComboBox1 = new javax.swing.JComboBox();
jLabel11 = new javax.swing.JLabel();
jLabel12 = new javax.swing.JLabel();
ConditionalComboBox1 = new javax.swing.JComboBox();
ClaimValueTextField1 = new javax.swing.JTextField();
jLabel13 = new javax.swing.JLabel();
TailLabel = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
Next1Button = new javax.swing.JButton();
RejectPanel = new javax.swing.JPanel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
TSTextField = new javax.swing.JTextField();
CVTextField = new javax.swing.JTextField();
TradRadioButton = new javax.swing.JRadioButton();
PValueRadioButton = new javax.swing.JRadioButton();
SigLabel = new javax.swing.JLabel();
PValueLabel = new javax.swing.JLabel();
PValueTextField = new javax.swing.JTextField();
SigTextField = new javax.swing.JTextField();
H0Label = new javax.swing.JLabel();
Next2Button = new javax.swing.JButton();
ConclusionPanel = new javax.swing.JPanel();
ConclusionLabel = new javax.swing.JLabel();
GraphPanel = new javax.swing.JPanel();
GraphLabel = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("Hypothesis Test: Reaching a Conclusion");
ClearButton.setText("Clear");
ClearButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ClearButtonActionPerformed(evt);
}
});
CancelButton.setText("Cancel");
CancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
CancelButtonActionPerformed(evt);
}
});
ClaimPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Original Claim"));
ParamComboBox1.setEditable(true);
ParamComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "mean ", "proportion", "variance", "standard deviation", "" }));
jLabel11.setText("Parameter");
jLabel12.setText("Condition");
ConditionalComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "<≤