[jsword-svn] r1412 - in trunk: bibledesktop/src/main/java/org/crosswire/bibledesktop/book bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop bibledesktop/src/main/java/org/crosswire/bibledesktop/display bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic bibledesktop/src/main/resources/xsl/cswing jsword-limbo/src/main/java/org/crosswire/bibledesktop/book jsword-limbo/src/main/java/org/crosswire/bibledesktop/display/jdtb jsword-limbo/src/main/java/org/crosswire/bibledesktop/reference

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Sun Jun 17 21:06:02 MST 2007


Author: dmsmith
Date: 2007-06-17 21:06:00 -0700 (Sun, 17 Jun 2007)
New Revision: 1412

Modified:
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/TextPaneBookMetaDataDisplay.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/BookDataDisplay.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ProxyBookDataDisplay.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/SplitBookDataDisplay.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TabbedBookDataDisplay.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java
   trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl
   trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/book/CommentaryPane.java
   trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/display/jdtb/JDTBBookDataDisplay.java
   trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/reference/ReferencedPane.java
Log:
Fixed a couple of bugs.

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java	2007-06-16 12:07:31 UTC (rev 1411)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java	2007-06-18 04:06:00 UTC (rev 1412)
@@ -136,10 +136,18 @@
      */
     public void setBookData(Book[] books, Key key)
     {
-        throw new UnsupportedOperationException();
+        display.setBookData(books, key);
     }
 
     /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setCompareBooks(boolean)
+     */
+    public void setCompareBooks(boolean compare)
+    {
+        display.setCompareBooks(compare);
+    }
+
+    /* (non-Javadoc)
      * @see org.crosswire.bibledesktop.display.BookDataDisplay#refresh()
      */
     public void refresh()

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/TextPaneBookMetaDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/TextPaneBookMetaDataDisplay.java	2007-06-16 12:07:31 UTC (rev 1411)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/TextPaneBookMetaDataDisplay.java	2007-06-18 04:06:00 UTC (rev 1412)
@@ -61,8 +61,9 @@
         txtView.setEditorKit(new HTMLEditorKit());
     }
 
-    /* (non-Javadoc)
-     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setBookData(org.crosswire.jsword.book.Book, org.crosswire.jsword.passage.Key)
+    /**
+     * Change the book being displayed to a new one.
+     * @param book
      */
     public void setBook(Book book)
     {

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java	2007-06-16 12:07:31 UTC (rev 1411)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Desktop.java	2007-06-18 04:06:00 UTC (rev 1412)
@@ -560,6 +560,7 @@
         BookDataDisplay display = view.getPassagePane().getBookDataDisplay();
         display.addURIEventListener(this);
         display.addURIEventListener(barStatus);
+        display.setCompareBooks(compareShowing);
         changeSupport.addPropertyChangeListener(BookDataDisplay.COMPARE_BOOKS, display);
         DisplaySelectPane dsp = view.getSelectPane();
         dsp.addCommandListener(this);

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/BookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/BookDataDisplay.java	2007-06-16 12:07:31 UTC (rev 1411)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/BookDataDisplay.java	2007-06-18 04:06:00 UTC (rev 1412)
@@ -61,6 +61,13 @@
     void setBookData(Book[] books, Key key);
 
     /**
+     * Establish whether books in the book array should be compared.
+     * 
+     * @param compare
+     */
+    void setCompareBooks(boolean compare);
+
+    /**
      * The Book Key that we are displaying, or null if we are not displaying
      * anything
      * @return The current key
@@ -108,5 +115,4 @@
      * Accessor for the Swing component
      */
     Component getComponent();
-
 }

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ProxyBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ProxyBookDataDisplay.java	2007-06-16 12:07:31 UTC (rev 1411)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ProxyBookDataDisplay.java	2007-06-18 04:06:00 UTC (rev 1412)
@@ -130,6 +130,14 @@
     }
 
     /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setCompareBooks(boolean)
+     */
+    public void setCompareBooks(boolean compare)
+    {
+        proxy.setCompareBooks(compare);
+    }
+
+    /* (non-Javadoc)
      * @see org.crosswire.bibledesktop.display.BookDataDisplay#refresh()
      */
     public void refresh()

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/SplitBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/SplitBookDataDisplay.java	2007-06-16 12:07:31 UTC (rev 1411)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/SplitBookDataDisplay.java	2007-06-18 04:06:00 UTC (rev 1412)
@@ -87,8 +87,10 @@
         return child;
     }
 
