classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: Metal L&F gradients


From: Roman Kennke
Subject: [cp-patches] FYI: Metal L&F gradients
Date: Wed, 16 Nov 2005 15:49:37 +0000

Hi there,

I added the new gradient painting code to some Swing components and the
result is this (Our Swing demo with the Ocean Theme):

http://kennke.org/~roman/swing-gradient.png

Note that the OceanTheme (and the MetalL&F) still has its quirks, so I
won't make it the default still. Mostly. Some borders must be adjusted
(you see it in the screenshots, look at the buttons at the bottom), and
some icons should also be gradiented. There seems to be a problem with
the RadioButtonIcon, since that is not a rectangle but a circle, and we
would have to set a circular clip. I don't know if that is possible
with plain Graphics, maybe we have to implement a workaroud for such
things.


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

        * javax/swing/plaf/metal/MetalButtonUI.java
        (update): New method. Paints the gradient.
        * javax/swing/plaf/metal/MetalCheckBoxIcon.java
        (paintIcon): Paint gradient.
        * javax/swing/plaf/metal/MetalIconFactory.java
        (RadioButtonIcon.paintIcon): Paint gradient.
        * javax/swing/plaf/metal/MetalLookAndFeel.java
        (initClassDefaults): Added MetalMenuBarUI.
        * javax/swing/plaf/metal/MetalMenuBarUI.java: New file.
        * javax/swing/plaf/metal/MetalToggleButtonUI.java
        (update): New method. Paints the gradient.
        * javax/swing/plaf/metal/OceanTheme.java
        (addCustomEntriesToTable): Added all the gradients.

/Roman

Attachment: patch.diff
Description: Text Data


reply via email to

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