Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/simscomputing/swing/SimsComputingTheme.java


1   package com.simscomputing.swing;
2   
3   import java.awt.Font;
4   
5   import javax.swing.plaf.FontUIResource;
6   import javax.swing.plaf.ColorUIResource;
7   import javax.swing.plaf.metal.DefaultMetalTheme;
8   
9   /**
10   This class provides a theme for the Java look-and-feel that's particular to Sims Computing.
11   Several Sims Computing apps could all share this common theme.
12   The primary and secondary colors are overridden from DefaultMetalTheme.
13   The fonts and other theme properties are left unaltered.
14   **/
15  public class SimsComputingTheme extends DefaultMetalTheme {
16    public String getName() {
17      return "SimsComputingTheme";
18    } // getName()
19  
20    private final static ColorUIResource white = new ColorUIResource(247, 244, 244);
21    private final static ColorUIResource black = new ColorUIResource(34, 30, 31);
22  
23    protected ColorUIResource getWhite() { return white; }
24    protected ColorUIResource getBlack() { return black; }
25  
26    //
27    // Primary colors
28    //
29  
30    private final ColorUIResource primary2 = new ColorUIResource(186, 196, 197); // sagebrush green
31  
32  //    protected ColorUIResource getPrimary1() {
33  //      return primary2;
34  //    } // getPrimary1()
35  
36    protected ColorUIResource getPrimary2() {
37      return primary2;
38    } // getPrimary2()
39  
40  //    protected ColorUIResource getPrimary3() {
41  //      return primary2;
42  //    } // getPrimary3()
43  
44    // Secondary colors
45  
46    private final ColorUIResource secondary3 = new ColorUIResource(176, 198, 206);
47  
48  //    protected ColorUIResource getSecondary1() {
49  //      return secondary3;
50  //    }  // getSecondary1()
51  
52  //    protected ColorUIResource getSecondary2() {
53  //      return secondary3;
54  //    }  // getSecondary2()
55  
56    protected ColorUIResource getSecondary3() {
57      return secondary3;
58    }  // getSecondary3()
59  } // class SimsComputingTheme