001: /*
002: * Copyright (c) 2005-2008 Substance Kirill Grouchnikov. All Rights Reserved.
003: *
004: * Redistribution and use in source and binary forms, with or without
005: * modification, are permitted provided that the following conditions are met:
006: *
007: * o Redistributions of source code must retain the above copyright notice,
008: * this list of conditions and the following disclaimer.
009: *
010: * o Redistributions in binary form must reproduce the above copyright notice,
011: * this list of conditions and the following disclaimer in the documentation
012: * and/or other materials provided with the distribution.
013: *
014: * o Neither the name of Substance Kirill Grouchnikov nor the names of
015: * its contributors may be used to endorse or promote products derived
016: * from this software without specific prior written permission.
017: *
018: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
019: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
020: * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
021: * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
022: * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
023: * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
024: * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
025: * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
026: * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
027: * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
028: * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
029: */
030: package org.jvnet.substance.skin;
031:
032: import org.jvnet.substance.border.ClassicInnerBorderPainter;
033: import org.jvnet.substance.button.ClassicButtonShaper;
034: import org.jvnet.substance.color.LightGrayColorScheme;
035: import org.jvnet.substance.painter.*;
036: import org.jvnet.substance.painter.decoration.ArcDecorationPainter;
037: import org.jvnet.substance.painter.decoration.DecorationAreaType;
038: import org.jvnet.substance.painter.highlight.ClassicHighlightPainter;
039: import org.jvnet.substance.theme.*;
040: import org.jvnet.substance.theme.SubstanceTheme.ThemeKind;
041: import org.jvnet.substance.utils.SubstanceConstants.ColorShiftKind;
042: import org.jvnet.substance.watermark.SubstanceNullWatermark;
043:
044: /**
045: * <code>Creme</code> skin. This class is part of officially supported API.
046: *
047: * @author Kirill Grouchnikov
048: * @since version 3.1
049: */
050: public class CremeSkin extends SubstanceAbstractSkin {
051: /**
052: * Display name for <code>this</code> skin.
053: */
054: public static String NAME = "Creme";
055:
056: /**
057: * Creates a new <code>Creme</code> skin.
058: */
059: public CremeSkin() {
060: SubstanceTheme activeTheme = new SubstanceLightAquaTheme()
061: .tint(0.3);
062: SubstanceTheme defaultTheme = new SubstanceCremeTheme();
063: SubstanceTheme disabledTheme = new SubstanceTheme(
064: new LightGrayColorScheme(), "Tint Light Gray",
065: ThemeKind.COLD).tint(0.35);
066: SubstanceTheme activeTitleTheme = defaultTheme;
067:
068: SubstanceComplexTheme theme = new SubstanceComplexTheme(NAME,
069: ThemeKind.COLD, activeTheme, defaultTheme,
070: disabledTheme, activeTitleTheme);
071:
072: theme.registerDecorationAreaTheme(activeTitleTheme, false,
073: DecorationAreaType.PRIMARY_TITLE_PANE,
074: DecorationAreaType.SECONDARY_TITLE_PANE,
075: DecorationAreaType.HEADER, DecorationAreaType.GENERAL,
076: DecorationAreaType.TOOLBAR);
077:
078: theme
079: .setNonActivePainter(new SimplisticSoftBorderReverseGradientPainter());
080: theme.setSelectedTabFadeStart(0.2);
081: theme.setSelectedTabFadeEnd(0.4);
082: this .theme = theme;
083: // ((SubstanceComplexTheme) this.theme)
084: // .setCellRendererBackgroundTheme(new SubstanceBlendBiTheme(
085: // new SubstanceTerracottaTheme(),
086: // new SubstanceSunGlareTheme(), 0.5).tint(0.2));
087: // theme.addPaintAsActive(JScrollBar.class);
088: this .buttonShaper = new ClassicButtonShaper();
089: this .watermark = new SubstanceNullWatermark();
090: this .gradientPainter = new ClassicGradientPainter();
091: this .decorationPainter = new ArcDecorationPainter();
092: this .borderPainter = new ClassicInnerBorderPainter(0.8f,
093: ColorShiftKind.TINT);
094: this .highlightPainter = new ClassicHighlightPainter();
095:
096: this .tabBackgroundComposite = new AlphaControlBackgroundComposite(
097: 0.75f);
098:
099: this .borderPainter = new ClassicInnerBorderPainter(0.9f,
100: ColorShiftKind.TINT);
101: }
102:
103: /*
104: * (non-Javadoc)
105: *
106: * @see org.jvnet.substance.skin.SubstanceSkin#getDisplayName()
107: */
108: public String getDisplayName() {
109: return NAME;
110: }
111: }
|