Catalyst Theme

The easy way to get a Custom L&F: Create your own Theme.

MetalTheme
+ MetalTheme()
+ getAcceleratorForeground() : ColorUIResource
+ getControlDarkShadow() : ColorUIResource
+ getSelectedForeground() : ColorUIResource
+ getTextHighlightColor() : ColorUIResource
+ getUserTextColor() : ColorUIResource
+ getWindowBackground() : ColorUIResource
+ getWindowTitleBackground() : ColorUIResource
+ getWindowTitleForeground() : ColorUIResource
+ getMenuTextFont() : FontUIResource
+ getSubTextFont() : FontUIResource
many more...
+ addCustomEntriesToTable(UIDefaults)
DefaultMetalTheme
+ DefaultMetalTheme()
# getPrimary1() : ColorUIResource
# getPrimary2() : ColorUIResource
# getPrimary3() : ColorUIResource
# getSecondary1() : ColorUIResource
# getSecondary2() : ColorUIResource
# getSecondary3() : ColorUIResource
+ getControlTextFont() : FontUIResource
+ getSystemTextFont() : FontUIResource
+ getUserTextFont() : FontUIResource
+ getMenuTextFont() : FontUIResource
many more...
+ addCustomEntriesToTable(UIDefaults)
CatalystTheme
+ CatalystTheme()
# getPrimary1() : ColorUIResource
# getPrimary2() : ColorUIResource
# getPrimary3() : ColorUIResource
# getSecondary1() : ColorUIResource
# getSecondary2() : ColorUIResource
# getSecondary3() : ColorUIResource
+ getControlTextFont() : FontUIResource
+ getSystemTextFont() : FontUIResource
+ getUserTextFont() : FontUIResource
+ getMenuTextFont() : FontUIResource
many more...
+ addCustomEntriesToTable(UIDefaults)
public class CatalystTheme extends DefaultMetalTheme {

    protected ColorUIResource getPrimary1()    { return new ColorUIResource(0x596575); }
    protected ColorUIResource getPrimary2()    { return new ColorUIResource(0x979EA8); }
    protected ColorUIResource getPrimary3()    { return new ColorUIResource(0xD4D6DB); }
    protected ColorUIResource getSecondary1()  { return new ColorUIResource(0x4D6584); }
    protected ColorUIResource getSecondary2()  { return new ColorUIResource(0x95A3B7); }
    protected ColorUIResource getSecondary3()  { return new ColorUIResource(0xDDE1EA); }

    private FontUIResource font = new FontUIResource("SansSerif", FontUIResource.PLAIN, 11);

    public FontUIResource getControlTextFont() { return font; }
    public FontUIResource getSystemTextFont()  { return font; }
    public FontUIResource getUserTextFont()    { return font; }
    public FontUIResource getMenuTextFont()    { return font; }
    public FontUIResource getWindowTitleFont() { return font; }
    public FontUIResource getSubTextFont()     { return font; }

    public void addCustomEntriesToTable(UIDefaults table) {

        table.put("Button.border", createButtonBorder());

        table.put("ComboBox.border", BorderFactory.createLineBorder(secndry1));
        table.put("ComboBoxUI", "com.activant.catalystj.ui.plaf.CatalystComboBoxUI");

        table.put("Menu.acceleratorFont", table.get("Menu.font"));
        table.put("Menu.acceleratorForeground", table.get("Menu.foreground"));
        table.put("Menu.acceleratorSelectionForeground", table.get("Menu.selectionForeground"));

        table.put("MenuItem.acceleratorDelimiter", "+");
        table.put("MenuItem.acceleratorFont", table.get("Menu.font"));
        table.put("MenuItem.acceleratorForeground", table.get("Menu.foreground"));
        table.put("MenuItem.acceleratorSelectionForeground", table.get("Menu.selectionForeground"));

        table.put("TabbedPane.focus", yellow);
        table.put("TabbedPane.tabInsets", new InsetsUIResource(3, 20, 3, 20));
        table.put("TabbedPane.contentBorderInsets", new InsetsUIResource(6, 6, 6, 6));
        table.put("TabbedPane.background", table.get("TabbedPane.selected"));
    }
}