public class ProxyBookDataDisplay extends Object implements BookDataDisplay
Useful for chaining a few BookDataDisplays together to add functionality component by component.
for license details.
Modifier and Type | Field and Description |
---|---|
private BookDataDisplay |
proxy
The component to which we proxy
|
COMPARE_BOOKS
Constructor and Description |
---|
ProxyBookDataDisplay(BookDataDisplay proxy)
Setup the proxy
|
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() |
private BookDataDisplay proxy
public ProxyBookDataDisplay(BookDataDisplay proxy)
protected BookDataDisplay getProxy()
public void addKeyChangeListener(KeyChangeListener listener)
BookDataDisplay
addKeyChangeListener
in interface BookDataDisplay
public void removeKeyChangeListener(KeyChangeListener listener)
BookDataDisplay
removeKeyChangeListener
in interface BookDataDisplay
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
public void addURIEventListener(URIEventListener listener)
BookDataDisplay
addURIEventListener
in interface BookDataDisplay
listener
- The listener to addpublic void removeURIEventListener(URIEventListener listener)
BookDataDisplay
removeURIEventListener
in interface BookDataDisplay
listener
- The listener to removepublic void copy()
BookDataDisplay
copy
in interface BookDataDisplay
public Component getComponent()
BookDataDisplay
getComponent
in interface BookDataDisplay
public void clearBookData()
BookDataDisplay
setBookData(null, null)
.clearBookData
in interface BookDataDisplay
public void setBookData(org.crosswire.jsword.book.Book[] books, org.crosswire.jsword.passage.Key key)
BookDataDisplay
setBookData
in interface BookDataDisplay
books
- The Books to read data fromkey
- The key to read from the given bookpublic void setCompareBooks(boolean compare)
BookDataDisplay
setCompareBooks
in interface BookDataDisplay
public void refresh()
BookDataDisplay
refresh
in interface BookDataDisplay
public org.crosswire.jsword.passage.Key getKey()
BookDataDisplay
getKey
in interface BookDataDisplay
public org.crosswire.jsword.book.Book[] getBooks()
getBooks
in interface org.crosswire.jsword.book.BookProvider
public org.crosswire.jsword.book.Book getFirstBook()
getFirstBook
in interface org.crosswire.jsword.book.BookProvider