org.crosswire.bibledesktop.display
Interface BookDataDisplay

All Known Implementing Classes:
CommentaryPane, DictionaryPane, ProxyBookDataDisplay, ScrolledBookDataDisplay, TabbedBookDataDisplay, TextPaneBookDataDisplay

public interface BookDataDisplay

An interface for all components that can display BookData.

Distribution Licence:
JSword 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 here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
The copyright to this program is held by it's authors.

Version:
$Id: BookDataDisplay.java,v 1.7 2005/03/06 04:55:44 dmsmith Exp $
Author:
Joe Walker [joe at eireneh dot com]
See Also:
Licence

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-2004