-    /* (non-Javadoc)
-     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setBookData(org.crosswire.jsword.book.Book, org.crosswire.jsword.passage.Key)
+    /**
+     * Set the books and/or key to display.
+     * @param books
+     * @param key
      */
     public void setBookData(Book[] books, Key key)
     {

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TabbedBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TabbedBookDataDisplay.java	2007-06-16 12:07:31 UTC (rev 1411)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TabbedBookDataDisplay.java	2007-06-18 04:06:00 UTC (rev 1412)
@@ -106,7 +106,7 @@
     }
 
     /* (non-Javadoc)
-     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setBookData(org.crosswire.jsword.book.Book, org.crosswire.jsword.passage.Key)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setBookData(org.crosswire.jsword.book.Book[], org.crosswire.jsword.passage.Key)
      */
     public void setBookData(Book[] books, Key newkey)
     {
@@ -171,6 +171,20 @@
     }
 
     /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setCompareBooks(boolean)
+     */
+    public void setCompareBooks(boolean compare)
+    {
+        // Now go through all the known tabs and refresh each
+        Iterator iter = displays.iterator();
+        while (iter.hasNext())
+        {
+            BookDataDisplay bdd = (BookDataDisplay) iter.next();
+            bdd.setCompareBooks(compare);
+        }
+    }
+
+    /* (non-Javadoc)
      * @see org.crosswire.bibledesktop.display.BookDataDisplay#refresh()
      */
     public void refresh()

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java	2007-06-16 12:07:31 UTC (rev 1411)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/basic/TextPaneBookDataDisplay.java	2007-06-18 04:06:00 UTC (rev 1412)
@@ -117,6 +117,19 @@
     }
 
     /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setCompareBooks(boolean)
+     */
+    public void setCompareBooks(boolean compare)
+    {
+        compareBooks = compare;
+        if (bdata != null)
+        {
+            bdata = new BookData(bdata.getBooks(), bdata.getKey(), compareBooks);
+            refresh();
+        }
+    }
+
+    /* (non-Javadoc)
      * @see org.crosswire.bibledesktop.display.BookDataDisplay#refresh()
      */
     public void refresh()
@@ -275,12 +288,7 @@
     {
         if (evt.getPropertyName().equals(BookDataDisplay.COMPARE_BOOKS))
         {
-            compareBooks = Boolean.valueOf(evt.getNewValue().toString()).booleanValue();
-            if (bdata != null)
-            {
-                bdata = new BookData(bdata.getBooks(), bdata.getKey(), compareBooks);
-                refresh();
-            }
+            setCompareBooks(Boolean.valueOf(evt.getNewValue().toString()).booleanValue());
         }
     }
 

Modified: trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl
===================================================================
--- trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl	2007-06-16 12:07:31 UTC (rev 1411)
+++ trunk/bibledesktop/src/main/resources/xsl/cswing/simple.xsl	2007-06-18 04:06:00 UTC (rev 1412)
@@ -617,7 +617,7 @@
     <xsl:variable name="orig-morph" select="substring-after($morph, ':')"/>
     <xsl:variable name="protocol">
       <xsl:choose>
-        <xsl:when test="starts-with($orig-work, 'x-Robinson:') or starts-with($orig-work, 'robinson:')">
+        <xsl:when test="starts-with($orig-work, 'x-Robinson') or starts-with($orig-work, 'robinson')">
           <xsl:value-of select="$greek.morph.protocol"/>
         </xsl:when>
         <xsl:otherwise>

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/book/CommentaryPane.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/book/CommentaryPane.java	2007-06-16 12:07:31 UTC (rev 1411)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/book/CommentaryPane.java	2007-06-18 04:06:00 UTC (rev 1412)
@@ -197,6 +197,14 @@
     }
 
     /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setCompareBooks(boolean)
+     */
+    public void setCompareBooks(boolean compare)
+    {
+        throw new UnsupportedOperationException();
+    }
+
+    /* (non-Javadoc)
      * @see org.crosswire.bibledesktop.display.BookDataDisplay#refresh()
      */
     public void refresh()

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/display/jdtb/JDTBBookDataDisplay.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/display/jdtb/JDTBBookDataDisplay.java	2007-06-16 12:07:31 UTC (rev 1411)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/display/jdtb/JDTBBookDataDisplay.java	2007-06-18 04:06:00 UTC (rev 1412)
@@ -82,6 +82,14 @@
     }
 
     /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setCompareBooks(boolean)
+     */
+    public void setCompareBooks(boolean compare)
+    {
+        throw new UnsupportedOperationException();
+    }
+
+    /* (non-Javadoc)
      * @see org.crosswire.bibledesktop.display.BookDataDisplay#refresh()
      */
     public void refresh()

Modified: trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/reference/ReferencedPane.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/reference/ReferencedPane.java	2007-06-16 12:07:31 UTC (rev 1411)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/reference/ReferencedPane.java	2007-06-18 04:06:00 UTC (rev 1412)
@@ -149,6 +149,14 @@
     }
 
     /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setCompareBooks(boolean)
+     */
+    public void setCompareBooks(boolean compare)
+    {
+        throw new UnsupportedOperationException();
+    }
+
+    /* (non-Javadoc)
      * @see org.crosswire.bibledesktop.display.BookDataDisplay#refresh()
      */
     public void refresh()




More information about the jsword-svn mailing list