Contents
ZKThemer
...
Download
How to use it
...
Use the new theme in your application
Source code
ZKThemer
zkthemer is an automatic color theme generator
Download
You can download zkthemer from:local or from sourceforge.netzkthemer.jar.
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
...
New Colour Theme
The instructions shown are on a Windows cmd line. It should be similar on a bash shell.a bash shell. In the following, we assume that the zkthemer.jar has been placed in C:\rator\cdrator-ZKThemer.
Code Block |
---|
C:\Users\adma.DANWARE\Desktoprator\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 a sub-directory called zk-jars as in the following:
Code Block |
---|
C:\Users\adma.DANWARE\Desktop\rator\cdrator-ZKThemer>cd zk-jars C:\Users\adma.DANWARE\Desktop\rator\cdrator-ZKThemer\zk-jars>dir Volume in drive C is system Volume Serial Number is C4BE-F9D9 Directory of C:\Users\adma.DANWARE\Desktop\rator\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
Code Block |
---|
C:\Users\adma.DANWARE\Desktoprator\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
...
New Theme
It 's is not enough to just drop the created jar in your application classpath. You have to do the following:
...
3. Restart the server. Your application must will now have now the gray color as base for all the components, like in the image bellow:
Fig 1. A ZKoss window with gray base color