Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
JasonsTheme |
|
| 1.0;1 |
1 | /* $Id: JasonsTheme.java 17841 2010-01-12 19:17:52Z linus $ | |
2 | ***************************************************************************** | |
3 | * Copyright (c) 2009 Contributors - see below | |
4 | * All rights reserved. This program and the accompanying materials | |
5 | * are made available under the terms of the Eclipse Public License v1.0 | |
6 | * which accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * tfmorris | |
11 | ***************************************************************************** | |
12 | * | |
13 | * Some portions of this file was previously release using the BSD License: | |
14 | */ | |
15 | ||
16 | // Copyright (c) 1996-2006 The Regents of the University of California. All | |
17 | // Rights Reserved. Permission to use, copy, modify, and distribute this | |
18 | // software and its documentation without fee, and without a written | |
19 | // agreement is hereby granted, provided that the above copyright notice | |
20 | // and this paragraph appear in all copies. This software program and | |
21 | // documentation are copyrighted by The Regents of the University of | |
22 | // California. The software program and documentation are supplied "AS | |
23 | // IS", without any accompanying services from The Regents. The Regents | |
24 | // does not warrant that the operation of the program will be | |
25 | // uninterrupted or error-free. The end-user understands that the program | |
26 | // was developed for research purposes and is advised not to rely | |
27 | // exclusively on the program for any reason. IN NO EVENT SHALL THE | |
28 | // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, | |
29 | // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, | |
30 | // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF | |
31 | // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF | |
32 | // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY | |
33 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
34 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE | |
35 | // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF | |
36 | // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, | |
37 | // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | |
38 | ||
39 | package org.argouml.ui; | |
40 | ||
41 | import java.awt.Font; | |
42 | import javax.swing.plaf.ColorUIResource; | |
43 | import javax.swing.plaf.FontUIResource; | |
44 | import javax.swing.plaf.metal.MetalTheme; | |
45 | ||
46 | /** | |
47 | * This class defines a variation on the default Metal Theme. | |
48 | */ | |
49 | 900 | public class JasonsTheme extends MetalTheme { |
50 | ||
51 | 900 | private final ColorUIResource primary1 = new ColorUIResource(102, 102, 153); |
52 | 900 | private final ColorUIResource primary2 = new ColorUIResource(153, 153, 204); |
53 | 900 | private final ColorUIResource primary3 = new ColorUIResource(204, 204, 255); |
54 | ||
55 | 900 | private final ColorUIResource secondary1 = |
56 | new ColorUIResource(102, 102, 102); | |
57 | 900 | private final ColorUIResource secondary2 = |
58 | new ColorUIResource(153, 153, 153); | |
59 | 900 | private final ColorUIResource secondary3 = |
60 | new ColorUIResource(204, 204, 204); | |
61 | ||
62 | 900 | private final FontUIResource controlFont = |
63 | new FontUIResource("SansSerif", Font.BOLD, 10); | |
64 | 900 | private final FontUIResource systemFont = |
65 | new FontUIResource("Dialog", Font.PLAIN, 10); | |
66 | 900 | private final FontUIResource windowTitleFont = |
67 | new FontUIResource("SansSerif", Font.BOLD, 10); | |
68 | 900 | private final FontUIResource userFont = |
69 | new FontUIResource("SansSerif", Font.PLAIN, 10); | |
70 | 900 | private final FontUIResource smallFont = |
71 | new FontUIResource("Dialog", Font.PLAIN, 9); | |
72 | ||
73 | /* | |
74 | * @see javax.swing.plaf.metal.MetalTheme#getName() | |
75 | */ | |
76 | 38 | public String getName() { return "Default"; } |
77 | ||
78 | // these are blue in Metal Default Theme | |
79 | /* | |
80 | * @see javax.swing.plaf.metal.MetalTheme#getPrimary1() | |
81 | */ | |
82 | 0 | protected ColorUIResource getPrimary1() { return primary1; } |
83 | ||
84 | /* | |
85 | * @see javax.swing.plaf.metal.MetalTheme#getPrimary2() | |
86 | */ | |
87 | 0 | protected ColorUIResource getPrimary2() { return primary2; } |
88 | /* | |
89 | * @see javax.swing.plaf.metal.MetalTheme#getPrimary3() | |
90 | */ | |
91 | 0 | protected ColorUIResource getPrimary3() { return primary3; } |
92 | ||
93 | // these are gray in Metal Default Theme | |
94 | /* | |
95 | * @see javax.swing.plaf.metal.MetalTheme#getSecondary1() | |
96 | */ | |
97 | 0 | protected ColorUIResource getSecondary1() { return secondary1; } |
98 | ||
99 | /* | |
100 | * @see javax.swing.plaf.metal.MetalTheme#getSecondary2() | |
101 | */ | |
102 | 0 | protected ColorUIResource getSecondary2() { return secondary2; } |
103 | ||
104 | /* | |
105 | * @see javax.swing.plaf.metal.MetalTheme#getSecondary3() | |
106 | */ | |
107 | 0 | protected ColorUIResource getSecondary3() { return secondary3; } |
108 | ||
109 | /* | |
110 | * @see javax.swing.plaf.metal.MetalTheme#getControlTextFont() | |
111 | */ | |
112 | 0 | public FontUIResource getControlTextFont() { return controlFont; } |
113 | ||
114 | /* | |
115 | * @see javax.swing.plaf.metal.MetalTheme#getSystemTextFont() | |
116 | */ | |
117 | 0 | public FontUIResource getSystemTextFont() { return systemFont; } |
118 | ||
119 | /* | |
120 | * @see javax.swing.plaf.metal.MetalTheme#getUserTextFont() | |
121 | */ | |
122 | 0 | public FontUIResource getUserTextFont() { return userFont; } |
123 | ||
124 | /* | |
125 | * @see javax.swing.plaf.metal.MetalTheme#getMenuTextFont() | |
126 | */ | |
127 | 0 | public FontUIResource getMenuTextFont() { return controlFont; } |
128 | ||
129 | /* | |
130 | * @see javax.swing.plaf.metal.MetalTheme#getSubTextFont() | |
131 | */ | |
132 | 0 | public FontUIResource getSubTextFont() { return smallFont; } |
133 | ||
134 | /* | |
135 | * @see javax.swing.plaf.metal.MetalTheme#getWindowTitleFont() | |
136 | */ | |
137 | 0 | public FontUIResource getWindowTitleFont() { return windowTitleFont; } |
138 | } |