org.crosswire.bibledesktop.display
Interface BookDataDisplay

All Known Implementing Classes:
MultiBookPane, ProxyBookDataDisplay, ScrolledBookDataDisplay, TabbedBookDataDisplay, TextPaneBookDataDisplay

public interface BookDataDisplay

An interface for all components that can display BookData.

Author:
Joe Walker [joe at eireneh dot com]
See Also:
for license details. The copyright to this program is held by it's authors.

Method Summary
 void addURLEventListener(URLEventListener listener)
          Add a listener for when someone clicks on a browser 'link'
 void copy()
          Copy the selection to the clipboard
 Book getBook()
          Accessor for the Book used in the current display, or null if we are not displaying anything.
 Component getComponent()
          Accessor for the Swing component
 Key getKey()
          The Book Key that we are displaying, or null if we are not displaying anything
 void refresh()
          Cause the BookData to be re-displayed.
 void removeURLEventListener(URLEventListener listener)
          Remove a listener for when someone clicks on a browser 'link'
 void setBookData(Book book, Key key)
          Set the BookData to be displayed.
 

Method Detail

copy

void copy()
Copy the selection to the clipboard


addURLEventListener

void addURLEventListener(URLEventListener listener)
Add a listener for when someone clicks on a browser 'link'

Parameters:
listener - The listener to add

removeURLEventListener

void removeURLEventListener(URLEventListener listener)
Remove a listener for when someone clicks on a browser 'link'

Parameters:
listener - The listener to remove

getComponent

Component getComponent()
Accessor for the Swing component


setBookData

void setBookData(Book book,
                 Key key)
Set the BookData to be displayed. The data to be displayed is specified as a book and key rather than the more obvious BookData (the result of reading a book using a key) since some displays may wish so split up the display and only look up smaller sections at a time.

Parameters:
book - The Book to read data from
key - The key to read from the given book

refresh

void refresh()
Cause the BookData to be re-displayed.


getKey

Key getKey()
The Book Key that we are displaying, or null if we are not displaying anything

Returns:
The current key

getBook

Book getBook()
Accessor for the Book used in the current display, or null if we are not displaying anything.

Returns:
The current book

Copyright ยจ 2003-2006