[jsword-svn] r2275 - trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install

dmsmith at crosswire.org dmsmith at crosswire.org
Sat Feb 23 17:18:05 MST 2013


Author: dmsmith
Date: 2013-02-23 17:18:05 -0700 (Sat, 23 Feb 2013)
New Revision: 2275

Modified:
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/BookTreeCellRenderer.java
Log:
BD-178 display modules in alphabetic order in the installer

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/BookTreeCellRenderer.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/BookTreeCellRenderer.java	2013-02-21 18:56:36 UTC (rev 2274)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/install/BookTreeCellRenderer.java	2013-02-24 00:18:05 UTC (rev 2275)
@@ -42,11 +42,13 @@
      */
     @Override
     public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean focus) {
+        super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
         String tooltip = null;
         if (leaf && value instanceof BookNode) {
             Object obj = ((BookNode) value).getUserObject();
             if (obj instanceof Book) {
                 Book book = (Book) obj;
+                setText(book.getName() + " (" + book.getInitials() + ")");
                 setLeafIcon(BookIcon.getIcon(book));
 
                 if (book.isQuestionable()) {
@@ -64,7 +66,7 @@
         }
 
         setToolTipText(tooltip);
-        return super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
+        return this;
     }
 
     /**




More information about the jsword-svn mailing list