[Top][All Lists]

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

Re: OT: oceanMenuRect()

From: Roman Kennke
Subject: Re: OT: oceanMenuRect()
Date: Wed, 16 Nov 2005 10:06:11 +0100

Hi theUserBL (what is your real name?),

Am Samstag, den 12.11.2005, 14:24 +0000 schrieb theUser BL:
> I know, that it is a litte bit off topic, because it have nothing to do with 
> Java 1.4 (which is the current goal to be compatible with it).

Well, we already have 1.5 stuff in the tree and if we receive
contributions for 1.5 stuff, we don't say no :-)

> But I have yesterday tried a litte bit out to create the 1.5 menu and 1.5 
> button as field or rect.
> As I have previous said, OOP is for me something crypitic. So I have tried 
> to create functions, which create the color gradent of it.
> At is my trying. The code in my 
> functions oceanMenuRect and oceanButtonRect comming from me. And all the 
> other code come from GNU Classpath (mostly from the AWT Demo).
> At you can see a screenshot 
> of it.

I cannot access this link anymore.

> As you can see, on te left side, there is a screenshot-part of a real Java 
> 1.5 program runnig the Swing example. On the right side, I tried to recreate 
> the color gradient of the menu and the buttons.
> oceanMenuRect(x,y,w,h,g);
> and
> buttonMenuRect(x,y,w,h,g);
> filled exacty the same area like
> g.fillRec(x,y,w,h);

This is nice (I think, haven't seen a screenshot yet) and may even be
useful. I think, gradients could be painted using some Java2D functions,
which we have not implemented yet. Also, such a method could be useful
for systems that don't provide Java2D support.

> I have no experiece with OOP and so, I am not sure, if my function can be 
> useful.
> At first here my oceanMenuRect (because the files in the links I will later 
> delete. So this believes longer here) :
> public void oceanMenuRect (int x, int y, int w, int h, Graphics g) {

The method would have to be a little more flexible. I see that in the
OceanTheme, the following UI default is defined:
Key: Button.gradient     Value: [0.3, 0.0,

The gradient method should take such values as parameters. This seems to
be 2 double values (a vector?) and 3 color values. I haven't figured out
the exact meaning of those values yet, but maybe you can make some sense
of it? Would be very helpful, if you could say something to it, or even
can provide some code. Your gradient function already looks promising
and I would be happy to integrate it into
javax.swing.plaf.metal.MetalUtils. For code contributions you should
also ask Mark about the copyright asssignment stuff.

> Ok, this was very easy to create it. I wanted only to say, that I also try 
> now out the same for buttons.
> At the moment it looks more violette as blue. :-/

As I said above, the colors should be parameters to the method :-)


PS: Please post to the list using you real name.

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

reply via email to

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