public final class TipUtil
extends java.lang.Object
JWindow look like
a tool tip.| Modifier and Type | Method and Description |
|---|---|
static java.awt.Rectangle |
getScreenBoundsForPoint(int x,
int y)
Returns the screen coordinates for the monitor that contains the
specified point.
|
static java.awt.Color |
getToolTipBackground()
Returns the default background color to use for tool tip windows.
|
static java.awt.Color |
getToolTipBackground(RTextArea textArea)
Returns the default background color to use for tool tip windows.
|
static javax.swing.border.Border |
getToolTipBorder()
Returns the border used by tool tips in this look and feel.
|
static javax.swing.border.Border |
getToolTipBorder(RTextArea textArea)
Returns the border used by tool tips in this look and feel.
|
static void |
setFont(javax.swing.text.html.HTMLDocument doc,
java.awt.Font font,
java.awt.Color fg)
Sets the default font for an HTML document (e.g., in a tool tip
displaying HTML).
|
static void |
tweakTipEditorPane(javax.swing.JEditorPane textArea)
Tweaks a
JEditorPane so it can be used to render the
content in a focusable pseudo-tool tip. |
public static java.awt.Rectangle getScreenBoundsForPoint(int x,
int y)
x - The x-coordinate, in screen coordinates.y - The y-coordinate, in screen coordinates.public static java.awt.Color getToolTipBackground()
getToolTipBackground(RTextArea),
getToolTipBorder()public static java.awt.Color getToolTipBackground(RTextArea textArea)
textArea - The text area that will be the parent component of
the tool tip. If this is non-null, its background
color is taken into consideration when determining the color
to return (it will match the editor's background color if
necessary to facilitate proper contrast for tool tips rendering
code). If this is null, the tool tip background for
the current Look and Feel will be returned.getToolTipBackground(),
getToolTipBorder(RTextArea)public static javax.swing.border.Border getToolTipBorder()
getToolTipBorder(RTextArea),
getToolTipBackground()public static javax.swing.border.Border getToolTipBorder(RTextArea textArea)
textArea - The text area that will be the parent component of
the tool tip. If this is non-null, its background
color is taken into consideration when determining the color
to return (it will coordinate with the editor's background
color if necessary to facilitate proper contrast for tool
tips rendering code). If this is null, the tool
tip background for the current Look and Feel will be returned.getToolTipBorder(),
getToolTipBackground(RTextArea)public static void tweakTipEditorPane(javax.swing.JEditorPane textArea)
JEditorPane so it can be used to render the
content in a focusable pseudo-tool tip. It is assumed that the editor
pane is using an HTMLDocument.textArea - The editor pane to tweak.public static void setFont(javax.swing.text.html.HTMLDocument doc,
java.awt.Font font,
java.awt.Color fg)
setFont() is not honored.doc - The document to modify.font - The font to use.fg - The default foreground color.