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 classListens for events in a text area. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate HyperlinkListenerprivate URLprivate Stringprivate Dimensionprivate static final ResourceBundleprivate JTextAreaprivate FocusableTip.TextAreaListenerprivate RectangleThe screen bounds in which the mouse has to stay for the currently displayed tip to stay visible.private TipWindowprivate static final intMargin from mouse cursor at which to draw focusable tip.private static final intMargin from mouse cursor at which to draw focusable tip. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidCompute the bounds in which the user can move the mouse without the tip window disappearing.private voidcreateAndShowTipWindow(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 StringReturns localized text for the given key.protected voidvoidDisposes of the focusable tip currently displayed, if any.(package private) voidvoidsetImageBase(URL url) Sets the base URL to use when loading images in this focusable tip.voidsetMaxSize(Dimension maxSize) Sets the maximum size for unfocused tool tips.private voidsetTextArea(JTextArea textArea) voidtoolTipRequested(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
nullwill use a default size. - See Also:
-
getString
-
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 ofnullwill 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.
-