Wiki Markup |
---|
{noprint}{float:right|width=300px|background=lightgrey|border=solid blue 2px|margin=10px|padding=8px}
*Contents*
{toc:all=true|depth=4|excerpt=true|indent=14px}
{float}{noprint}{table-plus:enableSorting=false|width=665}
{table-plus}
h1. ZKThemer
*zkthemer* {color:#333300}is an automatic color theme generator{color}
h2. Download
{color:#333300}You can download {color}{color:#333300}zkthemer{color}{color:#333300} from:{color}{color:#333300}[Technology:local|^zkthemer.jar]{color}{color:#333300}.{color}
h2. How to use it
*zkthemer* is a java command line application, it should work on any _Java 6_ platform, tested on _Linux and Windows_.
h3. Generate a new color theme
The instructions shown are on a _Windows_ cmd line. It should be similar on a bash shell. In the following, we assume that the zkthemer.jar has been placed in \*C:\rator\cdrator-ZKThemer*.
{code}
C:\rator\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
{code}
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}
C:\rator\cdrator-ZKThemer>cd zk-jars
C:\rator\cdrator-ZKThemer\zk-jars>dir
Volume in drive C is system
Volume Serial Number is C4BE-F9D9
Directory of C:\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
{code}We then run zkthemer with the theme name "cdrator-color" , giving 949599(gray) as the basic color
{code}
C:\rator\cdrator-ZKThemer>java -jar zkthemer.jar -c 949599 -z zk-jars -t cdrator-color -i n
Generated file: cdrator-color.jar
{code}After running the command a new jar called "cdrator-color.jar" is generated.
h3. Use the new theme
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
{code}
<desktop-config>
<theme-provider-class>zkthemer.ThemeProvider</theme-provider-class>
</desktop-config>
{code}
2. Place the *cdrator-color.jar* in your application classpath.
3. Restart the server. Your application will now have the gray color as base for all the components, like in the image bellow:
!wf-builder.jpg|border=1!
Fig 1. A ZKoss window with gray base color
h1. References
[Zkoss documentation|http://www.zkoss.org/documentation]
[ZKThemer|http://books.zkoss.org/wiki/Small_Talks/2009/July/ZKThemer] |
Page Comparison
General
Content
Integrations