pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Martini <sandro.mart...@gmail.com>
Subject Re: Applying custom Color themes to pivot app.
Date Wed, 09 Feb 2011 10:30:25 GMT


The default Pivot L&F supports configurable color schemes, and by default
the Skin at application startup read a json config file containing the
definition of its base colors (and other settings).
A simple way to customize your colors is to give a startup parameter to the
application so Pivot can use your skin customized colors, for example
something like this:

>For example, try to execute this (but note that's not a real command line,
I put here only as a reference for needed options):
>java org.apache.pivot.wtk.DesktopApplicationContext
>Note that colors files bundled with Pivot can be loaded without put in
front of file name the path (as in my sample), but for others it's needed
(and should be an absolute path, starting with a "/" char and
substitute any "." of the package with a "/" char, like in ResourceBundles
... for example, to load the dark sample (inside tutorials), you have to
> -Dorg.apache.pivot.wtk.skin.terra.location=/org/apache/pivot/tutorials/TerraTheme_dark.json

In Pivot 2.0 there are some "custom" json files in Pivot 2.0, for trying to
have a look similar to Windows, OS X, Ubuntu, etc., they are all
TerraTheme_*.json files.

To create your own, a good Tool is the "Color Scheme Creator", so you can
see in live mode how they look, and you can save (but note that the saved
file contains only the color definition, so you can't directly use it to
load your application ... you will have to merge it with one of "good" json

Note that the skin uses colors for the same elements so sometimes it's not
possible to use a color where you want ... soon or later I have to write an
article with more detail on how to customize colors here :-) .

Just for reference, the issue was this (
https://issues.apache.org/jira/browse/PIVOT-579 ), closed (resolved) in the
Some discussion on it here:

For the 2.1 release I'm planning to extend this a little ...

Tell me if you need more info, or if you have suggestions.


View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Applying-custom-Color-themes-to-pivot-app-tp2457362p2457572.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

View raw message