org.crosswire.bibledesktop.display

## Class ProxyBookDataDisplay

- java.lang.Object
- - org.crosswire.bibledesktop.display.ProxyBookDataDisplay

- All Implemented Interfaces:
    PropertyChangeListener, EventListener, BookDataDisplay, org.crosswire.jsword.book.BookProvider
  Direct Known Subclasses:
    ScrolledBookDataDisplay

      public class ProxyBookDataDisplay
      extends Object
      implements BookDataDisplay

  An implementation of BookDataDisplay that simply proxies all requests to an underlying BookDataDisplay.

  Useful for chaining a few BookDataDisplays together to add functionality component by component.

  Author:
    Joe Walker
  See Also:
    `for license details.`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private BookDataDisplay` | `proxy` The component to which we proxy

    - ### Fields inherited from interface org.crosswire.bibledesktop.display.BookDataDisplay

      `COMPARE_BOOKS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProxyBookDataDisplay(BookDataDisplay proxy)` Setup the proxy

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addKeyChangeListener(KeyChangeListener listener)` Add a listener for when the key changes.
    `void` | `addURIEventListener(URIEventListener listener)` Add a listener for when someone clicks on a browser 'link'
    `void` | `clearBookData()` Clear any BookData that is displayed.
    `void` | `copy()` Copy the selection to the clipboard
    `org.crosswire.jsword.book.Book[]` | `getBooks()`
    `Component` | `getComponent()` Accessor for the Swing component
    `org.crosswire.jsword.book.Book` | `getFirstBook()`
    `org.crosswire.jsword.passage.Key` | `getKey()` The Book Key that we are displaying, or null if we are not displaying anything
    `protected BookDataDisplay` | `getProxy()` Accessor for the proxy
    `void` | `propertyChange(PropertyChangeEvent evt)`
    `void` | `refresh()` Cause the BookData to be re-displayed.
    `void` | `removeKeyChangeListener(KeyChangeListener listener)` Remove a listener for when the key changes.
    `void` | `removeURIEventListener(URIEventListener listener)` Remove a listener for when someone clicks on a browser 'link'
    `void` | `setBookData(org.crosswire.jsword.book.Book[] books, org.crosswire.jsword.passage.Key key)` Set the BookData to be displayed.
    `void` | `setCompareBooks(boolean compare)` Establish whether books in the book array should be compared.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### proxy

          private BookDataDisplay proxy

      The component to which we proxy

  - ### Constructor Detail

    - #### ProxyBookDataDisplay

          public ProxyBookDataDisplay(BookDataDisplay proxy)

      Setup the proxy

  - ### Method Detail

    - #### getProxy

          protected BookDataDisplay getProxy()

      Accessor for the proxy
      Returns:
        Returns the proxy.

    - #### addKeyChangeListener

          public void addKeyChangeListener(KeyChangeListener listener)

      Description copied from interface: `BookDataDisplay`
      Add a listener for when the key changes.
      Specified by:
        `addKeyChangeListener` in interface `BookDataDisplay`

    - #### removeKeyChangeListener

          public void removeKeyChangeListener(KeyChangeListener listener)

      Description copied from interface: `BookDataDisplay`
      Remove a listener for when the key changes.
      Specified by:
        `removeKeyChangeListener` in interface `BookDataDisplay`

    - #### propertyChange

          public void propertyChange(PropertyChangeEvent evt)

      Specified by:
        `propertyChange` in interface `PropertyChangeListener`

    - #### addURIEventListener

          public void addURIEventListener(URIEventListener listener)

      Description copied from interface: `BookDataDisplay`
      Add a listener for when someone clicks on a browser 'link'
      Specified by:
        `addURIEventListener` in interface `BookDataDisplay`
      Parameters:
        `listener` - The listener to add

    - #### removeURIEventListener

          public void removeURIEventListener(URIEventListener listener)

      Description copied from interface: `BookDataDisplay`
      Remove a listener for when someone clicks on a browser 'link'
      Specified by:
        `removeURIEventListener` in interface `BookDataDisplay`
      Parameters:
        `listener` - The listener to remove

    - #### copy

          public void copy()

      Description copied from interface: `BookDataDisplay`
      Copy the selection to the clipboard
      Specified by:
        `copy` in interface `BookDataDisplay`

    - #### getComponent

          public Component getComponent()

      Description copied from interface: `BookDataDisplay`
      Accessor for the Swing component
      Specified by:
        `getComponent` in interface `BookDataDisplay`

    - #### clearBookData

          public void clearBookData()

      Description copied from interface: `BookDataDisplay`
      Clear any BookData that is displayed. This is equivalent to: `setBookData(null, null)`.
      Specified by:
        `clearBookData` in interface `BookDataDisplay`

    - #### setBookData

          public void setBookData(org.crosswire.jsword.book.Book[] books,
                         org.crosswire.jsword.passage.Key key)

      Description copied from interface: `BookDataDisplay`
      Set the BookData to be displayed. The data to be displayed is specified as a books and key rather than the more obvious BookData (the result of reading books using a key) since some displays may wish so split up the display and only look up smaller sections at a time.
      Specified by:
        `setBookData` in interface `BookDataDisplay`
      Parameters:
        `books` - The Books to read data from
        `key` - The key to read from the given book

    - #### setCompareBooks

          public void setCompareBooks(boolean compare)

      Description copied from interface: `BookDataDisplay`
      Establish whether books in the book array should be compared.
      Specified by:
        `setCompareBooks` in interface `BookDataDisplay`

    - #### refresh

          public void refresh()

      Description copied from interface: `BookDataDisplay`
      Cause the BookData to be re-displayed.
      Specified by:
        `refresh` in interface `BookDataDisplay`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getKey

          public org.crosswire.jsword.passage.Key getKey()

      Description copied from interface: `BookDataDisplay`
      The Book Key that we are displaying, or null if we are not displaying anything
      Specified by:
        `getKey` in interface `BookDataDisplay`
      Returns:
        The current key

    - #### getBooks

          public org.crosswire.jsword.book.Book[] getBooks()

      Specified by:
        `getBooks` in interface `org.crosswire.jsword.book.BookProvider`

    - #### getFirstBook

          public org.crosswire.jsword.book.Book getFirstBook()

      Specified by:
        `getFirstBook` in interface `org.crosswire.jsword.book.BookProvider`