001: package vicazh.hyperpool.themes;
002:
003: import javax.swing.plaf.*;
004: import javax.swing.plaf.metal.*;
005:
006: /**
007: * This class describes a theme.
008: *
009: * @author Victor Zhigunov
010: * @version 0.3.9
011: */
012: public class ITheme extends DefaultMetalTheme {
013:
014: private String name;
015:
016: private ColorUIResource color1;
017:
018: private ColorUIResource color2;
019:
020: private ColorUIResource color3;
021:
022: private ColorUIResource color4;
023:
024: private ColorUIResource color5;
025:
026: private ColorUIResource color6;
027:
028: private ColorUIResource color7;
029:
030: private ColorUIResource color8;
031:
032: private ColorUIResource black;
033:
034: private ColorUIResource white;
035:
036: private FontUIResource font1;
037:
038: private FontUIResource font2;
039:
040: private FontUIResource font3;
041:
042: private FontUIResource font4;
043:
044: private FontUIResource font5;
045:
046: private FontUIResource font6;
047:
048: /**
049: * @param name
050: * theme name
051: * @param color1
052: * color 1
053: * @param color2
054: * color 2
055: * @param color3
056: * color 3
057: * @param color4
058: * color 4
059: * @param color5
060: * color 5
061: * @param color6
062: * color 6
063: * @param color7
064: * color 7
065: * @param color8
066: * color 8
067: * @param black
068: * black color
069: * @param white
070: * white color
071: * @param font1
072: * font1
073: * @param font2
074: * font2
075: * @param font3
076: * font3
077: * @param font4
078: * font4
079: * @param font5
080: * font5
081: * @param font6
082: * font6
083: */
084: public ITheme(String name, ColorUIResource color1,
085: ColorUIResource color2, ColorUIResource color3,
086: ColorUIResource color4, ColorUIResource color5,
087: ColorUIResource color6, ColorUIResource color7,
088: ColorUIResource color8, ColorUIResource black,
089: ColorUIResource white, FontUIResource font1,
090: FontUIResource font2, FontUIResource font3,
091: FontUIResource font4, FontUIResource font5,
092: FontUIResource font6) {
093: this .name = name;
094: this .color1 = color1;
095: this .color2 = color2;
096: this .color3 = color3;
097: this .color4 = color4;
098: this .color5 = color5;
099: this .color6 = color6;
100: this .color7 = color7;
101: this .color8 = color8;
102: this .black = black;
103: this .white = white;
104: this .font1 = font1;
105: this .font2 = font2;
106: this .font3 = font3;
107: this .font4 = font4;
108: this .font5 = font5;
109: this .font6 = font6;
110: }
111:
112: public String getName() {
113: return name;
114: }
115:
116: protected ColorUIResource getPrimary1() {// border, hotkeys
117: return color1;
118: }
119:
120: protected ColorUIResource getPrimary2() {// menu
121: return color2;
122: }
123:
124: protected ColorUIResource getPrimary3() {// text select
125: return color3;
126: }
127:
128: protected ColorUIResource getSecondary1() {
129: return color4;
130: }
131:
132: protected ColorUIResource getSecondary2() {
133: return color5;
134: }
135:
136: protected ColorUIResource getSecondary3() {// control
137: return color6;
138: }
139:
140: protected ColorUIResource getBlack() {
141: return black;
142: }
143:
144: protected ColorUIResource getWhite() {
145: return white;
146: }
147:
148: public ColorUIResource getUserTextColor() {
149: return color7;
150: }
151:
152: public ColorUIResource getHighlightedTextColor() {
153: return color8;
154: }
155:
156: public FontUIResource getControlTextFont() {
157: return font1;
158: }
159:
160: public FontUIResource getSystemTextFont() {
161: return font2;
162: }
163:
164: public FontUIResource getUserTextFont() {
165: return font3;
166: }
167:
168: public FontUIResource getMenuTextFont() {
169: return font4;
170: }
171:
172: public FontUIResource getWindowTitleFont() {
173: return font5;
174: }
175:
176: public FontUIResource getSubTextFont() {
177: return font6;
178: }
179: }
|