001: package snow.lookandfeel;
002:
003: import snow.utils.storage.AppProperties;
004: import snow.utils.gui.*;
005:
006: import java.io.*;
007: import javax.swing.*;
008: import javax.swing.event.*;
009: import javax.swing.plaf.metal.*;
010: import javax.swing.plaf.*;
011: import java.awt.*;
012: import java.awt.event.*;
013: import java.util.*;
014:
015: public class CustomOceanTheme_SnowEFCNSmall extends CustomOceanTheme {
016: public static final String name = "EFCNBlack Theme";
017:
018: public CustomOceanTheme_SnowEFCNSmall(AppProperties props) {
019: super (name, props, null);
020: writeDefaults();
021: }
022:
023: /** Writes the defaults in the inifile.
024: */
025: @Override
026: public void writeDefaults() {
027: this .setDefaultFont(this .FONT_ControlText, new FontUIResource(
028: "Dialog", Font.PLAIN, 11));
029: this .setDefaultFont(this .FONT_System, new FontUIResource(
030: "Dialog", Font.PLAIN, 11));
031: this .setDefaultFont(this .FONT_WindowTitle, new FontUIResource(
032: "Dialog", Font.BOLD, 12));
033: this .setDefaultFont(this .FONT_UserText, new FontUIResource(
034: "SansSerif", Font.PLAIN, 11));
035: this .setDefaultFont(this .FONT_SubText, new FontUIResource(
036: "Dialog", Font.PLAIN, 10));
037:
038: // Colors
039: //
040: // menufont
041: this .setDefaultColor(this .COLOR_BLACK, new ColorUIResource(200,
042: 200, 200)); // black is white
043: this .setDefaultColor(this .COLOR_White, new ColorUIResource(20,
044: 20, 20)); // and white is black, no ?
045:
046: // Title back, ext frame borders
047: this .setDefaultColor(this .COLOR_Primary1, new ColorUIResource(
048: 98, 88, 112));
049: // Combobox selections, table, tree selections
050: this .setDefaultColor(this .COLOR_Primary2, new ColorUIResource(
051: 84, 78, 96));
052: // border of buttons when mouse over, table, tree selections, text highlight
053: this .setDefaultColor(this .COLOR_Primary3, new ColorUIResource(
054: 80, 75, 91)); // too dark
055:
056: // all components border
057: this .setDefaultColor(this .COLOR_Secondary1,
058: new ColorUIResource(53, 58, 73));
059: // clicked background, focus checkbox, second button gradient
060: this .setDefaultColor(this .COLOR_Secondary2,
061: new ColorUIResource(80, 84, 80));
062: // panel background
063: this .setDefaultColor(this .COLOR_Secondary3,
064: new ColorUIResource(40, 40, 40));
065: // too light new ColorUIResource(116, 122, 116 ));
066:
067: this .setDefaultColor(this .COLOR_Green, new ColorUIResource(30,
068: 120, 30));
069: this .setDefaultColor(this .COLOR_Red, new ColorUIResource(120,
070: 30, 30));
071:
072: this .setDefaultColor(this .COLOR_DesktopColor,
073: new ColorUIResource(55, 55, 55)); // drak gray
074:
075: // table text
076: this .setDefaultColor(this .COLOR_ControlText,
077: new ColorUIResource(200, 200, 200));
078:
079: this .setDefaultColor(this .COLOR_tide_Comments,
080: new ColorUIResource(130, 130, 60));
081: this .setDefaultColor(this .COLOR_tide_Text, new ColorUIResource(
082: 200, 200, 200));
083: this .setDefaultColor(this .COLOR_tide_Keywords,
084: new ColorUIResource(160, 30, 30));
085: this .setDefaultColor(this .COLOR_tide_Litterals,
086: new ColorUIResource(30, 160, 30));
087:
088: //addCustomEntriesToTable(UIManager.getDefaults());
089: }
090:
091: @Override
092: public void addCustomEntriesToTable(UIDefaults table) {
093:
094: super .addCustomEntriesToTable(table);
095:
096: //if(true) return;
097:
098: /*Original
099: java.util.List buttonGradient = Arrays.asList(
100: new Object[] {new Float(.3f), new Float(0f),
101: new ColorUIResource(0xDDE8F3), getWhite(), getSecondary2() }); */
102:
103: java.util.List buttonGradient = Arrays.asList(new Object[] {
104: new Float(0.3f), new Float(0.45f), getBlack(),
105: getWhite(), getBlack() });
106:
107: UIManager.put("Button.gradient", buttonGradient);
108: UIManager.put("CheckBox.gradient", buttonGradient);
109: UIManager.put("InternalFrame.activeTitleGradient",
110: buttonGradient);
111:
112: /*DEF java.util.List menubGradient = Arrays.asList(new Object[] {
113: new Float(1f), new Float(0f),
114: getWhite(), dadada,
115: new ColorUIResource(dadada) });*/
116:
117: Color dadada = new ColorUIResource(0xDADADA);
118: java.util.List menubGradient = Arrays.asList(new Object[] {
119: new Float(2f), new Float(0f), getWhite(), dadada,
120: new ColorUIResource(dadada) });
121:
122: UIManager.put("MenuBar.gradient", menubGradient);
123:
124: // [Aug2006]
125: UIManager.put("TabbedPane.unselectedBackground",
126: new ColorUIResource(getWhite()));
127: UIManager.put("TabbedPane.contentAreaColor",
128: new ColorUIResource(Color.darkGray)); // orig = white(), OK
129: UIManager.put("TabbedPane.selected", new ColorUIResource(
130: Color.darkGray));
131: UIManager.put("ScrollBar.width", 12); // instead 17
132:
133: // [Feb2008]
134: Font font = new FontUIResource(UIManager
135: .getFont("InternalFrame.titleFont"));
136: UIManager.put("Menu.font", font);
137: UIManager.put("MenuBar.font", font);
138: UIManager.put("MenuItem.font", font);
139:
140: }
141:
142: /* public static void main(String[] aaa)
143: {
144: ThemesManager.main(aaa);
145: }*/
146:
147: }
|