001: package snow.lookandfeel;
002:
003: import snow.utils.storage.AppProperties;
004: import snow.utils.gui.*;
005: import java.io.*;
006: import javax.swing.*;
007: import javax.swing.event.*;
008: import javax.swing.plaf.metal.*;
009: import javax.swing.plaf.*;
010: import java.awt.*;
011: import java.awt.event.*;
012: import java.util.*;
013:
014: public class CustomOceanTheme_Snow extends CustomOceanTheme {
015: public static final String name = "Snow Theme";
016:
017: public CustomOceanTheme_Snow(AppProperties props) {
018: super (name, props, null); //new ImageIcon(new SnowIcon(120,120).getIconAsImage()));
019: writeDefaults();
020: }
021:
022: /** Writes the defaults in the inifile
023: */
024: @Override
025: public void writeDefaults() {
026: this .setDefaultFont(this .FONT_ControlText, new FontUIResource(
027: "Dialog", Font.PLAIN, 10));
028: this .setDefaultFont(this .FONT_System, new FontUIResource(
029: "Dialog", Font.PLAIN, 10));
030: this .setDefaultFont(this .FONT_WindowTitle, new FontUIResource(
031: "Dialog", Font.BOLD, 11));
032: this .setDefaultFont(this .FONT_UserText, new FontUIResource(
033: "SansSerif", Font.PLAIN, 10));
034: this .setDefaultFont(this .FONT_SubText, new FontUIResource(
035: "Dialog", Font.PLAIN, 9));
036: this .setDefaultFont(this .FONT_MenuText, new FontUIResource(
037: "Dialog", Font.PLAIN, 10));
038: // [Feb2008] don't work
039: this .setDefaultFont("Menu.font", new FontUIResource("Dialog",
040: Font.PLAIN, 9));
041: this .setDefaultFont("MenuBar.font", new FontUIResource(
042: "Dialog", Font.PLAIN, 9));
043:
044: // Colors
045: //
046: this .setDefaultColor(this .COLOR_White, new ColorUIResource(255,
047: 255, 255)); // White is white
048: this .setDefaultColor(this .COLOR_BLACK, new ColorUIResource(0,
049: 0, 0));
050:
051: // [Feb2008] don't work
052: Font font = new FontUIResource(UIManager
053: .getFont("InternalFrame.titleFont"));
054: UIManager.put("Menu.font", font);
055: UIManager.put("MenuBar.font", font);
056: UIManager.put("MenuItem.font", font);
057:
058: /*
059: // Title back, ext frame borders
060: this.setDefaultColor(this.COLOR_Primary1, new ColorUIResource( 98, 88, 112 ));
061: // Combobox selections, table, tree selections
062: this.setDefaultColor(this.COLOR_Primary2, new ColorUIResource( 84, 78, 96 ));
063: // border of buttons when mouse over, tree selections
064: this.setDefaultColor(this.COLOR_Primary3, new ColorUIResource( 70, 65, 81 ));
065:
066: // all components border
067: this.setDefaultColor(this.COLOR_Secondary1, new ColorUIResource( 53, 58, 73 ));
068: // clicked background, focus checkbox, second button gradient
069: this.setDefaultColor(this.COLOR_Secondary2, new ColorUIResource( 80, 84, 80 ));
070: // panel background
071: this.setDefaultColor(this.COLOR_Secondary3, new ColorUIResource(116, 122, 116 ));
072: */
073:
074: // addCustomEntriesToTable(UIManager.getDefaults());
075: }
076:
077: /*
078: public void addCustomEntriesToTable(UIDefaults table)
079: {
080:
081: super.addCustomEntriesToTable(table);
082:
083: java.util.List buttonGradient = Arrays.asList(
084: new Object[] { new Float(.3f), new Float(0f),
085: new ColorUIResource(0xDDE8F3),
086: this.getSecondary3(),
087: getSecondary2() }); // default: white & secondary2 !!!
088:
089: UIManager.put("Button.gradient", buttonGradient);
090: UIManager.put("CheckBox.gradient", buttonGradient);
091: //UIManager.put("CheckBox.foreground", new ColorUIResource(Color.red));
092: //UIManager.put("Tree.rightChildIndent", 15);
093:
094: } */
095:
096: @Override
097: public void addCustomEntriesToTable(UIDefaults table) {
098: super .addCustomEntriesToTable(table);
099: }
100:
101: /*
102: public static void main(String[] aaa)
103: {
104: ThemesManager.main(aaa);
105: }*/
106:
107: }
|