One last tooltip fix.. for now.
2005-09-28 Lillian Angel <[EMAIL PROTECTED]>
* javax/swing/ToolTipManager.java
(showTip): Added check to prevent NPE.
(adjustLocation): Changed else if to if, to
check final y position of tooltip incase
it is still cut off.
On Tue, 2005-09-27 at 13:16 -0400, Lillian Angel wrote:
> Now, accelerators are included in the tooltips
>
> 2005-09-27 Lillian Angel <[EMAIL PROTECTED]>
>
> Fixes Bug #24044
> * javax/swing/ToolTipManager.java
> (showTip): currentTip needs to be revalidated on
> HeavyWeightPopups.
> * javax/swing/plaf/basic/BasicToolTipUI.java
> (getPreferredSize): Fixed to get the preferred size of the
> tooltip including the accelerator, if it has one.
> (paint): Fixed to paint the accelerator in its font
> and color, if it has one.
>
> _______________________________________________
> Classpath-patches mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/classpath-patches
Index: javax/swing/ToolTipManager.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/ToolTipManager.java,v
retrieving revision 1.26
diff -u -r1.26 ToolTipManager.java
--- javax/swing/ToolTipManager.java 27 Sep 2005 17:17:48 -0000 1.26
+++ javax/swing/ToolTipManager.java 28 Sep 2005 20:06:40 -0000
@@ -475,13 +475,14 @@
if (isLightWeightPopupEnabled())
{
- JLayeredPane pane = ((JRootPane) SwingUtilities.
- getAncestorOfClass(JRootPane.class, currentComponent)).
- getLayeredPane();
-
- // This should never happen, but just in case.
+ JLayeredPane pane = null;
+ JRootPane r = ((JRootPane) SwingUtilities.
+ getAncestorOfClass(JRootPane.class, currentComponent));
+ if (r != null)
+ pane = r.getLayeredPane();
if (pane == null)
return;
+
if (containerPanel != null)
hideTip();
@@ -544,7 +545,7 @@
p.x = 0;
if (p.y + d.height < c.getHeight())
p.y += d.height;
- else if (p.y + d.height > c.getHeight())
+ if (p.y + d.height > c.getHeight())
p.y -= d.height*2;
return p;
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches