diff --git a/nbproject/configs/Assignment3.properties b/nbproject/configs/Assignment3.properties index 7a276e7..d1b7b03 100644 --- a/nbproject/configs/Assignment3.properties +++ b/nbproject/configs/Assignment3.properties @@ -1 +1 @@ -main.class=wekimini.kadenze.Assignment5Grader +main.class=wekimini.kadenze.Assignment3Grader diff --git a/nbproject/configs/Assignment4.properties b/nbproject/configs/Assignment4.properties new file mode 100644 index 0000000..f6a11e5 --- /dev/null +++ b/nbproject/configs/Assignment4.properties @@ -0,0 +1 @@ +main.class=wekimini.kadenze.Assignment4Grader diff --git a/nbproject/configs/Assignment6.properties b/nbproject/configs/Assignment6.properties new file mode 100644 index 0000000..60233d7 --- /dev/null +++ b/nbproject/configs/Assignment6.properties @@ -0,0 +1 @@ +main.class=wekimini.kadenze.Assignment6Grader diff --git a/src/wekimini/gui/MainGUI.java b/src/wekimini/gui/MainGUI.java index 7196a5e..b88eb60 100644 --- a/src/wekimini/gui/MainGUI.java +++ b/src/wekimini/gui/MainGUI.java @@ -5,6 +5,7 @@ */ package wekimini.gui; +import wekimini.kadenze.KadenzeAssn3SubmissionPrompt; import wekimini.kadenze.KadenzeAssignmentSummaryFrame; import java.awt.Dimension; import java.awt.event.WindowAdapter; @@ -35,6 +36,8 @@ import wekimini.dtw.gui.DtwOutputEditor; import wekimini.kadenze.KadenzeAssignment; import wekimini.kadenze.KadenzeAssignment.KadenzeAssignmentType; +import wekimini.kadenze.KadenzeAssn1SubmissionPrompt; +import wekimini.kadenze.KadenzeAssn2SubmissionPrompt; import wekimini.kadenze.KadenzeAssn6SubmissionPrompt; import wekimini.kadenze.KadenzeAssn7SubmissionPrompt; import wekimini.kadenze.KadenzeAssn4SubmissionPrompt1; @@ -455,10 +458,44 @@ private void createAssignmentSubmission() { //Show prompt for information about input device & difficulty KadenzeAssignmentType ka = KadenzeLogging.getCurrentAssignmentType(); int which = KadenzeAssignment.getAssignmentNumber(ka); - if (which == 3) { + if (which == 1) { //Show prompt final MainGUI mg = this; - KadenzeInputPromptFrame kipf = new KadenzeInputPromptFrame(w, new KadenzeInputPromptFrame.KadenzeInputInfoReceiver() { + KadenzeAssn1SubmissionPrompt kipf = new KadenzeAssn1SubmissionPrompt(w, new KadenzeAssn1SubmissionPrompt.KadenzeAssn1InputInfoReceiver() { + @Override + public void infoLogged() { + String zipped; + try { + zipped = KadenzeLogging.createZipForAssignment(); + Util.showPrettyInfoPane(mg, "Your assignment is done! Please submit file " + zipped, "Success!"); + } catch (IOException ex) { + String dir = KadenzeLogging.getLogger().getZipDirectoryNameForAssignment(); + Util.showPrettyErrorPane(mg, "Could not zip file. Please zip your " + dir + " directory manually."); + } + } + }); + kipf.setVisible(true); + } else if (which == 2) { + //Show prompt + final MainGUI mg = this; + KadenzeAssn2SubmissionPrompt kipf = new KadenzeAssn2SubmissionPrompt(w, new KadenzeAssn2SubmissionPrompt.KadenzeAssn2InputInfoReceiver() { + @Override + public void infoLogged() { + String zipped; + try { + zipped = KadenzeLogging.createZipForAssignment(); + Util.showPrettyInfoPane(mg, "Your assignment is done! Please submit file " + zipped, "Success!"); + } catch (IOException ex) { + String dir = KadenzeLogging.getLogger().getZipDirectoryNameForAssignment(); + Util.showPrettyErrorPane(mg, "Could not zip file. Please zip your " + dir + " directory manually."); + } + } + }); + kipf.setVisible(true); + } else if (which == 3) { + //Show prompt + final MainGUI mg = this; + KadenzeAssn3SubmissionPrompt kipf = new KadenzeAssn3SubmissionPrompt(w, new KadenzeAssn3SubmissionPrompt.KadenzeAssn3InputInfoReceiver() { @Override public void infoLogged() { String zipped; diff --git a/src/wekimini/kadenze/KadenzeAssn1SubmissionPrompt.form b/src/wekimini/kadenze/KadenzeAssn1SubmissionPrompt.form new file mode 100644 index 0000000..369c3d6 --- /dev/null +++ b/src/wekimini/kadenze/KadenzeAssn1SubmissionPrompt.form @@ -0,0 +1,156 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/wekimini/kadenze/KadenzeAssn1SubmissionPrompt.java b/src/wekimini/kadenze/KadenzeAssn1SubmissionPrompt.java new file mode 100644 index 0000000..aa8b63c --- /dev/null +++ b/src/wekimini/kadenze/KadenzeAssn1SubmissionPrompt.java @@ -0,0 +1,203 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package wekimini.kadenze; + +import wekimini.Wekinator; +import wekimini.util.Util; + +/** + * + * @author rebecca + */ +public class KadenzeAssn1SubmissionPrompt extends javax.swing.JFrame { + private Wekinator w = null; + private KadenzeAssn1InputInfoReceiver receiver = null; + /** + * Creates new form KadenzeInputPromptFrame + */ + public KadenzeAssn1SubmissionPrompt() { + initComponents(); + } + + public KadenzeAssn1SubmissionPrompt(Wekinator w, KadenzeAssn1InputInfoReceiver r) { + initComponents(); + this.w = w; + this.receiver = r; + } + + /** + * 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. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jScrollPane1 = new javax.swing.JScrollPane(); + textDifficulties = new javax.swing.JTextArea(); + jLabel3 = new javax.swing.JLabel(); + jLabel5 = new javax.swing.JLabel(); + comboDifficulty = new javax.swing.JComboBox(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Almost done! Just a few questions..."); + + jPanel1.setBackground(new java.awt.Color(255, 255, 255)); + + jButton1.setText("OK: Proceed to creating submission"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + jButton2.setText("Cancel"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + textDifficulties.setColumns(20); + textDifficulties.setRows(5); + jScrollPane1.setViewportView(textDifficulties); + + jLabel3.setText("Optionally describe any difficulties you encountered, so that we can improve the assignment and/or software for other students. (Your answer will not affect your grade.)"); + + jLabel5.setText("How difficult did you find this assignment, on a scale from 1 (very easy) to 10 (very difficult)?"); + + comboDifficulty.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1: Very easy", "2", "3", "4", "5", "6", "7", "8", "9", "10: Very difficult" })); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(jButton2) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton1)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane1) + .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(comboDifficulty, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE))))) + .addContainerGap()) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel5) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(comboDifficulty, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton1) + .addComponent(jButton2)) + .addContainerGap()) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + + pack(); + }// //GEN-END:initComponents + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + this.dispose(); + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + int difficulty = comboDifficulty.getSelectedIndex() + 1; + String difficultyString = textDifficulties.getText().trim(); + KadenzeLogging.getLogger().logInputInformation(w, "", difficulty, difficultyString); + if (receiver != null) { + this.setVisible(false); + receiver.infoLogged(); + } + this.dispose(); + }//GEN-LAST:event_jButton1ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(KadenzeAssn1SubmissionPrompt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(KadenzeAssn1SubmissionPrompt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(KadenzeAssn1SubmissionPrompt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(KadenzeAssn1SubmissionPrompt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + // + // + // + // + // + // + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new KadenzeAssn1SubmissionPrompt().setVisible(true); + } + }); + } + + public interface KadenzeAssn1InputInfoReceiver { + public void infoLogged(); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JComboBox comboDifficulty; + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel5; + private javax.swing.JPanel jPanel1; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JTextArea textDifficulties; + // End of variables declaration//GEN-END:variables +} diff --git a/src/wekimini/gui/KadenzeInputPromptFrame.form b/src/wekimini/kadenze/KadenzeAssn2SubmissionPrompt.form similarity index 100% rename from src/wekimini/gui/KadenzeInputPromptFrame.form rename to src/wekimini/kadenze/KadenzeAssn2SubmissionPrompt.form diff --git a/src/wekimini/kadenze/KadenzeAssn2SubmissionPrompt.java b/src/wekimini/kadenze/KadenzeAssn2SubmissionPrompt.java new file mode 100644 index 0000000..1f8f260 --- /dev/null +++ b/src/wekimini/kadenze/KadenzeAssn2SubmissionPrompt.java @@ -0,0 +1,224 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package wekimini.kadenze; + +import wekimini.Wekinator; +import wekimini.util.Util; + +/** + * + * @author rebecca + */ +public class KadenzeAssn2SubmissionPrompt extends javax.swing.JFrame { + private Wekinator w = null; + private KadenzeAssn2InputInfoReceiver receiver = null; + /** + * Creates new form KadenzeInputPromptFrame + */ + public KadenzeAssn2SubmissionPrompt() { + initComponents(); + } + + public KadenzeAssn2SubmissionPrompt(Wekinator w, KadenzeAssn2InputInfoReceiver r) { + initComponents(); + this.w = w; + this.receiver = r; + } + + /** + * 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. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jScrollPane1 = new javax.swing.JScrollPane(); + textDifficulties = new javax.swing.JTextArea(); + jLabel3 = new javax.swing.JLabel(); + textInputDevice = new javax.swing.JTextField(); + jLabel5 = new javax.swing.JLabel(); + comboDifficulty = new javax.swing.JComboBox(); + jLabel6 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Almost done! Just a few questions..."); + + jPanel1.setBackground(new java.awt.Color(255, 255, 255)); + + jLabel1.setText("Which input device or feature extractor did you use for Parts 3A and 3B?"); + + jButton1.setText("OK: Proceed to creating submission"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + jButton2.setText("Cancel"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + textDifficulties.setColumns(20); + textDifficulties.setRows(5); + jScrollPane1.setViewportView(textDifficulties); + + jLabel3.setText("Optionally describe any difficulties you encountered, so that we can improve the assignment and/or software for other students. (Your answer will not affect your grade.)"); + + jLabel5.setText("How difficult did you find this assignment, on a scale from 1 (very easy) to 10 (very difficult)?"); + + comboDifficulty.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1: Very easy", "2", "3", "4", "5", "6", "7", "8", "9", "10: Very difficult" })); + + jLabel6.setFont(new java.awt.Font("Lucida Grande", 2, 13)); // NOI18N + jLabel6.setText("(If this is an example from the course bundle, please provide the name, otherwise provide a brief description of the input device and features)"); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(jButton2) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton1)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jScrollPane1) + .addComponent(textInputDevice) + .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(comboDifficulty, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE))))) + .addContainerGap()) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel1) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(textInputDevice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(jLabel5) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(comboDifficulty, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton1) + .addComponent(jButton2)) + .addContainerGap()) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + + pack(); + }// //GEN-END:initComponents + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + this.dispose(); + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + String inputString = textInputDevice.getText(); + if (inputString.trim().length() == 0) { + Util.showPrettyErrorPane(this, "Please describe the input device you used"); + return; + } + int difficulty = comboDifficulty.getSelectedIndex() + 1; + String difficultyString = textDifficulties.getText().trim(); + KadenzeLogging.getLogger().logInputInformation(w, inputString, difficulty, difficultyString); + if (receiver != null) { + this.setVisible(false); + receiver.infoLogged(); + } + this.dispose(); + }//GEN-LAST:event_jButton1ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(KadenzeAssn2SubmissionPrompt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(KadenzeAssn2SubmissionPrompt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(KadenzeAssn2SubmissionPrompt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(KadenzeAssn2SubmissionPrompt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + // + // + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new KadenzeAssn2SubmissionPrompt().setVisible(true); + } + }); + } + + public interface KadenzeAssn2InputInfoReceiver { + public void infoLogged(); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JComboBox comboDifficulty; + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JPanel jPanel1; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JTextArea textDifficulties; + private javax.swing.JTextField textInputDevice; + // End of variables declaration//GEN-END:variables +} diff --git a/src/wekimini/kadenze/KadenzeAssn3SubmissionPrompt.form b/src/wekimini/kadenze/KadenzeAssn3SubmissionPrompt.form new file mode 100644 index 0000000..1581dac --- /dev/null +++ b/src/wekimini/kadenze/KadenzeAssn3SubmissionPrompt.form @@ -0,0 +1,180 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wekimini/gui/KadenzeInputPromptFrame.java b/src/wekimini/kadenze/KadenzeAssn3SubmissionPrompt.java similarity index 91% rename from src/wekimini/gui/KadenzeInputPromptFrame.java rename to src/wekimini/kadenze/KadenzeAssn3SubmissionPrompt.java index ed1a8e4..4a265bc 100644 --- a/src/wekimini/gui/KadenzeInputPromptFrame.java +++ b/src/wekimini/kadenze/KadenzeAssn3SubmissionPrompt.java @@ -3,27 +3,26 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ -package wekimini.gui; +package wekimini.kadenze; import wekimini.Wekinator; -import wekimini.kadenze.KadenzeLogging; import wekimini.util.Util; /** * * @author rebecca */ -public class KadenzeInputPromptFrame extends javax.swing.JFrame { +public class KadenzeAssn3SubmissionPrompt extends javax.swing.JFrame { private Wekinator w = null; - private KadenzeInputInfoReceiver receiver = null; + private KadenzeAssn3InputInfoReceiver receiver = null; /** * Creates new form KadenzeInputPromptFrame */ - public KadenzeInputPromptFrame() { + public KadenzeAssn3SubmissionPrompt() { initComponents(); } - public KadenzeInputPromptFrame(Wekinator w, KadenzeInputInfoReceiver r) { + public KadenzeAssn3SubmissionPrompt(Wekinator w, KadenzeAssn3InputInfoReceiver r) { initComponents(); this.w = w; this.receiver = r; @@ -184,25 +183,26 @@ public static void main(String args[]) { } } } catch (ClassNotFoundException ex) { - java.util.logging.Logger.getLogger(KadenzeInputPromptFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(KadenzeAssn3SubmissionPrompt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { - java.util.logging.Logger.getLogger(KadenzeInputPromptFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(KadenzeAssn3SubmissionPrompt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { - java.util.logging.Logger.getLogger(KadenzeInputPromptFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(KadenzeAssn3SubmissionPrompt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { - java.util.logging.Logger.getLogger(KadenzeInputPromptFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + java.util.logging.Logger.getLogger(KadenzeAssn3SubmissionPrompt.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // + // /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { - new KadenzeInputPromptFrame().setVisible(true); + new KadenzeAssn3SubmissionPrompt().setVisible(true); } }); } - public interface KadenzeInputInfoReceiver { + public interface KadenzeAssn3InputInfoReceiver { public void infoLogged(); }