[jsword-svn] r2272 - in trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop: book passage

dmsmith at crosswire.org dmsmith at crosswire.org
Wed Feb 20 09:36:29 MST 2013


Author: dmsmith
Date: 2013-02-20 09:36:29 -0700 (Wed, 20 Feb 2013)
New Revision: 2272

Modified:
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/WholeBibleTreeNode.java
Log:
Keeping up with the av11n changes.

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java	2013-02-19 17:15:34 UTC (rev 2271)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java	2013-02-20 16:36:29 UTC (rev 2272)
@@ -77,7 +77,7 @@
 
         switch (level) {
         case BOOK:
-            selected = set.getVerse().getBook().getBookName();
+            selected = set.getVerse().getVersification().getBookName(set.getVerse().getBook());
             break;
 
         case CHAPTER:
@@ -136,7 +136,7 @@
     public int getSize() {
         switch (level) {
         case BOOK:
-            return v11n.getBooks().getBookCount();
+            return v11n.getBookCount();
 
         case CHAPTER:
             return v11n.getLastChapter(set.getVerse().getBook());
@@ -156,7 +156,7 @@
     public Object getElementAt(int index) {
         switch (level) {
         case BOOK:
-            return v11n.getBooks().getBook(index);
+            return v11n.getBook(index);
         default:
             return Integer.valueOf(index + 1);
 

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java	2013-02-19 17:15:34 UTC (rev 2271)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java	2013-02-20 16:36:29 UTC (rev 2272)
@@ -72,7 +72,7 @@
         cboBook.addItemListener(cil);
         cboBook.setRenderer(new BibleNameCellRenderer(true));
 
-        cboBook.setToolTipText(verse.getBook().getLongName());
+        cboBook.setToolTipText(verse.getVersification().getLongName(verse.getBook()));
     }
 
     /**
@@ -119,7 +119,8 @@
         Verse oldverse = verse;
         verse = newverse;
         BibleBook bookval = newverse.getBook();
-        BookName bookName = bookval.getBookName();
+        BookName bookName = newverse.getVersification().getBookName(bookval);
+
         if (oldverse.getBook() != bookval || !cboBook.getSelectedItem().equals(bookName)) {
             cboBook.setSelectedItem(bookName);
             cboBook.setToolTipText(bookName.getLongName());

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/WholeBibleTreeNode.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/WholeBibleTreeNode.java	2013-02-19 17:15:34 UTC (rev 2271)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/WholeBibleTreeNode.java	2013-02-20 16:36:29 UTC (rev 2272)
@@ -46,8 +46,7 @@
      */
     public static WholeBibleTreeNode getRootNode() {
         // AV11N(DMS): Is this right?
-        Versification v11n = Versifications.instance().getDefaultVersification();
-        return new WholeBibleTreeNode(null, v11n.getAllVerses(), Level.BIBLE);
+        return new WholeBibleTreeNode(null, Versifications.instance().getDefaultVersification().getAllVerses(), Level.BIBLE);
     }
 
     /**
@@ -137,7 +136,8 @@
             return BDMsg.gettext("The Bible");
 
         case BOOK:
-            return range.getStart().getBook().getPreferredName();
+            Verse start = range.getStart();
+            return start.getVersification().getPreferredName(start.getBook());
 
         case CHAPTER:
             return shaper.shape(Integer.toString(range.getStart().getChapter()));
@@ -157,7 +157,7 @@
     public TreeNode getChildAt(int i) {
         switch (level) {
         case BIBLE:
-            return WholeBibleTreeNode.getNode(this, rs.getBooks().getBook(i), -1, -1);
+            return WholeBibleTreeNode.getNode(this, v11n.getBook(i), -1, -1);
 
         case BOOK:
             return WholeBibleTreeNode.getNode(this, range.getStart().getBook(), i, -1);
@@ -177,13 +177,13 @@
     public int getChildCount() {
         switch (level) {
         case BIBLE:
-            return rs.getBooks().getBookCount();
+            return v11n.getBookCount();
 
         case BOOK:
-            return rs.getLastChapter(range.getStart().getBook()) + 1;
+            return v11n.getLastChapter(range.getStart().getBook()) + 1;
 
         case CHAPTER:
-            return rs.getLastVerse(range.getStart().getBook(), range.getStart().getChapter()) + 1;
+            return v11n.getLastVerse(range.getStart().getBook(), range.getStart().getChapter()) + 1;
 
         default:
             return 0;
@@ -255,7 +255,7 @@
     }
 
     // AV11N(DMS): Is this right?
-    private Versification rs = Versifications.instance().getDefaultVersification();
+    private Versification v11n = Versifications.instance().getDefaultVersification();
 
     /** Change the number representation as needed */
     private NumberShaper shaper;




More information about the jsword-svn mailing list