|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The ToolTipProvider
is an interface for the editor
component to ask the editor client for an appropriate tooltip
to display based on the given location of the mouse event.
This could be useful for example, for a debugger that wants to
display the value of a variable when the mouse is moved over
a variable, or for code editing to display a class hierarchy
when the mouse is moved over a class name.
In order to display tooltips in your own client applications,
follow the example in the editor demo
application. You need to implement the
ToolTipProvider
interface and register it with the
editor pane by calling
in addToolTipProvider()
BasicEditorPane
. When
your getToolTipText()
method is called, provide
the tool tip text that should be displayed to the user. Note that
this text String can be html content for formatting purposes (for example,
"<html><body>Show <i>tooltip</i>
info</body></html>"
.)
BasicEditorPane
,
oracle.javatools.editor.demo.MainWindow
Method Summary | |
java.lang.String |
getToolTipText(BasicEditorPane editorPane,
java.awt.event.MouseEvent mouseEvent,
int offset)
Requests from the editor client an appropriate tooltip to display for the given editor. |
Method Detail |
public java.lang.String getToolTipText(BasicEditorPane editorPane, java.awt.event.MouseEvent mouseEvent, int offset)
editorPane
- the editor where the tooltip will be displayedmouseEvent
- the mouse event that generated the tooltipoffset
- the document offset where the mouse cursor is located
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.