[jsword-svn] bibledesktop/java/main/org/crosswire/bibledesktop/book s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sun Jun 5 17:17:47 MST 2005


Update of /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book
In directory www.crosswire.org:/tmp/cvs-serv5803/java/main/org/crosswire/bibledesktop/book

Modified Files:
	PassageSelectionPane.java 
Log Message:
Optimized the KeySidebar.
Cleaned up some checkstyle reports.

Index: PassageSelectionPane.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/book/PassageSelectionPane.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** PassageSelectionPane.java	17 May 2005 00:44:30 -0000	1.21
--- PassageSelectionPane.java	6 Jun 2005 00:17:45 -0000	1.22
***************
*** 53,57 ****
  import javax.swing.tree.TreePath;
  
! import org.crosswire.bibledesktop.passage.PassageListModel;
  import org.crosswire.bibledesktop.passage.WholeBibleTreeModel;
  import org.crosswire.bibledesktop.passage.WholeBibleTreeNode;
--- 53,57 ----
  import javax.swing.tree.TreePath;
  
! import org.crosswire.bibledesktop.passage.RangeListModel;
  import org.crosswire.bibledesktop.passage.WholeBibleTreeModel;
  import org.crosswire.bibledesktop.passage.WholeBibleTreeNode;
***************
*** 63,67 ****
  import org.crosswire.jsword.passage.PassageEvent;
  import org.crosswire.jsword.passage.PassageKeyFactory;
- import org.crosswire.jsword.passage.PassageListType;
  import org.crosswire.jsword.passage.PassageListener;
  import org.crosswire.jsword.passage.RestrictionType;
--- 63,66 ----
***************
*** 140,144 ****
      private Component createScrolledList(JLabel label)
      {
!         lstSel = new JList();
          lstSel.addListSelectionListener(new ListSelectionListener()
          {
--- 139,144 ----
      private Component createScrolledList(JLabel label)
      {
!         model = new RangeListModel(RestrictionType.CHAPTER);
!         lstSel = new JList(model);
          lstSel.addListSelectionListener(new ListSelectionListener()
          {
***************
*** 216,219 ****
--- 216,220 ----
              ref.clear();
              ref.addAll(temp);
+             model.setPassage(ref);
  
              setValidPassage(true);
***************
*** 272,276 ****
  
              txtDisplay.setText(refstr);
-             lstSel.setModel(new PassageListModel(ref, PassageListType.RANGES, RestrictionType.CHAPTER));
  
              ref.addPassageListener(new CustomPassageListener());
--- 273,276 ----
***************
*** 340,343 ****
--- 340,344 ----
                  ref.add(range);
              }
+             model.setPassage(ref);
          }
      }
***************
*** 356,359 ****
--- 357,361 ----
                  ref.remove(range);
              }
+             model.setPassage(ref);
          }
      }
***************
*** 425,428 ****
--- 427,431 ----
      private JTree treAll;
      private JList lstSel;
+     private RangeListModel model;
      private JTextField txtDisplay;
      private JLabel lblMessage;



More information about the jsword-svn mailing list