001: /*
002: * Copyright 2005 Patrick Gotthardt
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package com.pagosoft.plaf.themes;
017:
018: import com.pagosoft.plaf.PgsTheme;
019: import com.pagosoft.plaf.PlafOptions;
020:
021: import javax.swing.plaf.*;
022: import java.awt.*;
023:
024: /**
025: * @author Patrick Gotthardt
026: */
027: public class VistaTheme extends PgsTheme {
028: public VistaTheme() {
029: super ("Vista");
030:
031: setSecondary3(new ColorUIResource(0xE7E7E7));
032: setSecondary2(new ColorUIResource(0xFDFDFD));
033: setSecondary1(new ColorUIResource(0x8E8F8F));
034:
035: setPrimary1(new ColorUIResource(0x3c7fb1));
036: setPrimary2(new ColorUIResource(0xaadcf8));
037: setPrimary3(new ColorUIResource(0xdff2fc));
038:
039: setBlack(new ColorUIResource(Color.BLACK));
040: setWhite(new ColorUIResource(Color.WHITE));
041:
042: PlafOptions.setOfficeScrollBarEnabled(true);
043: PlafOptions.setVistaStyle(true);
044: PlafOptions.useBoldFonts(false);
045:
046: setDefaults(new Object[] { "MenuBar.isFlat", Boolean.FALSE,
047: "MenuBar.gradientStart", new ColorUIResource(0x496791),
048: "MenuBar.gradientMiddle",
049: new ColorUIResource(0x3f5e89), "MenuBar.gradientEnd",
050: new ColorUIResource(0x3a5a86),
051:
052: "MenuBarMenu.isFlat", Boolean.FALSE,
053: "MenuBarMenu.foreground", getWhite(),
054: "MenuBarMenu.rolloverBackground.gradientStart",
055: new ColorUIResource(0x6987B1),
056: "MenuBarMenu.rolloverBackground.gradientMiddle",
057: new ColorUIResource(0x3f5e89),
058: "MenuBarMenu.rolloverBackground.gradientEnd",
059: new ColorUIResource(0x3a5a86),
060: "MenuBarMenu.selectedBackground.gradientStart",
061: new ColorUIResource(0x6987B1),
062: "MenuBarMenu.selectedBackground.gradientMiddle",
063: new ColorUIResource(0x3f5e89),
064: "MenuBarMenu.selectedBackground.gradientEnd",
065: new ColorUIResource(0x3a5a86),
066: "MenuBarMenu.rolloverBorderColor", getPrimary3(),
067: "MenuBarMenu.selectedBorderColor", getPrimary3(),
068:
069: "Menu.gradientStart", getPrimary3(),
070: "Menu.gradientEnd", getPrimary2(),
071: "Menu.gradientMiddle", getPrimary3(), "Menu.isFlat",
072: Boolean.FALSE,
073:
074: "MenuItem.gradientStart", getPrimary3(),
075: "MenuItem.gradientEnd", getPrimary2(),
076: "MenuItem.gradientMiddle", getPrimary3(),
077: "MenuItem.isFlat", Boolean.FALSE,
078:
079: "CheckBoxMenuItem.gradientStart", getPrimary3(),
080: "CheckBoxMenuItem.gradientEnd", getPrimary2(),
081: "CheckBoxMenuItem.gradientMiddle", getPrimary3(),
082: "CheckBoxMenuItem.isFlat", Boolean.FALSE,
083:
084: "RadioButtonMenuItem.gradientStart", getPrimary3(),
085: "RadioButtonMenuItem.gradientEnd", getPrimary2(),
086: "RadioButtonMenuItem.gradientMiddle", getPrimary3(),
087: "RadioButtonMenuItem.isFlat", Boolean.FALSE,
088:
089: "Button.rolloverGradientStart", getPrimary3(),
090: "Button.rolloverGradientEnd", getPrimary2(),
091: "Button.selectedGradientStart", getPrimary3(),
092: "Button.selectedGradientEnd", getPrimary1(),
093: "Button.rolloverVistaStyle", Boolean.TRUE, "glow",
094: getPrimary1(),
095:
096: "ToggleButton.rolloverGradientStart", getPrimary3(),
097: "ToggleButton.rolloverGradientEnd", getPrimary2(),
098: "ToggleButton.selectedGradientStart", getPrimary3(),
099: "ToggleButton.selectedGradientEnd", getPrimary1(), });
100: }
101: }
|