|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crosswire.bibledesktop.display.basic.TextPaneBookDataDisplay
public class TextPaneBookDataDisplay
A JTextPane implementation of an OSIS displayer.
for license details.
The copyright to this program is held by it's authors.| Field Summary | |
|---|---|
private org.crosswire.jsword.book.BookData |
bdata
The book data being shown. |
private boolean |
compareBooks
Whether the books should be compared. |
private org.crosswire.common.xml.Converter |
converter
To convert OSIS to HTML |
private static String |
DOUBLE_SLASH
|
private static String |
HYPERLINK_STYLE
|
private int |
lastLength
length of last enter event |
private int |
lastStart
location of last enter event |
private EventListenerList |
listenerList
The listeners for handling URIs |
protected static org.slf4j.Logger |
log
The log stream |
private static String |
RELATIVE_URI_PROTOCOL
|
private static String |
SCROLL_TO_URI
|
private Style |
style
A sytle used to underline a hyperlink |
private StyledDocument |
styledDoc
The styled document of the JTextPane. |
private JTextPane |
txtView
The display component |
| Fields inherited from interface org.crosswire.bibledesktop.display.BookDataDisplay |
|---|
COMPARE_BOOKS |
| Constructor Summary | |
|---|---|
TextPaneBookDataDisplay()
Simple ctor |
|
| Method Summary | |
|---|---|
void |
addKeyChangeListener(KeyChangeListener listener)
Add a listener for when the key changes. |
void |
addMouseListener(MouseListener li)
Forward the mouse listener to our child components |
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 |
void |
fireActivateURI(URIEvent e)
Notify the listeners that the hyperlink (URI) has been activated. |
void |
fireEnterURI(URIEvent e)
Notify the listeners that the hyperlink (URI) has been entered. |
void |
fireLeaveURI(URIEvent e)
Notify the listeners that the hyperlink (URI) has been left. |
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 |
private String[] |
getParts(String reference)
|
void |
hyperlinkUpdate(HyperlinkEvent ev)
|
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 |
removeMouseListener(MouseListener li)
Forward the mouse listener to our child components |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final String HYPERLINK_STYLE
private static final String DOUBLE_SLASH
private static final String SCROLL_TO_URI
private static final String RELATIVE_URI_PROTOCOL
private org.crosswire.jsword.book.BookData bdata
private boolean compareBooks
private org.crosswire.common.xml.Converter converter
private JTextPane txtView
private Style style
private int lastStart
private int lastLength
private StyledDocument styledDoc
private EventListenerList listenerList
protected static final org.slf4j.Logger log
| Constructor Detail |
|---|
public TextPaneBookDataDisplay()
| Method Detail |
|---|
public void clearBookData()
BookDataDisplaysetBookData(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 BookDataDisplaybooks - The Books to read data fromkey - The key to read from the given bookpublic void setCompareBooks(boolean compare)
BookDataDisplay
setCompareBooks in interface BookDataDisplaypublic void refresh()
BookDataDisplay
refresh in interface BookDataDisplaypublic void hyperlinkUpdate(HyperlinkEvent ev)
hyperlinkUpdate in interface HyperlinkListenerpublic void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListener
private String[] getParts(String reference)
throws MalformedURLException
MalformedURLExceptionpublic Component getComponent()
BookDataDisplay
getComponent in interface BookDataDisplaypublic void copy()
BookDataDisplay
copy in interface BookDataDisplaypublic void addKeyChangeListener(KeyChangeListener listener)
BookDataDisplay
addKeyChangeListener in interface BookDataDisplaypublic void removeKeyChangeListener(KeyChangeListener listener)
BookDataDisplay
removeKeyChangeListener in interface BookDataDisplaypublic void addURIEventListener(URIEventListener listener)
BookDataDisplay
addURIEventListener in interface BookDataDisplaylistener - The listener to addpublic void removeURIEventListener(URIEventListener listener)
BookDataDisplay
removeURIEventListener in interface BookDataDisplaylistener - The listener to removepublic void fireActivateURI(URIEvent e)
e - the eventEventListenerListpublic void fireEnterURI(URIEvent e)
e - the eventEventListenerListpublic void fireLeaveURI(URIEvent e)
e - the eventEventListenerListpublic void removeMouseListener(MouseListener li)
public void addMouseListener(MouseListener li)
public org.crosswire.jsword.passage.Key getKey()
BookDataDisplay
getKey in interface BookDataDisplaypublic org.crosswire.jsword.book.Book[] getBooks()
getBooks in interface org.crosswire.jsword.book.BookProviderpublic org.crosswire.jsword.book.Book getFirstBook()
getFirstBook in interface org.crosswire.jsword.book.BookProvider
|
Copyright ยจ 2003-2013 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||