/*
* AbstractMultipleChoiceQuestionEditor.java
*
* Created on 22 September 2006, 14:50
*/
package uk.co.bytemark.vm.enigma.inquisition.gui.screens.editor;
import javax.swing.JPanel;
/**
* @author Matt
*/
public class AbstractMultipleChoiceQuestionEditorPanel extends JPanel {
public AbstractMultipleChoiceQuestionEditorPanel() {
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.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jScrollPane1 = new javax.swing.JScrollPane();
optionsTable = new javax.swing.JTable();
shufflableCheckBox = new javax.swing.JCheckBox();
singleOptionModeCheckBox = new javax.swing.JCheckBox();
addButton = new javax.swing.JButton();
deleteButton = new javax.swing.JButton();
moveUpButton = new javax.swing.JButton();
moveDownButton = new javax.swing.JButton();
jScrollPane2 = new javax.swing.JScrollPane();
explanationTextArea = new javax.swing.JTextArea();
previewExplanationButton = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();
jScrollPane3 = new javax.swing.JScrollPane();
questionTextArea = new javax.swing.JTextArea();
previewQuestionButton = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
optionsTable.setModel( new javax.swing.table.DefaultTableModel( new Object[][] { { "<html><body><tt>option 1</tt></body></html>", new Boolean( false ) }, { "<html><body><tt>option 2</tt></body></html>", new Boolean( false ) }, { "<html><body><tt>option 3</tt></body></html>", new Boolean( false ) }, { "<html><body><tt>option 4</tt></body></html>", new Boolean( false ) } }, new String[] { "Option label", "True or false" } ) {
Class<?>[] types = new Class[] { java.lang.String.class, java.lang.Boolean.class };
@Override
public Class<?> getColumnClass( int columnIndex ) {
return types[columnIndex];
}
} );
jScrollPane1.setViewportView( optionsTable );
shufflableCheckBox.setSelected( true );
shufflableCheckBox.setText( "Should option order be randomly shuffled?" );
shufflableCheckBox.setBorder( javax.swing.BorderFactory.createEmptyBorder( 0, 0, 0, 0 ) );
shufflableCheckBox.setMargin( new java.awt.Insets( 0, 0, 0, 0 ) );
singleOptionModeCheckBox.setText( "Use single option mode?" );
singleOptionModeCheckBox.setBorder( javax.swing.BorderFactory.createEmptyBorder( 0, 0, 0, 0 ) );
singleOptionModeCheckBox.setMargin( new java.awt.Insets( 0, 0, 0, 0 ) );
addButton.setText( "Add" );
deleteButton.setText( "Delete" );
deleteButton.setEnabled( false );
moveUpButton.setText( "Move up" );
moveUpButton.setEnabled( false );
moveDownButton.setText( "Move down" );
moveDownButton.setEnabled( false );
explanationTextArea.setColumns( 20 );
explanationTextArea.setFont( new java.awt.Font( "Courier", 0, 12 ) );
explanationTextArea.setLineWrap( true );
explanationTextArea.setRows( 5 );
explanationTextArea.setText( "explanationTextArea\n" );
explanationTextArea.setWrapStyleWord( true );
jScrollPane2.setViewportView( explanationTextArea );
previewExplanationButton.setText( "Preview..." );
jLabel2.setText( "Explanation text:" );
questionTextArea.setColumns( 20 );
questionTextArea.setFont( new java.awt.Font( "Courier", 0, 12 ) );
questionTextArea.setLineWrap( true );
questionTextArea.setRows( 5 );
questionTextArea.setText( "questionTextArea\n" );
questionTextArea.setWrapStyleWord( true );
jScrollPane3.setViewportView( questionTextArea );
previewQuestionButton.setText( "Preview..." );
jLabel1.setText( "Question text:" );
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout( this );
this.setLayout( layout );
layout.setHorizontalGroup( layout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING ).add(
layout
.createSequentialGroup()
.addContainerGap()
.add(
layout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING ).add( layout.createSequentialGroup().add( jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 703, Short.MAX_VALUE ).add( 18, 18, 18 ).add( layout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING ).add( layout.createSequentialGroup().add( deleteButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE ).addContainerGap() ).add( layout.createSequentialGroup().add( addButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE ).addContainerGap() ).add( layout.createSequentialGroup().add( layout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING, false ).add( moveDownButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE ).add( moveUpButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 107, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE ) ).add( 20, 20, 20 ) ) ) )
.add( layout.createSequentialGroup().add( layout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING ).add( singleOptionModeCheckBox ).add( shufflableCheckBox ) ).addContainerGap( 599, Short.MAX_VALUE ) ).add( layout.createSequentialGroup().addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED, 6, Short.MAX_VALUE ).add( layout.createParallelGroup( org.jdesktop.layout.GroupLayout.TRAILING ).add( jLabel1 ).add( previewQuestionButton ).add( jLabel2 ).add( previewExplanationButton ) ).addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED ).add( layout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING ).add( jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 728, Short.MAX_VALUE ).add( jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 728, Short.MAX_VALUE ) ).addContainerGap() ) ) ) );
layout.linkSize( new java.awt.Component[] { addButton, deleteButton, moveDownButton, moveUpButton }, org.jdesktop.layout.GroupLayout.HORIZONTAL );
layout.linkSize( new java.awt.Component[] { previewExplanationButton, previewQuestionButton }, org.jdesktop.layout.GroupLayout.HORIZONTAL );
layout.setVerticalGroup( layout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING ).add(
layout.createSequentialGroup().addContainerGap().add( layout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING ).add( layout.createSequentialGroup().add( jLabel1 ).addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED ).add( previewQuestionButton ) ).add( jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE ) ).addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED ).add( layout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING ).add( layout.createSequentialGroup().add( jLabel2 ).addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED ).add( previewExplanationButton ) ).add( jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE ) ).addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED )
.add( layout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING ).add( layout.createSequentialGroup().add( moveUpButton ).addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED ).add( moveDownButton ).add( 18, 18, 18 ).add( addButton ).add( 18, 18, 18 ).add( deleteButton ) ).add( jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE ) ).addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED ).add( shufflableCheckBox ).addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED ).add( singleOptionModeCheckBox ).addContainerGap() ) );
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
protected javax.swing.JButton addButton;
protected javax.swing.JButton deleteButton;
protected javax.swing.JTextArea explanationTextArea;
protected javax.swing.JLabel jLabel1;
protected javax.swing.JLabel jLabel2;
protected javax.swing.JScrollPane jScrollPane1;
protected javax.swing.JScrollPane jScrollPane2;
protected javax.swing.JScrollPane jScrollPane3;
protected javax.swing.JButton moveDownButton;
protected javax.swing.JButton moveUpButton;
protected javax.swing.JTable optionsTable;
protected javax.swing.JButton previewExplanationButton;
protected javax.swing.JButton previewQuestionButton;
protected javax.swing.JTextArea questionTextArea;
protected javax.swing.JCheckBox shufflableCheckBox;
protected javax.swing.JCheckBox singleOptionModeCheckBox;
// End of variables declaration//GEN-END:variables
}