01: /*
02: * Copyright 2005 Patrick Gotthardt
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package com.pagosoft.plaf.themes;
17:
18: import com.pagosoft.plaf.PgsTheme;
19: import com.pagosoft.plaf.PgsUtils;
20: import com.pagosoft.plaf.PlafOptions;
21: import com.pagosoft.swing.ColorUtils;
22:
23: import javax.swing.*;
24: import javax.swing.plaf.ColorUIResource;
25: import java.awt.*;
26:
27: public class SilverTheme extends PgsTheme {
28: public SilverTheme() {
29: super ("SilverTheme");
30: PlafOptions.setOfficeScrollBarEnabled(true);
31: setPrimary1(new ColorUIResource(0x899196));
32: setPrimary2(new ColorUIResource(0xACB5BD));
33: setPrimary3(new ColorUIResource(0xCEDAE3));
34: setSecondary1(new ColorUIResource(0x969189));
35: setSecondary2(new ColorUIResource(0xBDB6AC));
36: setSecondary3(new ColorUIResource(0xE3E3E3));
37:
38: ColorUIResource menuBg = new ColorUIResource(ColorUtils
39: .getSimiliarColor(getSecondary3(), 1.1f));
40: setDefaults(new Object[] { "PopupMenu.background", menuBg,
41: "Menu.background", menuBg, "MenuItem.background",
42: menuBg, "RadioButtonMenuItem.background", menuBg,
43: "CheckBoxMenuItem.background", menuBg,
44:
45: "RadioButtonMenuItem.selectionBackground",
46: new ColorUIResource(0xFAD68A),
47: "CheckBoxMenuItem.selectionBackground",
48: new ColorUIResource(0xFAD68A),
49:
50: "MenuBarMenu.selectedBackground", getPrimary2(),
51: "MenuBarMenu.rolloverBorderColor", getControlShadow(),
52: "MenuBarMenu.selectedBorderColor", getPrimary2(),
53: "glow", new ColorUIResource(0xe7eb2a),
54:
55: "Menu.gradientStart", getPrimary3(),
56: "Menu.gradientEnd", getPrimary2(),
57: "Menu.gradientMiddle", getPrimary3(), "Menu.isFlat",
58: Boolean.FALSE, "MenuBar.border",
59: BorderFactory.createEmptyBorder(0, 0, 0, 0),
60:
61: "MenuItem.gradientStart", getPrimary3(),
62: "MenuItem.gradientEnd", getPrimary2(),
63: "MenuItem.gradientMiddle", getPrimary3(),
64: "MenuItem.isFlat", Boolean.FALSE,
65:
66: "CheckBoxMenuItem.gradientStart", getPrimary3(),
67: "CheckBoxMenuItem.gradientEnd", getPrimary2(),
68: "CheckBoxMenuItem.gradientMiddle", getPrimary3(),
69: "CheckBoxMenuItem.isFlat", Boolean.FALSE,
70:
71: "RadioButtonMenuItem.gradientStart", getPrimary3(),
72: "RadioButtonMenuItem.gradientEnd", getPrimary2(),
73: "RadioButtonMenuItem.gradientMiddle", getPrimary3(),
74: "RadioButtonMenuItem.isFlat", Boolean.FALSE,
75:
76: "ToolBarButton.selectedGradientStart",
77: getPrimaryControl(),
78: "ToolBarButton.selectedGradientEnd",
79: getPrimaryControlDarkShadow() });
80:
81: PgsUtils.rolloverBorderStroke = new BasicStroke(1.8f,
82: BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND);
83: }
84: }
|