|
||||||||||
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 BookData |
bdata
The book data being shown. |
private boolean |
compareBooks
Whether the books should be compared. |
private 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. |
Book[] |
getBooks()
Provide books. |
Component |
getComponent()
Accessor for the Swing component |
Book |
getFirstBook()
Provide the first book. |
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(Book[] books,
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 BookData bdata
private boolean compareBooks
private 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()
BookDataDisplay
setBookData(null, null)
.
clearBookData
in interface BookDataDisplay
public void setBookData(Book[] books, 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 void hyperlinkUpdate(HyperlinkEvent ev)
hyperlinkUpdate
in interface HyperlinkListener
public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
private String[] getParts(String reference) throws MalformedURLException
MalformedURLException
public Component getComponent()
BookDataDisplay
getComponent
in interface BookDataDisplay
public void copy()
BookDataDisplay
copy
in interface BookDataDisplay
public void addKeyChangeListener(KeyChangeListener listener)
BookDataDisplay
addKeyChangeListener
in interface BookDataDisplay
public void removeKeyChangeListener(KeyChangeListener listener)
BookDataDisplay
removeKeyChangeListener
in interface BookDataDisplay
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 fireActivateURI(URIEvent e)
e
- the eventEventListenerList
public void fireEnterURI(URIEvent e)
e
- the eventEventListenerList
public void fireLeaveURI(URIEvent e)
e
- the eventEventListenerList
public void removeMouseListener(MouseListener li)
public void addMouseListener(MouseListener li)
public Key getKey()
BookDataDisplay
getKey
in interface BookDataDisplay
public Book[] getBooks()
BookProvider
getBooks
in interface BookProvider
public Book getFirstBook()
BookProvider
getFirstBook
in interface BookProvider
|
Copyright ? 2003-2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |