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

jswordcvs at crosswire.org jswordcvs at crosswire.org
Fri Mar 18 18:57:11 MST 2005


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

Modified Files:
	GeneratorPane.java ComparePane.java CompareResultsPane.java 
	MaintenancePane.java 
Log Message:
Made Book the primary interface to a module and put BookMetaData within it. All of BookMetaData is accessible through the Book interface.

Index: CompareResultsPane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/limbo/org/crosswire/bibledesktop/desktop/CompareResultsPane.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CompareResultsPane.java	28 Nov 2004 21:33:58 -0000	1.3
--- CompareResultsPane.java	19 Mar 2005 01:57:09 -0000	1.4
***************
*** 191,196 ****
      {
          lblBible1.setText("<html><b>" + Msg.RESULTS_BOOKS + "</b> " //$NON-NLS-1$ //$NON-NLS-2$
!                            + ver.getBible1().getBookMetaData().getName() + " / " //$NON-NLS-1$
!                            + ver.getBible2().getBookMetaData().getName());
  
          String compare = "<html><b>" + Msg.RESULTS_COMPARING + "</b> "; //$NON-NLS-1$ //$NON-NLS-2$
--- 191,196 ----
      {
          lblBible1.setText("<html><b>" + Msg.RESULTS_BOOKS + "</b> " //$NON-NLS-1$ //$NON-NLS-2$
!                            + ver.getBible1().getName() + " / " //$NON-NLS-1$
!                            + ver.getBible2().getName());
  
          String compare = "<html><b>" + Msg.RESULTS_COMPARING + "</b> "; //$NON-NLS-1$ //$NON-NLS-2$

Index: MaintenancePane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/limbo/org/crosswire/bibledesktop/desktop/MaintenancePane.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MaintenancePane.java	28 Nov 2004 21:33:58 -0000	1.4
--- MaintenancePane.java	19 Mar 2005 01:57:09 -0000	1.5
***************
*** 21,26 ****
  import org.crosswire.common.swing.GuiUtil;
  import org.crosswire.common.util.Reporter;
  import org.crosswire.jsword.book.BookFilters;
- import org.crosswire.jsword.book.BookMetaData;
  
  /**
--- 21,26 ----
  import org.crosswire.common.swing.GuiUtil;
  import org.crosswire.common.util.Reporter;
+ import org.crosswire.jsword.book.Book;
  import org.crosswire.jsword.book.BookFilters;
  
  /**
***************
*** 147,152 ****
          try
          {
!             BookMetaData bmd = getSelected();
!             if (bmd == null)
              {
                  JOptionPane.showMessageDialog(this,
--- 147,152 ----
          try
          {
!             Book book = getSelected();
!             if (book == null)
              {
                  JOptionPane.showMessageDialog(this,
***************
*** 158,166 ****
  
              if (JOptionPane.showConfirmDialog(this,
!                 "Are you sure you want to delete "+bmd.getName()+"?\nDeleted Books can not be recovered", //$NON-NLS-1$ //$NON-NLS-2$
                  "Delete Bible", //$NON-NLS-1$
                  JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
              {
!                 bmd.getDriver().delete(bmd);
              }
          }
--- 158,166 ----
  
              if (JOptionPane.showConfirmDialog(this,
!                 "Are you sure you want to delete "+book.getBookMetaData().getName()+"?\nDeleted Books can not be recovered", //$NON-NLS-1$ //$NON-NLS-2$
                  "Delete Bible", //$NON-NLS-1$
                  JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION)
              {
!                 book.getBookMetaData().getDriver().delete(book);
              }
          }
***************
*** 175,181 ****
       * @return The version name or null if none is selected
       */
!     private BookMetaData getSelected()
      {
!         return (BookMetaData) lst_versions.getSelectedValue();
      }
  
--- 175,181 ----
       * @return The version name or null if none is selected
       */
!     private Book getSelected()
      {
!         return (Book) lst_versions.getSelectedValue();
      }
  

Index: ComparePane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/limbo/org/crosswire/bibledesktop/desktop/ComparePane.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ComparePane.java	28 Nov 2004 21:33:58 -0000	1.2
--- ComparePane.java	19 Mar 2005 01:57:09 -0000	1.3
***************
*** 24,28 ****
  import org.crosswire.jsword.book.Book;
  import org.crosswire.jsword.book.BookFilters;
- import org.crosswire.jsword.book.BookMetaData;
  import org.crosswire.jsword.book.basic.Verifier;
  import org.crosswire.jsword.passage.Key;
--- 24,27 ----
***************
*** 136,143 ****
      protected void compare()
      {
!         BookMetaData bmd1 = mdlBibles1.getSelectedBookMetaData();
!         BookMetaData bmd2 = mdlBibles2.getSelectedBookMetaData();
  
!         if (bmd1.equals(bmd2))
          {
              if (JOptionPane.showConfirmDialog(this, Msg.COMPARE_IDENT_QUESTION.toString(), Msg.COMPARE_IDENT_TITLE.toString(), JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION)
--- 135,142 ----
      protected void compare()
      {
!         Book book1 = mdlBibles1.getSelectedBook();
!         Book book2 = mdlBibles2.getSelectedBook();
  
!         if (book1.equals(book2))
          {
              if (JOptionPane.showConfirmDialog(this, Msg.COMPARE_IDENT_QUESTION.toString(), Msg.COMPARE_IDENT_TITLE.toString(), JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION)
***************
*** 149,155 ****
          try
          {
-             Book book1 = bmd1.getBook();
-             Book book2 = bmd2.getBook();
- 
              String words = txtWords.getText();
              String refText = txtVerses.getText();
--- 148,151 ----

Index: GeneratorPane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/limbo/org/crosswire/bibledesktop/desktop/GeneratorPane.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** GeneratorPane.java	28 Nov 2004 21:33:58 -0000	1.2
--- GeneratorPane.java	19 Mar 2005 01:57:09 -0000	1.3
***************
*** 329,333 ****
                  // Get the values
                  // This cast is safe because the ctor filers for Bibles
!                 Book source = mdlSource.getSelectedBookMetaData().getBook();
                  BookDriver destDriver = mdlDriver.getSelectedDriver();
  
--- 329,333 ----
                  // Get the values
                  // This cast is safe because the ctor filers for Bibles
!                 Book source = mdlSource.getSelectedBook();
                  BookDriver destDriver = mdlDriver.getSelectedDriver();
  



More information about the jsword-svn mailing list