001: /*
002: * Copyright (C) 2004 NNL Technology AB
003: * Visit www.infonode.net for information about InfoNode(R)
004: * products and how to contact NNL Technology AB.
005: *
006: * This program is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU General Public License
008: * as published by the Free Software Foundation; either version 2
009: * of the License, or (at your option) any later version.
010: *
011: * This program is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014: * GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
019: * MA 02111-1307, USA.
020: */
021:
022: // $Id: InfoNodeLookAndFeelThemes.java,v 1.17 2005/12/04 13:46:03 jesper Exp $
023: package net.infonode.gui.laf;
024:
025: import net.infonode.gui.Colors;
026: import net.infonode.util.ColorUtil;
027:
028: import java.awt.*;
029:
030: /**
031: * Contains some predefined InfoNode look and feel themes.
032: *
033: * @author $Author: jesper $
034: * @version $Revision: 1.17 $
035: */
036: public class InfoNodeLookAndFeelThemes {
037: private InfoNodeLookAndFeelThemes() {
038: }
039:
040: /**
041: * A theme with dark blue controls and green selection.
042: *
043: * @return the theme
044: */
045: public static InfoNodeLookAndFeelTheme getDarkBlueGreenTheme() {
046: float hue = Colors.ROYAL_BLUE_HUE;
047: float saturation = 0.20f;
048:
049: return new InfoNodeLookAndFeelTheme("Dark Blue Green Theme",
050: Color.getHSBColor(hue, saturation, 0.5f), Color
051: .getHSBColor(hue, saturation + 0.1f, 0.9f),
052: Color.getHSBColor(Colors.SAND_HUE, 0.04f, 0.5f),
053: Color.WHITE, new Color(0, 170, 0), Color.WHITE, 0.8);
054: }
055:
056: /**
057: * A theme with light gray controls and blue selection.
058: *
059: * @return the theme
060: */
061: public static InfoNodeLookAndFeelTheme getGrayTheme() {
062: float hue = Colors.ROYAL_BLUE_HUE;
063: float saturation = 0.4f;
064:
065: return new InfoNodeLookAndFeelTheme("Gray Theme", new Color(
066: 220, 220, 220), Color.getHSBColor(hue,
067: saturation + 0.3f, 1f),
068: InfoNodeLookAndFeelTheme.DEFAULT_BACKGROUND_COLOR,
069: InfoNodeLookAndFeelTheme.DEFAULT_TEXT_COLOR, Color
070: .getHSBColor(hue, saturation, 1.0f),
071: Color.BLACK);
072: }
073:
074: /**
075: * A theme with light blue controls and blue selection.
076: *
077: * @return the theme
078: */
079: public static InfoNodeLookAndFeelTheme getBlueIceTheme() {
080: float hue = Colors.ROYAL_BLUE_HUE;
081: float saturation = 0.4f;
082:
083: Color color = new Color(197, 206, 218);
084: InfoNodeLookAndFeelTheme theme = new InfoNodeLookAndFeelTheme(
085: "Blue Ice Theme", color, Color.getHSBColor(hue,
086: saturation + 0.3f, 1f),
087: InfoNodeLookAndFeelTheme.DEFAULT_BACKGROUND_COLOR,
088: InfoNodeLookAndFeelTheme.DEFAULT_TEXT_COLOR, Color
089: .getHSBColor(hue, saturation - 0.15f, 0.9f),
090: Color.BLACK, 0.3);
091: theme.setPrimaryControlColor(ColorUtil.mult(color, 0.9));
092: return theme;
093: }
094:
095: /**
096: * A low contrast theme with a softer tone.
097: *
098: * @return the theme
099: */
100: public static InfoNodeLookAndFeelTheme getSoftGrayTheme() {
101: InfoNodeLookAndFeelTheme theme = new InfoNodeLookAndFeelTheme(
102: "Soft Gray Theme",
103: /*new Color(230, 225, 217)*/new Color(230, 230, 233),
104: new Color(212, 220, 236), new Color(255, 255, 255),
105: new Color(0, 0, 0), new Color(76, 113, 188), new Color(
106: 255, 255, 255), 0.2);
107: theme.setActiveInternalFrameTitleBackgroundColor(new Color(76,
108: 113, 188));
109: //theme.setActiveInternalFrameTitleBackgroundColor(new Color(118, 146, 204));
110: theme.setActiveInternalFrameTitleForegroundColor(Color.WHITE);
111: theme.setActiveInternalFrameTitleGradientColor(new Color(80,
112: 135, 248));
113: //theme.setActiveInternalFrameTitleGradientColor(new Color(149, 182, 251));
114: theme.setInactiveInternalFrameTitleBackgroundColor(new Color(
115: 220, 220, 222)/*new Color(210, 206, 198)*/);
116: theme.setInactiveInternalFrameTitleForegroundColor(Color.BLACK);
117: theme.setInactiveInternalFrameTitleGradientColor(new Color(240,
118: 240, 243));
119:
120: return theme;
121: }
122:
123: }
|