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

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sun May 8 18:28:32 MST 2005


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

Modified Files:
	KeySidebar.java PassageGuiUtil.java WholeBibleTreeModel.java 
Removed Files:
	KeyTreeCellRenderer.java BibleTreeNode.java 
	ChapterTreeNode.java BookTreeNode.java KeyTreeModel.java 
	PassageListCellRenderer.java PassageTreeModel.java 
	PassageTreeNode.java KeyTreeNode.java VerseRangeTreeNode.java 
	VerseTreeNode.java 
Log Message:
Moved unused code to limbo.
Upgraded support-tools: checkstyle, pmd and findbugs to most recent.
Addressed over 100 issues reported by findbugs and checkstyle.
Resulted in major refactoring of GBFFilter.
Net result is that code size is significantly smaller.

Index: PassageGuiUtil.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/passage/PassageGuiUtil.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** PassageGuiUtil.java	30 Aug 2004 09:26:14 -0000	1.6
--- PassageGuiUtil.java	9 May 2005 01:28:30 -0000	1.7
***************
*** 1,12 ****
  package org.crosswire.bibledesktop.passage;
  
- import java.util.Iterator;
- 
  import javax.swing.JList;
- import javax.swing.JTree;
- import javax.swing.tree.TreePath;
  
- import org.crosswire.jsword.passage.DefaultKeyList;
- import org.crosswire.jsword.passage.Key;
  import org.crosswire.jsword.passage.Passage;
  import org.crosswire.jsword.passage.VerseRange;
--- 1,6 ----
***************
*** 67,101 ****
       * @param tree The tree to delete selected verses from
       */
!     public static void deleteSelectedVersesFromTree(JTree tree)
!     {
!         Key selected = getSelectedKeys(tree);
! 
!         KeyTreeModel mdl = (KeyTreeModel) tree.getModel();
!         Key root = mdl.getKey();
! 
!         for (Iterator it = selected.iterator(); it.hasNext(); )
!         {
!             Key key = (Key) it.next();
!             root.removeAll(key);
!         }
! 
!         mdl.setKey(root);
!     }
  
      /**
       * @return The selected keys in the tree
       */
!     public static Key getSelectedKeys(JTree tree)
!     {
!         Key selected = new DefaultKeyList();
!         TreePath[] paths = tree.getSelectionPaths();
! 
!         for (int i = 0; i < paths.length; i++)
!         {
!             KeyTreeNode node = (KeyTreeNode) paths[1].getLastPathComponent();
!             selected.addAll(node.getKey());
!         }
! 
!         return selected;
!     }
  }
--- 61,95 ----
       * @param tree The tree to delete selected verses from
       */
! //    public static void deleteSelectedVersesFromTree(JTree tree)
! //    {
! //        Key selected = getSelectedKeys(tree);
! //
! //        KeyTreeModel mdl = (KeyTreeModel) tree.getModel();
! //        Key root = mdl.getKey();
! //
! //        for (Iterator it = selected.iterator(); it.hasNext(); )
! //        {
! //            Key key = (Key) it.next();
! //            root.removeAll(key);
! //        }
! //
! //        mdl.setKey(root);
! //    }
  
      /**
       * @return The selected keys in the tree
       */
! //    public static Key getSelectedKeys(JTree tree)
! //    {
! //        Key selected = new DefaultKeyList();
! //        TreePath[] paths = tree.getSelectionPaths();
! //
! //        for (int i = 0; i < paths.length; i++)
! //        {
! //            KeyTreeNode node = (KeyTreeNode) paths[1].getLastPathComponent();
! //            selected.addAll(node.getKey());
! //        }
! //
! //        return selected;
! //    }
  }

--- KeyTreeCellRenderer.java DELETED ---

--- PassageTreeNode.java DELETED ---

--- ChapterTreeNode.java DELETED ---

Index: KeySidebar.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/passage/KeySidebar.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** KeySidebar.java	2 May 2005 01:29:24 -0000	1.7
--- KeySidebar.java	9 May 2005 01:28:30 -0000	1.8
***************
*** 295,299 ****
       * Inform the command keyChangeListeners
       */
!     protected void fireKeyChanged(KeyChangeEvent ev)
      {
          if (keyChangeListeners != null)
--- 295,299 ----
       * Inform the command keyChangeListeners
       */
!     protected synchronized void fireKeyChanged(KeyChangeEvent ev)
      {
          if (keyChangeListeners != null)
***************
*** 324,328 ****
       * The book who's keys we are looking at
       */
!     private Book book;
  
      /**
--- 324,328 ----
       * The book who's keys we are looking at
       */
!     private transient Book book;
  
      /**

--- BibleTreeNode.java DELETED ---

Index: WholeBibleTreeModel.java
===================================================================
RCS file: /cvs/jsword/bibledesktop/java/main/org/crosswire/bibledesktop/passage/WholeBibleTreeModel.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** WholeBibleTreeModel.java	6 Mar 2005 20:21:36 -0000	1.3
--- WholeBibleTreeModel.java	9 May 2005 01:28:30 -0000	1.4
***************
*** 28,32 ****
   * @version $Id$
   * @see DefaultTreeModel
-  * @see PassageTreeNode
   */
  public class WholeBibleTreeModel extends DefaultTreeModel
--- 28,31 ----

--- VerseTreeNode.java DELETED ---

--- PassageListCellRenderer.java DELETED ---

--- BookTreeNode.java DELETED ---

--- VerseRangeTreeNode.java DELETED ---

--- KeyTreeNode.java DELETED ---

--- PassageTreeModel.java DELETED ---

--- KeyTreeModel.java DELETED ---



More information about the jsword-svn mailing list