ColorGradient Component

Hi,

A couple of weeks ago I saw a nice component in a Java program that I wanted to use in my own programs. Unfortunately I couldn’t find the sourcecode anywhere and I still don’t know if it is available somewhere. So I rewrote the Component, this is what it looks like:

http://www.quixotic-project.de/blog/wp-content/2007/05/colorgradienttest.jpg

I made a Web Start so you can give it a try. The sourcecode is also available here. It would be great if you could make some comments on it and its usefulness because this is the first time I am implementing my own components.

It’s a nice responsive component!, I have two comments:

  1. It would be cool if you could double click a pointer, and have it open the colour chooser dialog (instead of clicking the edit button).

  2. Currently, to move an unselected pointer you must a) Click to select, b) Click and drag.
    It would be nicer if you could simply Click and drag

Hope those help.

Out of interest, what was the program you saw the component in?

Kev

@kev: it was the particle editor pedigree. I postet a question related to that on lwjgl.org forums, perhaps you saw the thread.

As terrible as it is, I rarely read the LWJGL forums. I thought it might have been Pedigree, those little triangles looked awfully familiar. The source for pedigree is available as part of slick:

https://bob.newdawnsoftware.com/svnwebclient/directoryContent.jsp?location=slick&url=trunk%2FSlick%2Ftools%2Forg%2Fnewdawn%2Fslick%2Ftools%2Fpeditor

Kev

Thanks for the link Kev, that is the piece of code I had been looking for some weeks ago. Well, nevermind, I learned quite a lot, while writing my own version of a ColorGradient / GradientEditor.

Yeah, your impl looks considerbly more refined that the quick hack I did for Pedigree to get it work :slight_smile:

Kev

@irreversible_kev: thanks for your comment, I changed that behaviour. Source and Webstart should be updated

I know that this thread is ancient but I just wanted to check that color gradient component out.

However, the links seem to be broken :frowning:

Yes, that was a long time ago… I try to find the code when I am coming home from work. Maybe it’s still somewhere on my harddisc.

Thanks!

That other link to the pedigree source was intact.

I am checking it out now.

Here’s the link. Keep in mind this is years old and my first attempt in writing my own component.

Have fun.

Great!

It seems to work perfectly fine.