[jsword-svn] r1368 - in trunk: bibledesktop/src/main/java/org/crosswire/bibledesktop/display bibledesktop/src/main/java/org/crosswire/bibledesktop/display/proxy bibledesktop/src/main/java/org/crosswire/bibledesktop/display/scrolled bibledesktop/src/main/java/org/crosswire/bibledesktop/display/tab jsword-limbo/src/main/java/org/crosswire/bibledesktop/book

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Fri Jun 1 06:24:09 MST 2007


Author: dmsmith
Date: 2007-06-01 06:24:09 -0700 (Fri, 01 Jun 2007)
New Revision: 1368

Added:
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ProxyBookDataDisplay.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ScrolledBookDataDisplay.java
Removed:
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/proxy/ProxyBookDataDisplay.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/proxy/package.html
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/scrolled/ScrolledBookDataDisplay.java
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/scrolled/package.html
Modified:
   trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/tab/TabbedBookDataDisplay.java
   trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/book/CommentaryPane.java
Log:
Refactoring to simplify java packages.

Copied: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ProxyBookDataDisplay.java (from rev 1362, trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/proxy/ProxyBookDataDisplay.java)
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ProxyBookDataDisplay.java	                        (rev 0)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ProxyBookDataDisplay.java	2007-06-01 13:24:09 UTC (rev 1368)
@@ -0,0 +1,135 @@
+/**
+ * Distribution License:
+ * BibleDesktop is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, version 2 as published by
+ * the Free Software Foundation. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * The License is available on the internet at:
+ *       http://www.gnu.org/copyleft/gpl.html
+ * or by writing to:
+ *      Free Software Foundation, Inc.
+ *      59 Temple Place - Suite 330
+ *      Boston, MA 02111-1307, USA
+ *
+ * Copyright: 2005
+ *     The copyright to this program is held by it's authors.
+ *
+ * ID: $Id$
+ */
+package org.crosswire.bibledesktop.display;
+
+import java.awt.Component;
+
+import org.crosswire.jsword.book.Book;
+import org.crosswire.jsword.passage.Key;
+
+/**
+ * An implementation of BookDataDisplay that simply proxies all requests to an
+ * underlying BookDataDisplay.
+ * <p>Useful for chaining a few BookDataDisplays together to add functionallity
+ * component by component.</p>
+ *
+ * @see gnu.gpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author Joe Walker [joe at eireneh dot com]
+ */
+public class ProxyBookDataDisplay implements BookDataDisplay
+{
+    /**
+     * Setup the proxy
+     */
+    public ProxyBookDataDisplay(BookDataDisplay proxy)
+    {
+        this.proxy = proxy;
+    }
+
+    /**
+     * Accessor for the proxy
+     * @return Returns the proxy.
+     */
+    protected BookDataDisplay getProxy()
+    {
+        return proxy;
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#addURIEventListener(org.crosswire.bibledesktop.display.URIEventListener)
+     */
+    public void addURIEventListener(URIEventListener listener)
+    {
+        proxy.addURIEventListener(listener);
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#removeURIEventListener(org.crosswire.bibledesktop.display.URIEventListener)
+     */
+    public void removeURIEventListener(URIEventListener listener)
+    {
+        proxy.removeURIEventListener(listener);
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#copy()
+     */
+    public void copy()
+    {
+        proxy.copy();
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#getComponent()
+     */
+    public Component getComponent()
+    {
+        return proxy.getComponent();
+    }
+
+    /*
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setBookData(Book, Key)
+     */
+    public void setBookData(Book book, Key key)
+    {
+        proxy.setBookData(book, key);
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#refresh()
+     */
+    public void refresh()
+    {
+        proxy.refresh();
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    /* @Override */
+    public String toString()
+    {
+        return proxy.toString();
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#getKey()
+     */
+    public Key getKey()
+    {
+        return getProxy().getKey();
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#getBook()
+     */
+    public Book getBook()
+    {
+        return getProxy().getBook();
+    }
+
+    /**
+     * The component to which we proxy
+     */
+    private BookDataDisplay proxy;
+}

Copied: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ScrolledBookDataDisplay.java (from rev 1362, trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/scrolled/ScrolledBookDataDisplay.java)
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ScrolledBookDataDisplay.java	                        (rev 0)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/ScrolledBookDataDisplay.java	2007-06-01 13:24:09 UTC (rev 1368)
@@ -0,0 +1,64 @@
+/**
+ * Distribution License:
+ * BibleDesktop is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, version 2 as published by
+ * the Free Software Foundation. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * The License is available on the internet at:
+ *       http://www.gnu.org/copyleft/gpl.html
+ * or by writing to:
+ *      Free Software Foundation, Inc.
+ *      59 Temple Place - Suite 330
+ *      Boston, MA 02111-1307, USA
+ *
+ * Copyright: 2005
+ *     The copyright to this program is held by it's authors.
+ *
+ * ID: $Id$
+ */
+package org.crosswire.bibledesktop.display;
+
+import java.awt.Component;
+import java.awt.Dimension;
+
+import javax.swing.JScrollPane;
+
+import org.crosswire.common.swing.CWScrollPane;
+
+/**
+ * An inner component of Passage pane that can't show the list.
+ * 
+ * @see gnu.gpl.License for license details.
+ *      The copyright to this program is held by it's authors.
+ * @author Joe Walker [joe at eireneh dot com]
+ */
+public class ScrolledBookDataDisplay extends ProxyBookDataDisplay
+{
+    /**
+     * Simple Constructor
+     */
+    public ScrolledBookDataDisplay(BookDataDisplay child)
+    {
+        super(child);
+        scrView = new CWScrollPane(getProxy().getComponent());
+        scrView.getViewport().setPreferredSize(new Dimension(500, 400));
+//        scrView.getViewport().add(getProxy().getComponent(), null);
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.bibledesktop.display.BookDataDisplay#getComponent()
+     */
+    /* @Override */
+    public Component getComponent()
+    {
+        return scrView;
+    }
+
+    /**
+     * The scroller for the TextPaneBookDataDisplay component
+     */
+    private JScrollPane scrView;
+}

Deleted: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/proxy/ProxyBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/proxy/ProxyBookDataDisplay.java	2007-06-01 11:16:16 UTC (rev 1367)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/proxy/ProxyBookDataDisplay.java	2007-06-01 13:24:09 UTC (rev 1368)
@@ -1,137 +0,0 @@
-/**
- * Distribution License:
- * BibleDesktop is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, version 2 as published by
- * the Free Software Foundation. This program is distributed in the hope
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
- *
- * The License is available on the internet at:
- *       http://www.gnu.org/copyleft/gpl.html
- * or by writing to:
- *      Free Software Foundation, Inc.
- *      59 Temple Place - Suite 330
- *      Boston, MA 02111-1307, USA
- *
- * Copyright: 2005
- *     The copyright to this program is held by it's authors.
- *
- * ID: $Id$
- */
-package org.crosswire.bibledesktop.display.proxy;
-
-import java.awt.Component;
-
-import org.crosswire.bibledesktop.display.BookDataDisplay;
-import org.crosswire.bibledesktop.display.URIEventListener;
-import org.crosswire.jsword.book.Book;
-import org.crosswire.jsword.passage.Key;
-
-/**
- * An implementation of BookDataDisplay that simply proxies all requests to an
- * underlying BookDataDisplay.
- * <p>Useful for chaining a few BookDataDisplays together to add functionallity
- * component by component.</p>
- *
- * @see gnu.gpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author Joe Walker [joe at eireneh dot com]
- */
-public class ProxyBookDataDisplay implements BookDataDisplay
-{
-    /**
-     * Setup the proxy
-     */
-    public ProxyBookDataDisplay(BookDataDisplay proxy)
-    {
-        this.proxy = proxy;
-    }
-
-    /**
-     * Accessor for the proxy
-     * @return Returns the proxy.
-     */
-    protected BookDataDisplay getProxy()
-    {
-        return proxy;
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.bibledesktop.display.BookDataDisplay#addURIEventListener(org.crosswire.bibledesktop.display.URIEventListener)
-     */
-    public void addURIEventListener(URIEventListener listener)
-    {
-        proxy.addURIEventListener(listener);
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.bibledesktop.display.BookDataDisplay#removeURIEventListener(org.crosswire.bibledesktop.display.URIEventListener)
-     */
-    public void removeURIEventListener(URIEventListener listener)
-    {
-        proxy.removeURIEventListener(listener);
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.bibledesktop.display.BookDataDisplay#copy()
-     */
-    public void copy()
-    {
-        proxy.copy();
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.bibledesktop.display.BookDataDisplay#getComponent()
-     */
-    public Component getComponent()
-    {
-        return proxy.getComponent();
-    }
-
-    /*
-     * @see org.crosswire.bibledesktop.display.BookDataDisplay#setBookData(Book, Key)
-     */
-    public void setBookData(Book book, Key key)
-    {
-        proxy.setBookData(book, key);
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.bibledesktop.display.BookDataDisplay#refresh()
-     */
-    public void refresh()
-    {
-        proxy.refresh();
-    }
-
-    /* (non-Javadoc)
-     * @see java.lang.Object#toString()
-     */
-    /* @Override */
-    public String toString()
-    {
-        return proxy.toString();
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.bibledesktop.display.BookDataDisplay#getKey()
-     */
-    public Key getKey()
-    {
-        return getProxy().getKey();
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.bibledesktop.display.BookDataDisplay#getBook()
-     */
-    public Book getBook()
-    {
-        return getProxy().getBook();
-    }
-
-    /**
-     * The component to which we proxy
-     */
-    private BookDataDisplay proxy;
-}

Deleted: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/proxy/package.html
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/proxy/package.html	2007-06-01 11:16:16 UTC (rev 1367)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/proxy/package.html	2007-06-01 13:24:09 UTC (rev 1368)
@@ -1,10 +0,0 @@
-<html>
-<body>
-
-<p>
-This package contains an implementation of BookDataDisplay that proxies to
-another BookDataDisplay to make implementing nested BookDataDisplays easier.
-</p>
-
-</body>
-</html>

Deleted: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/scrolled/ScrolledBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/scrolled/ScrolledBookDataDisplay.java	2007-06-01 11:16:16 UTC (rev 1367)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/scrolled/ScrolledBookDataDisplay.java	2007-06-01 13:24:09 UTC (rev 1368)
@@ -1,66 +0,0 @@
-/**
- * Distribution License:
- * BibleDesktop is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, version 2 as published by
- * the Free Software Foundation. This program is distributed in the hope
- * that it will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU General Public License for more details.
- *
- * The License is available on the internet at:
- *       http://www.gnu.org/copyleft/gpl.html
- * or by writing to:
- *      Free Software Foundation, Inc.
- *      59 Temple Place - Suite 330
- *      Boston, MA 02111-1307, USA
- *
- * Copyright: 2005
- *     The copyright to this program is held by it's authors.
- *
- * ID: $Id$
- */
-package org.crosswire.bibledesktop.display.scrolled;
-
-import java.awt.Component;
-import java.awt.Dimension;
-
-import javax.swing.JScrollPane;
-
-import org.crosswire.bibledesktop.display.BookDataDisplay;
-import org.crosswire.bibledesktop.display.proxy.ProxyBookDataDisplay;
-import org.crosswire.common.swing.CWScrollPane;
-
-/**
- * An inner component of Passage pane that can't show the list.
- * 
- * @see gnu.gpl.License for license details.
- *      The copyright to this program is held by it's authors.
- * @author Joe Walker [joe at eireneh dot com]
- */
-public class ScrolledBookDataDisplay extends ProxyBookDataDisplay
-{
-    /**
-     * Simple Constructor
-     */
-    public ScrolledBookDataDisplay(BookDataDisplay child)
-    {
-        super(child);
-        scrView = new CWScrollPane(getProxy().getComponent());
-        scrView.getViewport().setPreferredSize(new Dimension(500, 400));
-//        scrView.getViewport().add(getProxy().getComponent(), null);
-    }
-
-    /* (non-Javadoc)
-     * @see org.crosswire.bibledesktop.display.BookDataDisplay#getComponent()
-     */
-    /* @Override */
-    public Component getComponent()
-    {
-        return scrView;
-    }
-
-    /**
-     * The scroller for the TextPaneBookDataDisplay component
-     */
-    private JScrollPane scrView;
-}

Deleted: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/scrolled/package.html
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/scrolled/package.html	2007-06-01 11:16:16 UTC (rev 1367)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/scrolled/package.html	2007-06-01 13:24:09 UTC (rev 1368)
@@ -1,11 +0,0 @@
-<html>
-<body>
-
-<p>
-This package contains an implementation of BookDataDisplay (based on
-ProxyBookDataDisplay for simplicity) that adds scrollbars to a child
-implementation of BookDataDisplay.
-</p>
-
-</body>
-</html>

Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/tab/TabbedBookDataDisplay.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/tab/TabbedBookDataDisplay.java	2007-06-01 11:16:16 UTC (rev 1367)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/display/tab/TabbedBookDataDisplay.java	2007-06-01 13:24:09 UTC (rev 1368)
@@ -38,8 +38,8 @@
 
 import org.crosswire.bibledesktop.display.BookDataDisplay;
 import org.crosswire.bibledesktop.display.BookDataDisplayFactory;
+import org.crosswire.bibledesktop.display.ScrolledBookDataDisplay;
 import org.crosswire.bibledesktop.display.URIEventListener;
-import org.crosswire.bibledesktop.display.scrolled.ScrolledBookDataDisplay;
 import org.crosswire.common.swing.GuiUtil;
 import org.crosswire.jsword.book.Book;
 import org.crosswire.jsword.passage.Key;

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-01 11:16:16 UTC (rev 1367)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/book/CommentaryPane.java	2007-06-01 13:24:09 UTC (rev 1368)
@@ -33,8 +33,8 @@
 
 import org.crosswire.bibledesktop.display.BookDataDisplay;
 import org.crosswire.bibledesktop.display.BookDataDisplayFactory;
+import org.crosswire.bibledesktop.display.ScrolledBookDataDisplay;
 import org.crosswire.bibledesktop.display.URIEventListener;
-import org.crosswire.bibledesktop.display.scrolled.ScrolledBookDataDisplay;
 import org.crosswire.common.util.Reporter;
 import org.crosswire.jsword.book.Book;
 import org.crosswire.jsword.book.BookFilter;




More information about the jsword-svn mailing list