28 import sun.swing.SwingUtilities2;
29 import java.awt.*;
30 import java.awt.event.*;
31 import javax.swing.*;
32 import javax.swing.BorderFactory;
33 import javax.swing.border.Border;
34 import javax.swing.plaf.*;
35 import javax.swing.plaf.basic.BasicToolTipUI;
36 import javax.swing.plaf.basic.BasicHTML;
37 import javax.swing.text.View;
38
39
40 /**
41 * A Metal L&F extension of BasicToolTipUI.
42 * <p>
43 * <strong>Warning:</strong>
44 * Serialized objects of this class will not be compatible with
45 * future Swing releases. The current serialization support is
46 * appropriate for short term storage or RMI between applications running
47 * the same version of Swing. As of 1.4, support for long term storage
48 * of all JavaBeans™
49 * has been added to the <code>java.beans</code> package.
50 * Please see {@link java.beans.XMLEncoder}.
51 *
52 * @author Steve Wilson
53 */
54 @SuppressWarnings("serial") // Same-version serialization only
55 public class MetalToolTipUI extends BasicToolTipUI {
56
57 static MetalToolTipUI sharedInstance = new MetalToolTipUI();
58 private Font smallFont;
59 // Refer to note in getAcceleratorString about this field.
60 private JToolTip tip;
61
62 /**
63 * The space between strings.
64 */
65 public static final int padSpaceBetweenStrings = 12;
66 private String acceleratorDelimiter;
67
68 /**
|
28 import sun.swing.SwingUtilities2;
29 import java.awt.*;
30 import java.awt.event.*;
31 import javax.swing.*;
32 import javax.swing.BorderFactory;
33 import javax.swing.border.Border;
34 import javax.swing.plaf.*;
35 import javax.swing.plaf.basic.BasicToolTipUI;
36 import javax.swing.plaf.basic.BasicHTML;
37 import javax.swing.text.View;
38
39
40 /**
41 * A Metal L&F extension of BasicToolTipUI.
42 * <p>
43 * <strong>Warning:</strong>
44 * Serialized objects of this class will not be compatible with
45 * future Swing releases. The current serialization support is
46 * appropriate for short term storage or RMI between applications running
47 * the same version of Swing. As of 1.4, support for long term storage
48 * of all JavaBeans
49 * has been added to the <code>java.beans</code> package.
50 * Please see {@link java.beans.XMLEncoder}.
51 *
52 * @author Steve Wilson
53 */
54 @SuppressWarnings("serial") // Same-version serialization only
55 public class MetalToolTipUI extends BasicToolTipUI {
56
57 static MetalToolTipUI sharedInstance = new MetalToolTipUI();
58 private Font smallFont;
59 // Refer to note in getAcceleratorString about this field.
60 private JToolTip tip;
61
62 /**
63 * The space between strings.
64 */
65 public static final int padSpaceBetweenStrings = 12;
66 private String acceleratorDelimiter;
67
68 /**
|