001: /*
002: * Copyright (c) 2004 Sun Microsystems, Inc. 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
006: * are met:
007: *
008: * -Redistributions of source code must retain the above copyright
009: * notice, this list of conditions and the following disclaimer.
010: *
011: * -Redistribution in binary form must reproduct the above copyright
012: * notice, this list of conditions and the following disclaimer in
013: * the documentation and/or other materials provided with the distribution.
014: *
015: * Neither the name of Sun Microsystems, Inc. or the names of contributors
016: * may be used to endorse or promote products derived from this software
017: * without specific prior written permission.
018: *
019: * This software is provided "AS IS," without a warranty of any kind. ALL
020: * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
021: * ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
022: * OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT
023: * BE LIABLE FOR ANY DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT
024: * OF OR RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR ITS
025: * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
026: * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,
027: * INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY
028: * OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN
029: * IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
030: *
031: * You acknowledge that Software is not designed, licensed or intended for
032: * use in the design, construction, operation or maintenance of any nuclear
033: * facility.
034: */
035:
036: /*
037: * @(#)CharcoalTheme.java 1.8 03/12/19
038: */
039: package br.com.igor.plaf.theme;
040:
041: import javax.swing.plaf.ColorUIResource;
042: import javax.swing.plaf.metal.DefaultMetalTheme;
043:
044: /**
045: * This class describes a theme using gray colors.
046: *
047: * 1.8 12/19/03
048: * @author Steve Wilson
049: */
050: public class CharcoalTheme extends DefaultMetalTheme {
051:
052: /**
053: * @see javax.swing.plaf.metal.DefaultMetalTheme#getName()
054: */
055: @Override
056: public String getName() {
057: return "Charcoal";
058: }
059:
060: private final ColorUIResource primary1 = new ColorUIResource(66,
061: 33, 66);
062: private final ColorUIResource primary2 = new ColorUIResource(90,
063: 86, 99);
064: private final ColorUIResource primary3 = new ColorUIResource(99,
065: 99, 99);
066:
067: private final ColorUIResource secondary1 = new ColorUIResource(0,
068: 0, 0);
069: private final ColorUIResource secondary2 = new ColorUIResource(51,
070: 51, 51);
071: private final ColorUIResource secondary3 = new ColorUIResource(102,
072: 102, 102);
073:
074: private final ColorUIResource black = new ColorUIResource(222, 222,
075: 222);
076: private final ColorUIResource white = new ColorUIResource(0, 0, 0);
077:
078: @Override
079: protected ColorUIResource getPrimary1() {
080: return primary1;
081: }
082:
083: @Override
084: protected ColorUIResource getPrimary2() {
085: return primary2;
086: }
087:
088: @Override
089: protected ColorUIResource getPrimary3() {
090: return primary3;
091: }
092:
093: @Override
094: protected ColorUIResource getSecondary1() {
095: return secondary1;
096: }
097:
098: @Override
099: protected ColorUIResource getSecondary2() {
100: return secondary2;
101: }
102:
103: @Override
104: protected ColorUIResource getSecondary3() {
105: return secondary3;
106: }
107:
108: @Override
109: protected ColorUIResource getBlack() {
110: return black;
111: }
112:
113: @Override
114: protected ColorUIResource getWhite() {
115: return white;
116: }
117:
118: }
|