/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * InteractiveView.java * * Created on Nov 21, 2009, 5:35:17 PM */ package cstutor.quizcreation; /** * * @author Josh Robinson */ public class InteractiveView extends javax.swing.JFrame { /** Creates new form InteractiveView */ public InteractiveView() { initComponents(); } /** 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() { cancelB = new javax.swing.JButton(); okB = new javax.swing.JButton(); weightTF = new javax.swing.JTextField(); weightL = new javax.swing.JLabel(); showRenderedHTMLB = new javax.swing.JButton(); correspondingSectionSP = new javax.swing.JScrollPane(); correspondingSectionList = new javax.swing.JList(); correspondingSectionL = new javax.swing.JLabel(); outputL = new javax.swing.JLabel(); keyWordsL = new javax.swing.JLabel(); interactiveQuestionL = new javax.swing.JLabel(); questionL = new javax.swing.JLabel(); outputSP = new javax.swing.JScrollPane(); outputTA = new javax.swing.JTextArea(); keyWordsSP = new javax.swing.JScrollPane(); keyWordsTA = new javax.swing.JTextArea(); questionSP = new javax.swing.JScrollPane(); questionTA = new javax.swing.JTextArea(); setResizable(false); cancelB.setText("Cancel"); cancelB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelBActionPerformed(evt); } }); okB.setText("OK"); okB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { okBActionPerformed(evt); } }); weightL.setText("Weight:"); showRenderedHTMLB.setText("Show Rendered HTML"); correspondingSectionSP.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); correspondingSectionList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); correspondingSectionSP.setViewportView(correspondingSectionList); correspondingSectionL.setText("Corresponding Section:"); outputL.setText("Output:"); keyWordsL.setText("Key Words:"); interactiveQuestionL.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N interactiveQuestionL.setText("Interactive Question Creation"); questionL.setText("Question:"); outputTA.setColumns(20); outputSP.setViewportView(outputTA); keyWordsTA.setColumns(20); keyWordsSP.setViewportView(keyWordsTA); questionTA.setColumns(20); questionSP.setViewportView(questionTA); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addContainerGap() .addComponent(outputL)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addContainerGap() .addComponent(questionL)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addContainerGap() .addComponent(keyWordsL)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(keyWordsSP, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(outputSP, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(questionSP, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 320, Short.MAX_VALUE))) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addContainerGap() .addComponent(correspondingSectionL) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(correspondingSectionSP, 0, 0, Short.MAX_VALUE))) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(cancelB) .addGap(51, 51, 51) .addComponent(weightL) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(weightTF, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 80, Short.MAX_VALUE) .addComponent(okB)) .addGroup(layout.createSequentialGroup() .addGap(101, 101, 101) .addComponent(showRenderedHTMLB))) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(37, Short.MAX_VALUE) .addComponent(interactiveQuestionL) .addGap(34, 34, 34)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(11, 11, 11) .addComponent(interactiveQuestionL) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(questionL) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(questionSP, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(11, 11, 11) .addComponent(outputL) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(outputSP, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(keyWordsL) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(keyWordsSP, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(showRenderedHTMLB) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(correspondingSectionL) .addComponent(correspondingSectionSP, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(weightL) .addComponent(weightTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(22, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addGap(14, 14, 14) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(cancelB) .addComponent(okB)) .addContainerGap()))) ); pack(); }// //GEN-END:initComponents private void cancelBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelBActionPerformed // TODO add your handling code here: this.setVisible(false); }//GEN-LAST:event_cancelBActionPerformed private void okBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okBActionPerformed // TODO add your handling code here: this.setVisible(false); }//GEN-LAST:event_okBActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new InteractiveView().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton cancelB; private javax.swing.JLabel correspondingSectionL; private javax.swing.JList correspondingSectionList; private javax.swing.JScrollPane correspondingSectionSP; private javax.swing.JLabel interactiveQuestionL; private javax.swing.JLabel keyWordsL; private javax.swing.JScrollPane keyWordsSP; private javax.swing.JTextArea keyWordsTA; private javax.swing.JButton okB; private javax.swing.JLabel outputL; private javax.swing.JScrollPane outputSP; private javax.swing.JTextArea outputTA; private javax.swing.JLabel questionL; private javax.swing.JScrollPane questionSP; private javax.swing.JTextArea questionTA; private javax.swing.JButton showRenderedHTMLB; private javax.swing.JLabel weightL; private javax.swing.JTextField weightTF; // End of variables declaration//GEN-END:variables }