ColorTheme.java

Go to the documentation of this file.
00001 /*
00002  * ColorTheme.java
00003  *
00004  * Created on 8 octobre 2003, 11:49
00005  *  
00006  *  Copyright (C) 2003 Philippe MOULIN
00007  *  www.net2map.org
00008  *
00009  *  This program is free software; you can redistribute it and/or
00010  *  modify it under the terms of the GNU General Public License
00011  *  as published by the Free Software Foundation; either version 2
00012  *  of the License, or (at your option) any later version.
00013  *
00014  *  This program is distributed in the hope that it will be useful,
00015  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU Lesser General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with this program; if not, write to the Free Software
00021  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00022  */
00023 
00024 package org.net2map.pov.gui;
00025 
00026 import javax.swing.plaf.*;
00027 import javax.swing.plaf.metal.DefaultMetalTheme;
00028 
00029 import com.incors.plaf.*;
00030 
00035 public class ColorTheme 
00036        extends DefaultMetalTheme
00037        implements com.incors.plaf.kunststoff.GradientTheme
00038 {
00039   // primary colors
00040     
00042   private final ColorUIResource primary1 = new ColorUIResource( 64, //Red
00043                                                                 64, //Green
00044                                                                 128 //Blue
00045                                                                 );
00046                                                                 
00048   private final ColorUIResource primary2 = new ColorUIResource(128, 128, 255);
00049 
00051   private final ColorUIResource primary3 = new ColorUIResource(128, 255, 128);
00052 
00053 
00054   // secondary colors
00055   
00057   private final ColorUIResource secondary1 = new ColorUIResource(128, 128, 128);
00058 
00060   private final ColorUIResource secondary2 = new ColorUIResource(180, 180, 180);
00061 
00063   private final ColorUIResource secondary3 = new ColorUIResource(224, 224, 224);
00064 
00065 
00066   // methods
00067 
00068   public String getName() { return "Default Kunststoff Theme"; }
00069 
00070 
00071   protected ColorUIResource getPrimary1() { return primary1; }
00072 
00073   protected ColorUIResource getPrimary2() { return primary2; }
00074 
00075   protected ColorUIResource getPrimary3() { return primary3; }
00076 
00077 
00078   protected ColorUIResource getSecondary1() { return secondary1; }
00079 
00080   protected ColorUIResource getSecondary2() { return secondary2; }
00081 
00082   protected ColorUIResource getSecondary3() { return secondary3; }
00083   
00084   public int getBackgroundGradientShadow()
00085   {
00086       return(10); //??????????????
00087   }
00088   
00090   public javax.swing.plaf.ColorUIResource getComponentGradientColorReflection()
00091   {
00092       return(new ColorUIResource(255, 255, 255));
00093       //return(secondary3);
00094   }
00095   
00099   public javax.swing.plaf.ColorUIResource getComponentGradientColorShadow()
00100   {
00101       return(new ColorUIResource(64, 64, 64));
00102   }
00103   
00105   public javax.swing.plaf.ColorUIResource getTextComponentGradientColorReflection()
00106   {
00107       return(new ColorUIResource(128, 255, 128));
00108   }
00109   
00111   public javax.swing.plaf.ColorUIResource getTextComponentGradientColorShadow()
00112   {
00113       return(new ColorUIResource(128, 128, 255));
00114   }
00115 }
Accueil | Téléchargement | Manuel | Doc. technique | Sources CVS | Faq | Nous contacter
©2003 - All Rights Reserved