[jsword-svn] bibledesktop/java/limbo/org/crosswire/bibledesktop/desktop s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sun Nov 28 14:34:00 MST 2004


Update of /cvs/jsword/bibledesktop/java/limbo/org/crosswire/bibledesktop/desktop
In directory www.crosswire.org:/tmp/cvs-serv10798/java/limbo/org/crosswire/bibledesktop/desktop

Modified Files:
	CompareResultsPane.java GeneratorPane.java 
	MaintenancePane.java ComparePane.java 
Log Message:
intellij refactor - not critical

Index: CompareResultsPane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/limbo/org/crosswire/bibledesktop/desktop/CompareResultsPane.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CompareResultsPane.java	29 Sep 2004 21:53:33 -0000	1.2
--- CompareResultsPane.java	28 Nov 2004 21:33:58 -0000	1.3
***************
*** 36,40 ****
   * This displays the results of a comparision that occurs in a separate
   * thread.
!  * 
   * <p><table border='1' cellPadding='3' cellSpacing='0'>
   * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
--- 36,40 ----
   * This displays the results of a comparision that occurs in a separate
   * thread.
!  *
   * <p><table border='1' cellPadding='3' cellSpacing='0'>
   * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
***************
*** 60,64 ****
  public class CompareResultsPane extends JPanel implements Runnable
  {
!     /**
       * Basic Constructor
       */
--- 60,64 ----
  public class CompareResultsPane extends JPanel implements Runnable
  {
! 	/**
       * Basic Constructor
       */
***************
*** 170,176 ****
       * to the given word before we run the check.
       */
!     public void setCheckText(String check_text)
      {
!         this.checkText = check_text;
          setTitles();
      }
--- 170,176 ----
       * to the given word before we run the check.
       */
!     public void setCheckText(String checkText)
      {
!         this.checkText = checkText;
          setTitles();
      }
***************
*** 197,201 ****
          if (checkRef != null)
          {
!             compare += Msg.RESULTS_PASSAGE + "=" + checkRef + " "; //$NON-NLS-1$ //$NON-NLS-2$
          }
  
--- 197,201 ----
          if (checkRef != null)
          {
!             compare += Msg.RESULTS_PASSAGE + "=" + checkRef + ' '; //$NON-NLS-1$
          }
  
***************
*** 312,315 ****
--- 312,320 ----
  
      /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3257845467781085240L;
+ 
+     /**
       * Report progress changes to the screen
       */

Index: MaintenancePane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/limbo/org/crosswire/bibledesktop/desktop/MaintenancePane.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** MaintenancePane.java	21 Sep 2004 17:46:47 -0000	1.3
--- MaintenancePane.java	28 Nov 2004 21:33:58 -0000	1.4
***************
*** 28,32 ****
   * deletion, renaming, and viewing the notes that are associated with the
   * generation of a version.
!  * 
   * <p><table border='1' cellPadding='3' cellSpacing='0'>
   * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
--- 28,32 ----
   * deletion, renaming, and viewing the notes that are associated with the
   * generation of a version.
!  *
   * <p><table border='1' cellPadding='3' cellSpacing='0'>
   * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
***************
*** 52,56 ****
  public class MaintenancePane extends EirPanel
  {
!     // I18N: This class has not been internationalized, because it is not used.
      /**
       * Create a new BibleMaintenance Panel
--- 52,56 ----
  public class MaintenancePane extends EirPanel
  {
! 	// I18N: This class has not been internationalized, because it is not used.
      /**
       * Create a new BibleMaintenance Panel
***************
*** 65,69 ****
       * Ensure that the buttons are enabled correctly
       */
!     protected void updateButtons()
      {
          boolean selected = (lst_versions.getSelectedIndex() != -1);
--- 65,69 ----
       * Ensure that the buttons are enabled correctly
       */
!     protected final void updateButtons()
      {
          boolean selected = (lst_versions.getSelectedIndex() != -1);
***************
*** 214,216 ****
--- 214,221 ----
       */
      private FlowLayout lay_buttons = new FlowLayout();
+ 
+     /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3257284721162663473L;
  }

Index: ComparePane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/limbo/org/crosswire/bibledesktop/desktop/ComparePane.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ComparePane.java	27 Jul 2004 21:41:33 -0000	1.1
--- ComparePane.java	28 Nov 2004 21:33:58 -0000	1.2
***************
*** 60,64 ****
  public class ComparePane extends EirPanel
  {
!     /**
       * Basic Constructor
       */
--- 60,64 ----
  public class ComparePane extends EirPanel
  {
! 	/**
       * Basic Constructor
       */
***************
*** 208,210 ****
      private JPanel pnlButtons = new JPanel();
      private JButton btnGo = new JButton();
! }
\ No newline at end of file
--- 208,215 ----
      private JPanel pnlButtons = new JPanel();
      private JButton btnGo = new JButton();
! 
!     /**
!      * Serialization ID
!      */
!     private static final long serialVersionUID = 3904678297190478129L;
! }

Index: GeneratorPane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/limbo/org/crosswire/bibledesktop/desktop/GeneratorPane.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** GeneratorPane.java	27 Jul 2004 21:41:33 -0000	1.1
--- GeneratorPane.java	28 Nov 2004 21:33:58 -0000	1.2
***************
*** 49,53 ****
   * maint.showInDialog(getComponent());
   * </pre>
!  * 
   * <p><table border='1' cellPadding='3' cellSpacing='0'>
   * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
--- 49,53 ----
   * maint.showInDialog(getComponent());
   * </pre>
!  *
   * <p><table border='1' cellPadding='3' cellSpacing='0'>
   * <tr><td bgColor='white' class='TableRowColor'><font size='-7'>
***************
*** 73,77 ****
  public class GeneratorPane extends EirPanel
  {
!     // I18N: This class has not been internationalized, because it is not used.
      /**
       * Construct a Bible Generator tool, this simply calls jbInit
--- 73,77 ----
  public class GeneratorPane extends EirPanel
  {
! 	// I18N: This class has not been internationalized, because it is not used.
      /**
       * Construct a Bible Generator tool, this simply calls jbInit
***************
*** 87,122 ****
      private void init()
      {
!         cbo_source.setModel(mdl_source);
!         cbo_source.setRenderer(new BookListCellRenderer());
!         lbl_source.setText("  Source Bible: "); //$NON-NLS-1$
!         pnl_source.setLayout(new BorderLayout());
!         pnl_source.setBorder(BorderFactory.createTitledBorder("Source")); //$NON-NLS-1$
!         pnl_source.add(lbl_source, BorderLayout.WEST);
!         pnl_source.add(cbo_source, BorderLayout.CENTER);
  
!         lbl_name.setText("New Name:"); //$NON-NLS-1$
!         lbl_driver.setText("Driver Class:"); //$NON-NLS-1$
  
!         cbo_driver.setModel(mdl_driver);
!         pnl_dest.setLayout(lay_dest);
!         pnl_dest.setBorder(BorderFactory.createTitledBorder("Destination")); //$NON-NLS-1$
  
!         pnl_dest.add(lbl_name, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0));
!         pnl_dest.add(lbl_driver, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 0), 0, 0));
!         pnl_dest.add(cbo_driver, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0));
  
!         bar_prog.setBorderPainted(true);
!         bar_prog.setMaximum(100);
!         bar_prog.setString(""); //$NON-NLS-1$
!         bar_prog.setStringPainted(true);
!         pnl_prog.setLayout(new BorderLayout());
!         pnl_prog.setBorder(BorderFactory.createTitledBorder("Progress")); //$NON-NLS-1$
!         pnl_prog.add(bar_prog, BorderLayout.CENTER);
  
!         box_main = Box.createVerticalBox();
!         box_main.add(pnl_source, null);
!         box_main.add(pnl_dest, null);
  
!         btn_generate.addActionListener(new ActionListener()
          {
              public void actionPerformed(ActionEvent ev)
--- 87,122 ----
      private void init()
      {
!         cboSource.setModel(mdlSource);
!         cboSource.setRenderer(new BookListCellRenderer());
!         lblSource.setText("  Source Bible: "); //$NON-NLS-1$
!         pnlSource.setLayout(new BorderLayout());
!         pnlSource.setBorder(BorderFactory.createTitledBorder("Source")); //$NON-NLS-1$
!         pnlSource.add(lblSource, BorderLayout.WEST);
!         pnlSource.add(cboSource, BorderLayout.CENTER);
  
!         lblName.setText("New Name:"); //$NON-NLS-1$
!         lblDriver.setText("Driver Class:"); //$NON-NLS-1$
  
!         cboDriver.setModel(mdlDriver);
!         pnlDest.setLayout(layDest);
!         pnlDest.setBorder(BorderFactory.createTitledBorder("Destination")); //$NON-NLS-1$
  
!         pnlDest.add(lblName, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 5), 0, 0));
!         pnlDest.add(lblDriver, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 0), 0, 0));
!         pnlDest.add(cboDriver, new GridBagConstraints(1, 2, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0));
  
!         barProg.setBorderPainted(true);
!         barProg.setMaximum(100);
!         barProg.setString(""); //$NON-NLS-1$
!         barProg.setStringPainted(true);
!         pnlProg.setLayout(new BorderLayout());
!         pnlProg.setBorder(BorderFactory.createTitledBorder("Progress")); //$NON-NLS-1$
!         pnlProg.add(barProg, BorderLayout.CENTER);
  
!         boxMain = Box.createVerticalBox();
!         boxMain.add(pnlSource, null);
!         boxMain.add(pnlDest, null);
  
!         btnGenerate.addActionListener(new ActionListener()
          {
              public void actionPerformed(ActionEvent ev)
***************
*** 125,143 ****
              }
          });
!         btn_generate.setText("Generate"); //$NON-NLS-1$
!         btn_generate.setMnemonic('G');
  
!         chk_verify.setText("Verify After Generation"); //$NON-NLS-1$
!         chk_verify.setMnemonic('V');
!         chk_verify.setSelected(false);
!         lay_buttons.setAlignment(FlowLayout.RIGHT);
!         pnl_buttons.setLayout(lay_buttons);
!         pnl_buttons.add(chk_verify, null);
!         pnl_buttons.add(btn_generate, null);
  
          this.setLayout(new BorderLayout());
!         this.add(box_main, BorderLayout.NORTH);
!         this.add(pnl_prog, BorderLayout.CENTER);
!         this.add(pnl_buttons, BorderLayout.SOUTH);
      }
  
--- 125,143 ----
              }
          });
!         btnGenerate.setText("Generate"); //$NON-NLS-1$
!         btnGenerate.setMnemonic('G');
  
!         chkVerify.setText("Verify After Generation"); //$NON-NLS-1$
!         chkVerify.setMnemonic('V');
!         chkVerify.setSelected(false);
!         layButtons.setAlignment(FlowLayout.RIGHT);
!         pnlButtons.setLayout(layButtons);
!         pnlButtons.add(chkVerify, null);
!         pnlButtons.add(btnGenerate, null);
  
          this.setLayout(new BorderLayout());
!         this.add(boxMain, BorderLayout.NORTH);
!         this.add(pnlProg, BorderLayout.CENTER);
!         this.add(pnlButtons, BorderLayout.SOUTH);
      }
  
***************
*** 158,164 ****
          final JDialog frame = new JDialog(parent, "Bible Generator"); //$NON-NLS-1$
  
!         btn_close = new JButton("Close"); //$NON-NLS-1$
!         btn_close.setMnemonic('C');
!         btn_close.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent ev)
              {
--- 158,164 ----
          final JDialog frame = new JDialog(parent, "Bible Generator"); //$NON-NLS-1$
  
!         btnClose = new JButton("Close"); //$NON-NLS-1$
!         btnClose.setMnemonic('C');
!         btnClose.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent ev)
              {
***************
*** 167,171 ****
              }
          });
!         pnl_buttons.add(btn_close, null);
  
          this.setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 5));
--- 167,171 ----
              }
          });
!         pnlButtons.add(btnClose, null);
  
          this.setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 5));
***************
*** 197,225 ****
          work.setPriority(Thread.MIN_PRIORITY);
      }
!     
      /**
       * Holder for the source and destination area
       */
!     private Box box_main;
!     
      /**
       * The Source area
       */
!     private JPanel pnl_source = new JPanel();
!     
      /**
       * The destination area
       */
!     private JPanel pnl_dest = new JPanel();
!     
      /**
       * The source book label
       */
!     private JLabel lbl_source = new JLabel();
!     
      /**
       * The source picker
       */
!     protected JComboBox cbo_source = new JComboBox();
  
      /**
--- 197,225 ----
          work.setPriority(Thread.MIN_PRIORITY);
      }
! 
      /**
       * Holder for the source and destination area
       */
!     private Box boxMain;
! 
      /**
       * The Source area
       */
!     private JPanel pnlSource = new JPanel();
! 
      /**
       * The destination area
       */
!     private JPanel pnlDest = new JPanel();
! 
      /**
       * The source book label
       */
!     private JLabel lblSource = new JLabel();
! 
      /**
       * The source picker
       */
!     protected JComboBox cboSource = new JComboBox();
  
      /**
***************
*** 227,296 ****
       * Bibles are required in GeneratorRunnable.run()
       */
!     protected BooksComboBoxModel mdl_source = new BooksComboBoxModel(BookFilters.getBibles());
  
      /**
       * Layout for the destination panel
       */
!     private GridBagLayout lay_dest = new GridBagLayout();
  
      /**
       * The new version name label
       */
!     private JLabel lbl_name = new JLabel();
  
      /**
       * Label for the new name class
       */
!     private JLabel lbl_driver = new JLabel();
  
      /**
       * Input field for the name class
       */
!     protected JComboBox cbo_driver = new JComboBox();
  
      /**
       * The model for the drivers
       */
!     protected DriversComboBoxModel mdl_driver = new DriversComboBoxModel(false);
  
      /**
       * The progress area
       */
!     private JPanel pnl_prog = new JPanel();
  
      /**
       * The progress bar
       */
!     protected JProgressBar bar_prog = new JProgressBar();
  
      /**
       * The button bar
       */
!     private JPanel pnl_buttons = new JPanel();
  
      /**
       * Layout for the button bar
       */
!     private FlowLayout lay_buttons = new FlowLayout();
  
      /**
       * The generate button
       */
!     protected JButton btn_generate = new JButton();
  
      /**
       * The close button, only used if we are in our own Frame
       */
!     protected JButton btn_close = null;
  
      /**
       * The verify checkbox
       */
!     protected JCheckBox chk_verify = new JCheckBox();
  
      /**
       * Work in progress
       */
!     protected Thread work;
  
      /**
--- 227,296 ----
       * Bibles are required in GeneratorRunnable.run()
       */
!     protected BooksComboBoxModel mdlSource = new BooksComboBoxModel(BookFilters.getBibles());
  
      /**
       * Layout for the destination panel
       */
!     private GridBagLayout layDest = new GridBagLayout();
  
      /**
       * The new version name label
       */
!     private JLabel lblName = new JLabel();
  
      /**
       * Label for the new name class
       */
!     private JLabel lblDriver = new JLabel();
  
      /**
       * Input field for the name class
       */
!     protected JComboBox cboDriver = new JComboBox();
  
      /**
       * The model for the drivers
       */
!     protected DriversComboBoxModel mdlDriver = new DriversComboBoxModel(false);
  
      /**
       * The progress area
       */
!     private JPanel pnlProg = new JPanel();
  
      /**
       * The progress bar
       */
!     protected JProgressBar barProg = new JProgressBar();
  
      /**
       * The button bar
       */
!     private JPanel pnlButtons = new JPanel();
  
      /**
       * Layout for the button bar
       */
!     private FlowLayout layButtons = new FlowLayout();
  
      /**
       * The generate button
       */
!     protected JButton btnGenerate = new JButton();
  
      /**
       * The close button, only used if we are in our own Frame
       */
!     protected JButton btnClose = null;
  
      /**
       * The verify checkbox
       */
!     protected JCheckBox chkVerify = new JCheckBox();
  
      /**
       * Work in progress
       */
!     protected Thread work =  null;
  
      /**
***************
*** 300,303 ****
--- 300,308 ----
  
      /**
+      * Serialization ID
+      */
+     private static final long serialVersionUID = 3979270239726743601L;
+ 
+     /**
       * A class to be run in a Thread to do the real work of generating the
       * new Bible
***************
*** 312,320 ****
                  public void run()
                  {
!                     cbo_source.setEnabled(false);
!                     cbo_driver.setEnabled(false);
!                     btn_generate.setEnabled(false);
!                     chk_verify.setEnabled(false);
!                     btn_close.setText("Cancel"); //$NON-NLS-1$
                  }
              });
--- 317,325 ----
                  public void run()
                  {
!                     cboSource.setEnabled(false);
!                     cboDriver.setEnabled(false);
!                     btnGenerate.setEnabled(false);
!                     chkVerify.setEnabled(false);
!                     btnClose.setText("Cancel"); //$NON-NLS-1$
                  }
              });
***************
*** 324,338 ****
                  // Get the values
                  // This cast is safe because the ctor filers for Bibles
!                 Book source = mdl_source.getSelectedBookMetaData().getBook();
!                 BookDriver dest_driver = mdl_driver.getSelectedDriver();
  
                  // The real work
                  // This cast is safe because we passed in a Bible
!                 Book dest_version = dest_driver.create(source);
  
                  // Check
!                 if (chk_verify.isEnabled())
                  {
!                     Verifier ver = new Verifier(source, dest_version);
  
                      CompareResultsPane results = new CompareResultsPane(ver);
--- 329,343 ----
                  // Get the values
                  // This cast is safe because the ctor filers for Bibles
!                 Book source = mdlSource.getSelectedBookMetaData().getBook();
!                 BookDriver destDriver = mdlDriver.getSelectedDriver();
  
                  // The real work
                  // This cast is safe because we passed in a Bible
!                 Book destVersion = destDriver.create(source);
  
                  // Check
!                 if (chkVerify.isEnabled())
                  {
!                     Verifier ver = new Verifier(source, destVersion);
  
                      CompareResultsPane results = new CompareResultsPane(ver);
***************
*** 359,367 ****
                  public void run()
                  {
!                     cbo_source.setEnabled(true);
!                     cbo_driver.setEnabled(true);
!                     btn_generate.setEnabled(true);
!                     chk_verify.setEnabled(true);
!                     btn_close.setText("Close"); //$NON-NLS-1$
                  }
              });
--- 364,372 ----
                  public void run()
                  {
!                     cboSource.setEnabled(true);
!                     cboDriver.setEnabled(true);
!                     btnGenerate.setEnabled(true);
!                     chkVerify.setEnabled(true);
!                     btnClose.setText("Close"); //$NON-NLS-1$
                  }
              });
***************
*** 385,390 ****
                      Job job = ev.getJob();
                      int percent = job.getPercent();
!                     bar_prog.setString(job.getStateDescription() + ": (" + percent + "%)"); //$NON-NLS-1$  //$NON-NLS-2$
!                     bar_prog.setValue(percent);
                  }
              });
--- 390,395 ----
                      Job job = ev.getJob();
                      int percent = job.getPercent();
!                     barProg.setString(job.getStateDescription() + ": (" + percent + "%)"); //$NON-NLS-1$  //$NON-NLS-2$
!                     barProg.setValue(percent);
                  }
              });



More information about the jsword-svn mailing list