public class URITipHelper extends Object implements URIEventListener
for license details.
Modifier and Type | Field and Description |
---|---|
private URIEvent |
event
The most recent interested event, which is used for content retrieving.
|
private int |
formerDismissDelay |
private int |
myDismissDelay |
private FullHTMLTip |
tip
The tool tip to help with.
|
private String |
txt |
Constructor and Description |
---|
URITipHelper()
ctor: after creation, add this as a listener to a BookDataDisplay, for
example: basic/TextPaneBookDataDisplay.java
This class can also have a list of URIEvent content retrievers, who
specialize in retrieving the content of a URI request and may also
perform some kind of processing, such as converting to html (return a
string if success, null o/w):
Such specialized retrievers will have two methods: public boolean
handles(String protocol); public String retrieve(URIEvent evt);
|
Modifier and Type | Method and Description |
---|---|
void |
activateURI(URIEvent ev)
This method is called to indicate that an URI can be processed.
|
void |
enterURI(URIEvent ev)
This method is called to indicate that the mouse has entered the URI.
|
JToolTip |
fetchToolTip() |
String |
getTipTitle() |
(package private) boolean |
interested(URIEvent ev) |
void |
leaveURI(URIEvent ev)
This method is called to indicate that the mouse has left the URI.
|
String |
retrieve(org.crosswire.common.xml.Converter converter)
This is only called when the component needs to display the tip; note we
delay this expensive operation until needed; a typical use is to have it
in the getToolTipText() method of the managed component:
public String getToolTipText(){ return uritip.retrieve(); }
|
private int formerDismissDelay
private int myDismissDelay
private FullHTMLTip tip
private URIEvent event
private String txt
public URITipHelper()
public JToolTip fetchToolTip()
public String retrieve(org.crosswire.common.xml.Converter converter)
public String getTipTitle()
public void activateURI(URIEvent ev)
activateURI
in interface URIEventListener
ev
- Describes the URIpublic void enterURI(URIEvent ev)
enterURI
in interface URIEventListener
ev
- Describes the URIpublic void leaveURI(URIEvent ev)
leaveURI
in interface URIEventListener
ev
- Describes the URIboolean interested(URIEvent ev)
ev
- if we are interested in this event