classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Component.getFont fix


From: Roman Kennke
Subject: [cp-patches] FYI: Component.getFont fix
Date: Tue, 4 Oct 2005 16:09:46 +0200 (CEST)
User-agent: SquirrelMail/1.4.4

I found that Lillian's patch from some time ago regarding
Component.getFont was not quite right. Obviously Component.getFont()
returns null as long as the component is not made visible. As soon as it
gets visible (== gets attached to  a peer), getFont() actually returns a
(default) font. This font is the same as returned by
peer.getGraphics().getFont() so I implemented it like this. I had to make
some adjustments to the GdkGraphics too, to avoid falling into a loop.

I also have committed a Mauve test for this change.


2005-10-04  Roman Kennke  <address@hidden>

        * java/awt/Component.java
        (getFont): Fall back to peer.getGraphics().getFont() if no font
        is found.
        (getGraphics): Set font here. This avoids a loop in the above
        fallback.
        * gnu/java/awt/peer/gtk/GdkGraphics.java
        (GdkGraphics): Don't initialize font here. This would cause a
        loop in the above fallback.


/Roman

Attachment: fontfix.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]