Contents
ZKThemer
Download
How to use it
Generate a new color theme
Use the new theme in your application
Source code
See also
Still to do
ZKThemer
zkthemer is an automatic color theme generator
Download
You can download zkthemer from:local or from sourceforge.net
How to use it
zkthemer is a java command line application, it should work on any Java 6 platform, tested on Linux and Windows.
Generate a new color theme
The instructions shown are on a Windows cmd line. It should be similar on a bash shell.
C:\Users\adma.DANWARE\Desktop\cdrator-ZKThemer>java -jar zkthemer.jar Option is mandatory: --baseColor -c value : Base color in 6 hex digit format, for example: A4BC03 Option is mandatory: --ignoreFiles -i value : The names of ignore components (splitter with comma such as '-i colorbox,grid', type '-i n' if won't) Option is mandatory: --themeName -t value : Theme name Option is mandatory: --zklib -z value : Location (directory) containing the zk jars The options available are: --baseColor -c value : Base color in 6 hex digit format, for example: A4BC03 --ignoreFiles -i value : The names of ignore components (splitter with comma such as '-i colorbox,grid', type '-i n' if won't) --themeName -t value : Theme name --zklib -z value : Location (directory) containing the zk jars
The first step is to put all the zk jars of your current version in one directory, for example:
C:\Users\adma.DANWARE\Desktop\cdrator-ZKThemer>cd zk-jars C:\Users\adma.DANWARE\Desktop\cdrator-ZKThemer\zk-jars>dir Volume in drive C is system Volume Serial Number is C4BE-F9D9 Directory of C:\Users\adma.DANWARE\Desktop\cdrator-ZKThemer\zk-jars 05/08/2012 10:38 AM <DIR> . 05/08/2012 10:38 AM <DIR> .. 03/08/2012 06:07 PM 441,834 zcommon-5.0.9.jar 03/08/2012 06:07 PM 1,127,215 zk-5.0.9.jar 03/08/2012 06:08 PM 133,420 zkplus-5.0.9.jar 03/08/2012 06:07 PM 1,434,274 zul-5.0.9.jar 03/08/2012 06:07 PM 205,494 zweb-5.0.9.jar 5 File(s) 3,342,237 bytes 2 Dir(s) 35,672,846,336 bytes free
We then run zkthemer with the theme name "cdrator-color" , giving 949599(gray) as the basic color
C:\Users\adma.DANWARE\Desktop\cdrator-ZKThemer>java -jar zkthemer.jar -c 949599 -z zk-jars -t cdrator-color -i n Generated file: cdrator-color.jar
After running the command a new jar called "cdrator-color.jar" is generated.
Use the new theme in your application
It's not enough to just drop the created jar in your application classpath. You have to do the following:
1. In your zk.xml add the following
<desktop-config> <theme-provider-class>zkthemer.ThemeProvider</theme-provider-class> </desktop-config>