|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crosswire.bibledesktop.display.textpane.TextPaneBookDataDisplay
public class TextPaneBookDataDisplay
A JDK JTextPane implementation of an OSIS displayer.
for license details.
The copyright to this program is held by it's authors.| Field Summary | |
|---|---|
private Book |
book
The current book |
private Converter |
converter
To convert OSIS to HTML |
private static String |
DOUBLE_SLASH
|
private static String |
HYPERLINK_STYLE
|
private Key |
key
The current key |
private int |
lastLength
length of last enter event |
private int |
lastStart
location of last enter event |
private EventListenerList |
listenerList
The listeners for handling urls |
protected static Logger |
log
The log stream |
private static String |
RELATIVE_URL_PROTOCOL
|
private static String |
SCROLL_TO_URL
|
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 |
| Constructor Summary | |
|---|---|
TextPaneBookDataDisplay()
Simple ctor |
|
| Method Summary | |
|---|---|
void |
addMouseListener(MouseListener li)
Forward the mouse listener to our child components |
void |
addURLEventListener(URLEventListener listener)
Adds a hyperlink listener for notification of any changes, for example when a link is selected and entered. |
void |
copy()
Copy the selection to the clipboard |
void |
fireActivateURL(URLEvent e)
Notify the listeners that the hyperlink (URL) has been activated. |
void |
fireEnterURL(URLEvent e)
Notify the listeners that the hyperlink (URL) has been entered. |
void |
fireLeaveURL(URLEvent e)
Notify the listeners that the hyperlink (URL) has been left. |
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 |
private String[] |
getParts(String reference)
|
void |
hyperlinkUpdate(HyperlinkEvent ev)
|
void |
refresh()
Cause the BookData to be re-displayed. |
void |
removeMouseListener(MouseListener li)
Forward the mouse listener to our child components |
void |
removeURLEventListener(URLEventListener listener)
Removes a hyperlink listener. |
void |
setBookData(Book book,
Key key)
Set the BookData to be displayed. |
| 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_URL
private static final String RELATIVE_URL_PROTOCOL
protected static final Logger log
private Book book
private Key key
private Converter converter
private JTextPane txtView
private Style style
private int lastStart
private int lastLength
private StyledDocument styledDoc
private EventListenerList listenerList
| Constructor Detail |
|---|
public TextPaneBookDataDisplay()
| Method Detail |
|---|
public void setBookData(Book book,
Key key)
BookDataDisplay
setBookData in interface BookDataDisplaybook - The Book to read data fromkey - The key to read from the given bookpublic void refresh()
BookDataDisplay
refresh in interface BookDataDisplaypublic void hyperlinkUpdate(HyperlinkEvent ev)
hyperlinkUpdate in interface HyperlinkListener
private String[] getParts(String reference)
throws MalformedURLException
MalformedURLExceptionpublic Component getComponent()
getComponent in interface BookDataDisplaypublic void copy()
BookDataDisplay
copy in interface BookDataDisplaypublic void addURLEventListener(URLEventListener listener)
addURLEventListener in interface BookDataDisplaylistener - the listenerpublic void removeURLEventListener(URLEventListener listener)
removeURLEventListener in interface BookDataDisplaylistener - the listenerpublic void fireActivateURL(URLEvent e)
e - the eventEventListenerListpublic void fireEnterURL(URLEvent e)
e - the eventEventListenerListpublic void fireLeaveURL(URLEvent e)
e - the eventEventListenerListpublic void removeMouseListener(MouseListener li)
public void addMouseListener(MouseListener li)
public Key getKey()
BookDataDisplay
getKey in interface BookDataDisplaypublic Book getBook()
BookDataDisplay
getBook in interface BookDataDisplay
|
Copyright ยจ 2003-2006 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||