|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ToolTipUI
javax.swing.plaf.basic.BasicToolTipUI
javax.swing.plaf.metal.MetalToolTipUI
public class MetalToolTipUI
A UI delegate for the JToolTip
component.
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 JToolTip component. |
void |
installUI(JComponent c)
Installs the UI for the specified component (a 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 installUI(JComponent) . |
Methods inherited from class javax.swing.plaf.basic.BasicToolTipUI |
---|
getMaximumSize, getMinimumSize, installDefaults, installListeners, uninstallDefaults, uninstallListeners |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int padSpaceBetweenStrings
Constructor Detail |
---|
public MetalToolTipUI()
MetalToolTipUI
.
Method Detail |
---|
public static ComponentUI createUI(JComponent component)
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.
component
- the component (a JToolTip
).
MetalToolTipUI
class.public String getAcceleratorString()
public void installUI(JComponent c)
JToolTip
).
installUI
in class BasicToolTipUI
c
- the JToolTip
component.ComponentUI.uninstallUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
public void uninstallUI(JComponent c)
installUI(JComponent)
.
uninstallUI
in class BasicToolTipUI
c
- the component.ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
protected boolean isAcceleratorHidden()
true
if the accelerator string is hidden, and
false
otherwise. This setting is controlled by the
ToolTip.hideAccelerator
entry in the UI defaults table.
public Dimension getPreferredSize(JComponent c)
JToolTip
component.
getPreferredSize
in class BasicToolTipUI
c
- the component (a JToolTip
).
public void paint(Graphics g, JComponent c)
paint
in class BasicToolTipUI
g
- the graphics context.c
- the JToolTip
component.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |