javax.swing.plaf.metal
public class MetalToolTipUI extends BasicToolTipUI
Field Summary | |
---|---|
static int | padSpaceBetweenStrings
The amount of space between the tool tip text and the accelerator
description (if visible). |
Constructor Summary | |
---|---|
MetalToolTipUI()
Constructs a new instance of MetalToolTipUI . |
Method Summary | |
---|---|
static ComponentUI | createUI(JComponent component)
Returns a shared instance of the MetalToolTipUI class.
|
String | getAcceleratorString()
Returns a string representing the accelerator key (if there is one) for
the component that the tool tip belongs to.
|
Dimension | getPreferredSize(JComponent c)
Returns the preferred size for the {@link JToolTip} component.
|
void | installUI(JComponent c)
Installs the UI for the specified component (a {@link JToolTip}).
|
protected boolean | isAcceleratorHidden()
Returns true if the accelerator string is hidden, and
false otherwise. |
void | paint(Graphics g, JComponent c)
Paints the tool tip.
|
void | uninstallUI(JComponent c)
Clears the defaults set in {@link #installUI(JComponent)}.
|
MetalToolTipUI
.MetalToolTipUI
class.
Although this UI delegate does maintain state information, there is never
more than one tool tip visible, so it is OK to use a shared instance.
Parameters: component the component (a {@link JToolTip}).
Returns: A shared instance of the MetalToolTipUI
class.
Returns: A string representing the accelerator key.
Parameters: c the component (a {@link JToolTip}).
Returns: The preferred size.
Parameters: c the {@link JToolTip} component.
true
if the accelerator string is hidden, and
false
otherwise. This setting is controlled by the
ToolTip.hideAccelerator
entry in the UI defaults table.
Returns: A boolean.
Parameters: g the graphics context. c the {@link JToolTip} component.
Parameters: c the component.