| Why Nimrod Look & Feel? |
|
'Nimrod' is the ninth variation from Sir Edward Elgar's Enigma Variations. Good music...
|
| Which license? |
|
Nimrod Look & Feel is under LGPL. You can read what this means here.
|
| How can I use Nimrod Look & Feel in my own programs? |
|
Simple. Just write this code where you start Swing:
UIManager.setLookAndFeel( new com.nilo.plaf.nimrod.NimRODLookAndFeel());
This will use de default colours. If you prefer to change them, you can write your own class extending MetalTheme or
you can use NimRODTheme and set the colours. Example:
NimRODTheme nt = new NimRODTheme();
nt.setPrimary1( new Color(10,10,10));
nt.setPrimary2( new Color(20,20,20));
nt.setPrimary3( new Color(30,30,30));
NimRODLookAndFeel NimRODLF = new NimRODLookAndFeel();
NimRODLF.setCurrentTheme( nt);
UIManager.setLookAndFeel( NimRODLF);
You can use a theme file too, creating a NimRODTheme object using a theme file from your local disk or from an URL:
NimRODTheme nt = new NimRODTheme( new URL( "http://personales.ya.com/nimrod/data/Burdeos.theme"));
or...
NimRODTheme nt = new NimRODTheme( "c:/themes/Burdeos.theme");
NimRODLookAndFeel nf = new NimRODLookAndFeel();
nf.setCurrentTheme( nt);
UIManager.setLookAndFeel( nf);
|
| How can I use Nimrod Look & Feel without programming? |
|
It depends in wath application you use. Read the documentation of the application to know how (if you can) change de Look & Feel,
but normaly you will need to put nimrodlf.jar file in the CLASSPATH (or perhaps in a directory with plugins) and write somewhere
the class which starts de Look & Feel.
This class is com.nilo.plaf.nimrod.NimRODLookAndFeel.
Write that where the application prefers.
|
| Can I change the colours? |
|
Yes. You can change the colours passing some properties to the JVM. Simply write -Dpropoerty_name=property_value.
Example, if the application is MyApp:
java -Dnimrodlf.selection=#ff0000 MyApp
This starts MyApp with the default background colour and some elements in red. The property name is nimrodlf.selection
and the property value is #ff0000, which is the way red is written in HTML.
NimROD Look & Feel supports these properties:
- nimrodlf.selection: the selections colour.
- nimrodlf.background: the background colour.
- nimrodlf.p1: primary 1
- nimrodlf.p2: primary 2
- nimrodlf.p3: primary 3
- nimrodlf.s1: secondary 1
- nimrodlf.s2: secondary 2
- nimrodlf.s3: secondary 3
- nimrodlf.b: black
- nimrodlf.w: white
If you want bigger control over colours, you can specify one by one the eight colours Nimrod Look & Feel uses to paint
widgets using the properties nimrodlf.pX, nimrodlf.sX, nimrodlf.w y
nimrodlf.b.
Here you can find information about colours in Java/Swing.
selection and background are sortcuts. If you use selection, Nimrod Look & Feel
will ignore nimrodlf.pX, nimrodlf.sX, nimrodlf.w and
nimrodlf.b.
|
| I don't understand why #ff0000 means red. How are colours coded? |
|
Normal... This is the normal way colours ard coded in HTML.
The idea is that all colours can be defined like a combination of primary colours, red, green and blue.
If you say how much red, green and blue has got a colour is a simple way to define the colour. For example, you could say that a
colour is 50% red, 20% green and 30% blue, and you could write it '#502030'. The first two numbers after the # are red, the next two
are green and the last two are blue.
In HTML colours are defined in this way, except that instead using percents, numbers from 0 to 255 are used (255 means 100%) and
those numbers are written using hexadecimal. In hexadecimal 'numbers' are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F, so you can write that 'red'
is '#FF0000', in decimal '#255.00.00', in percents '#100.00.00'. 100% read y 0% green and 0% blue.
If you don't understand this (or my english), there are a lot of places in Internet where you can learn it, and some have applications
to choose a colour and see it coded in a simple way. Like this.
Here there are examples.
|
| Is there more Look & Feels out there? |
|
Yes. In Javootoo there is a list.
|
| How can I contact the author? |
|
If you have any comments about Nimrod Look & Feel, the fastest way is email me here: nimrodlf@terra.es.
Here there are more data about me.
|
| I want to write my own Look & Feel. What do I need? |
|
First, you must be able to write Java code, and the graphics primitives and Java2D. And experience using Swing will be usefull.
To have the source code of a pair of Look & Feels to see how they are programmed. It's very instructive to see other's code.
And having the JDK sources will be very usefull. Sooner or later you'll need to see how the original MetalLookAndFeel is coded.
And a sketch of what you want to paint!. This is the more difficult part.
|
| NetBeans |
|
To execute NetBeans using NimROD Look & Feel with the default color scheme you must write:
netbeans -cp:p c:/aplicaciones/JARS/nimrodlf.jar
--laf com.nilo.plaf.nimrod.NimRODLookAndFeel
If you want to change colours, you can put a theme file named NimRODThemeFile.theme in the "netbeans/bin"
directory, or you can put the theme file in another directory and use de nimrodlf.themeFile parameter. For example:
netbeans -J-Dnimrodlf.themeFile=c:/aplicaciones/JARS/burdeos.theme
-cp:p c:/aplicaciones/JARS/nimrodlf.jar
--laf com.nilo.plaf.nimrod.NimRODLookAndFeel
|
| Eclipse |
|
To execute Eclipse using NimROD Look & Feel, you need to install the EoS plugin
and follow the instructions you can find in the project page.
To change the colour scheme, the easier option is to put a theme file NimRODThemeFile.theme in the same directory
where the Eclipse executable is.
|
| JEdit |
|
To execute JEdit using NimROD Look & Feel, you need de "LookAndFeel" plugin and choose "NimROD" in "Plugins->Plugin Options->Look And Feel".
You can save the nimrodlf.jar file in the "jars" directory to get the new version o
NimROD Look & Feel.
To change colour scheme, you can put your theme file named NimRODThemeFile.theme in the same directory where
"jedit.jar" is, or you can use the command line paramater. For example:
java -Dnimrodlf.themeFile=c:/mythemes/arena.theme -jar jedit.jar
|