Class FocusableTip
java.lang.Object
org.fife.ui.rsyntaxtextarea.focusabletip.FocusableTip
A focusable tool tip, similar to those found in Eclipse. The user
can click in the tip and it becomes a "real," resizable window.
- Version:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
Listens for events in a text area. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate HyperlinkListener
private URL
private String
private Dimension
private static final ResourceBundle
private JTextArea
private FocusableTip.TextAreaListener
private Rectangle
The screen bounds in which the mouse has to stay for the currently displayed tip to stay visible.private TipWindow
private static final int
Margin from mouse cursor at which to draw focusable tip.private static final int
Margin from mouse cursor at which to draw focusable tip. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Compute the bounds in which the user can move the mouse without the tip window disappearing.private void
createAndShowTipWindow
(MouseEvent e, String text) Returns the base URL to use when loading images in this focusable tip.The maximum size for unfocused tool tips.(package private) static String
Returns localized text for the given key.protected void
void
Disposes of the focusable tip currently displayed, if any.(package private) void
void
setImageBase
(URL url) Sets the base URL to use when loading images in this focusable tip.void
setMaxSize
(Dimension maxSize) Sets the maximum size for unfocused tool tips.private void
setTextArea
(JTextArea textArea) void
toolTipRequested
(MouseEvent e, String text) Callback called when this tool tip is requested.
-
Field Details
-
textArea
-
tipWindow
-
imageBase
-
textAreaListener
-
hyperlinkListener
-
lastText
-
maxSize
-
tipVisibleBounds
The screen bounds in which the mouse has to stay for the currently displayed tip to stay visible. -
X_MARGIN
private static final int X_MARGINMargin from mouse cursor at which to draw focusable tip.- See Also:
-
Y_MARGIN
private static final int Y_MARGINMargin from mouse cursor at which to draw focusable tip.- See Also:
-
MSG
-
-
Constructor Details
-
FocusableTip
-
-
Method Details
-
computeTipVisibleBounds
private void computeTipVisibleBounds()Compute the bounds in which the user can move the mouse without the tip window disappearing. -
createAndShowTipWindow
-
getImageBase
Returns the base URL to use when loading images in this focusable tip.- Returns:
- The base URL to use.
- See Also:
-
getMaxSize
The maximum size for unfocused tool tips.- Returns:
- The maximum size for unfocused tool tips. A value of
null
will use a default size. - See Also:
-
getString
Returns localized text for the given key.- Parameters:
key
- The key into the resource bundle.- Returns:
- The localized text.
-
invokeLater
-
possiblyDisposeOfTipWindow
public void possiblyDisposeOfTipWindow()Disposes of the focusable tip currently displayed, if any. -
removeListeners
void removeListeners() -
setImageBase
Sets the base URL to use when loading images in this focusable tip.- Parameters:
url
- The base URL to use.- See Also:
-
setMaxSize
Sets the maximum size for unfocused tool tips.- Parameters:
maxSize
- The new maximum size. A value ofnull
will cause a default size to be used.- See Also:
-
setTextArea
-
toolTipRequested
Callback called when this tool tip is requested.- Parameters:
e
- The mouse event that is triggering the tool tip.text
- The text to display.
-