classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: Metal button fixes


From: Roman Kennke
Subject: [cp-patches] FYI: Metal button fixes
Date: Wed, 16 Nov 2005 20:37:14 +0000

Hi,

I have implemented some more funky OceanTheme stuff, this time the
ButtonBorders. The border for buttons is painted entirely different for
the OceanTheme vs the DefaultTheme. This is somewhat strange. The button
border really seems to depend on theme instanceof OceanTheme. There is
no UI property setting to which the ButtonBorder would react for
painting the normal border. Also, none of the buttons properties
influence the painting. But tests show, that the border class should
definitely be the same.

(On a side note, maybe this is a bug in Sun's implementation, the
borders for the JToggleButton are painted just like in the
DefaultMetalTheme).

This also introduces a missing method in MetalLookAndFeel. Strange that
nobody noticed that before ;-)

2005-11-16  Roman Kennke  <address@hidden>

        * javax/swing/plaf/metal/MetalBorders.java
        (ButtonBorder.paintBorder): Special case the OceanTheme.
        (ButtonBorder.paintOceanThemeBorder): New method.
        * javax/swing/plaf/metal/MetalButtonUI.java
        (installDefaults): Set the rollover flag here. Don't set a
special
        border for rollover buttons.
        (uninstallDefaults): Reset the rollover flag.
        (update): Only paint gradient when button is enabled and not
pressed.
        * javax/swing/plaf/metal/MetalButtonUI.java
        (getCurrentTheme): New method.

/Roman

Attachment: patch.diff
Description: Text Data


reply via email to

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