An engineer at Sun did something similar to this. He wrote a program
that sets a theme to a given color. Here's the basic idea.
Updating the CSS is easy. You just need to identify the "background"
settings, and set them to your new color.
You also need to modify all the gradient images. You can use
javax.imageio.ImageIO.read() to read an image file into an instance of
javax.imageio.BufferedImage(). You can use the getRGB() method to
examine the settings of the top and bottom rows of pixels. The trick is
to figure out what the "gradation" is between these rows. If you can
apply the same changes to a new color, in theory you can write a new
gradient image for your new color.
// Gregory
Ken Paulsen wrote:
>
> Hi,
>
> If you look at the theme .jar file you can see what can be changed. A
> large percentage of it is simply css files and not images... but there
> are images involved as well.
>
> There probably is or should be some document describing how to create
> a new theme. Perhaps a good java.net project would be to create a
> theme editor for woodstock components. :)
>
> Perhaps one of the Woodstock developers will jump in with a pointer on
> some documentation on how to do this...
>
> Good luck!
>
> Ken Paulsen
> https://jsftemplating.dev.java.net
>
> paksegu wrote:
>> Hi,
>> Is there a way to change the color of the compononents theme without
>> having to recreate new images with differents color? It reminds me of
>> Ford Motors where by you can get any car that you want as long as it
>> is black.
>>
>>
>> Ransford Segu-Baffoe
>>
>> paksegu_at_yahoo.com
>> paksegu_at_NoqturnalMediaSystems.com
>>
>> http://www.noqturnalmediasystems.com/
>> http://www.noqturnalmediasystems.com/Serenade/
>> https://serenade.dev.java.net/
>>
>> ------------------------------------------------------------------------
>> Don't be flakey. Get Yahoo! Mail for Mobile
>> <http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail> and
>> always stay connected
>> <http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail> to
>> friends.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_woodstock.dev.java.net For
> additional commands, e-mail: dev-help_at_woodstock.dev.java.net