< prev index next >
src/java.desktop/share/classes/javax/swing/JToolTip.java
Print this page
@@ -34,16 +34,16 @@
import java.util.Objects;
/**
* Used to display a "Tip" for a Component. Typically components provide api
- * to automate the process of using <code>ToolTip</code>s.
- * For example, any Swing component can use the <code>JComponent</code>
- * <code>setToolTipText</code> method to specify the text
+ * to automate the process of using {@code ToolTip}s.
+ * For example, any Swing component can use the {@code JComponent}
+ * {@code setToolTipText} method to specify the text
* for a standard tooltip. A component that wants to create a custom
- * <code>ToolTip</code>
- * display can override <code>JComponent</code>'s <code>createToolTip</code>
+ * {@code ToolTip}
+ * display can override {@code JComponent}'s {@code createToolTip}
* method and use a subclass of this class.
* <p>
* See <a href="http://docs.oracle.com/javase/tutorial/uiswing/components/tooltip.html">How to Use Tool Tips</a>
* in <em>The Java Tutorial</em>
* for further documentation.
@@ -57,11 +57,11 @@
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
- * has been added to the <code>java.beans</code> package.
+ * has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}.
*
* @see JComponent#setToolTipText
* @see JComponent#createToolTip
* @author Dave Moore
@@ -86,11 +86,11 @@
}
/**
* Returns the L&F object that renders this component.
*
- * @return the <code>ToolTipUI</code> object that renders this component
+ * @return the {@code ToolTipUI} object that renders this component
*/
public ToolTipUI getUI() {
return (ToolTipUI)ui;
}
@@ -116,13 +116,13 @@
}
/**
* Sets the text to show when the tool tip is displayed.
- * The string <code>tipText</code> may be <code>null</code>.
+ * The string {@code tipText} may be {@code null}.
*
- * @param tipText the <code>String</code> to display
+ * @param tipText the {@code String} to display
* @beaninfo
* preferred: true
* bound: true
* description: Sets the text of the tooltip
*/
@@ -137,26 +137,26 @@
}
}
/**
* Returns the text that is shown when the tool tip is displayed.
- * The returned value may be <code>null</code>.
+ * The returned value may be {@code null}.
*
- * @return the <code>String</code> that is displayed
+ * @return the {@code String} that is displayed
*/
public String getTipText() {
return tipText;
}
/**
* Specifies the component that the tooltip describes.
- * The component <code>c</code> may be <code>null</code>
+ * The component {@code c} may be {@code null}
* and will have no effect.
* <p>
* This is a bound property.
*
- * @param c the <code>JComponent</code> being described
+ * @param c the {@code JComponent} being described
* @see JComponent#createToolTip
* @beaninfo
* bound: true
* description: Sets the component that the tooltip describes.
*/
@@ -167,11 +167,11 @@
firePropertyChange("component", oldValue, c);
}
/**
* Returns the component the tooltip applies to.
- * The returned value may be <code>null</code>.
+ * The returned value may be {@code null}.
*
* @return the component that the tooltip describes
*
* @see JComponent#createToolTip
*/
@@ -188,12 +188,12 @@
return true;
}
/**
- * See <code>readObject</code> and <code>writeObject</code>
- * in <code>JComponent</code> for more
+ * See {@code readObject} and {@code writeObject}
+ * in {@code JComponent} for more
* information about serialization in Swing.
*/
private void writeObject(ObjectOutputStream s) throws IOException {
s.defaultWriteObject();
if (getUIClassID().equals(uiClassID)) {
@@ -205,18 +205,18 @@
}
}
/**
- * Returns a string representation of this <code>JToolTip</code>.
+ * Returns a string representation of this {@code 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 <code>null</code>.
+ * be {@code null}.
*
- * @return a string representation of this <code>JToolTip</code>
+ * @return a string representation of this {@code JToolTip}
*/
protected String paramString() {
String tipTextString = (tipText != null ?
tipText : "");
@@ -245,20 +245,20 @@
return accessibleContext;
}
/**
* This class implements accessibility support for the
- * <code>JToolTip</code> class. It provides an implementation of the
+ * {@code JToolTip} class. It provides an implementation of the
* Java Accessibility API appropriate to tool tip user-interface elements.
* <p>
* <strong>Warning:</strong>
* Serialized objects of this class will not be compatible with
* future Swing releases. The current serialization support is
* appropriate for short term storage or RMI between applications running
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
- * has been added to the <code>java.beans</code> package.
+ * has been added to the {@code java.beans} package.
* Please see {@link java.beans.XMLEncoder}.
*/
@SuppressWarnings("serial")
protected class AccessibleJToolTip extends AccessibleJComponent {
< prev index next >