Methods Summary |
---|
boolean | alwaysOnTop()Always returns true since tooltips, by definition,
should always be on top of all other windows.
return true;
|
public javax.accessibility.AccessibleContext | getAccessibleContext()Gets the AccessibleContext associated with this JToolTip.
For tool tips, the AccessibleContext takes the form of an
AccessibleJToolTip.
A new AccessibleJToolTip instance is created if necessary.
if (accessibleContext == null) {
accessibleContext = new AccessibleJToolTip();
}
return accessibleContext;
|
public javax.swing.JComponent | getComponent()Returns the component the tooltip applies to.
The returned value may be null .
return component;
|
public java.lang.String | getTipText()Returns the text that is shown when the tool tip is displayed.
The returned value may be null .
return tipText;
|
public javax.swing.plaf.ToolTipUI | getUI()Returns the L&F object that renders this component.
return (ToolTipUI)ui;
|
public java.lang.String | getUIClassID()Returns the name of the L&F class that renders this component.
return uiClassID;
|
protected java.lang.String | paramString()Returns a string representation of this JToolTip .
This method
is intended to be used only for debugging purposes, and the
content and format of the returned string may vary between
implementations. The returned string may be empty but may not
be null .
String tipTextString = (tipText != null ?
tipText : "");
return super.paramString() +
",tipText=" + tipTextString;
|
public void | setComponent(javax.swing.JComponent c)Specifies the component that the tooltip describes.
The component c may be null
and will have no effect.
This is a bound property.
JComponent oldValue = this.component;
component = c;
firePropertyChange("component", oldValue, c);
|
public void | setTipText(java.lang.String tipText)Sets the text to show when the tool tip is displayed.
The string tipText may be null .
String oldValue = this.tipText;
this.tipText = tipText;
firePropertyChange("tiptext", oldValue, tipText);
|
public void | updateUI()Resets the UI property to a value from the current look and feel.
setUI((ToolTipUI)UIManager.getUI(this));
|
private void | writeObject(java.io.ObjectOutputStream s)See readObject and writeObject
in JComponent for more
information about serialization in Swing.
s.defaultWriteObject();
if (getUIClassID().equals(uiClassID)) {
byte count = JComponent.getWriteObjCounter(this);
JComponent.setWriteObjCounter(this, --count);
if (count == 0 && ui != null) {
ui.installUI(this);
}
}
|