Holger's Java API

## com.antelmann.util.gui
Class CustomTheme

    java.lang.Object
      javax.swing.plaf.metal.MetalTheme
          javax.swing.plaf.metal.DefaultMetalTheme
              com.antelmann.util.gui.CustomTheme

    public class CustomTheme

extends DefaultMetalTheme

allows to easily modify color themes.

Author:
  Holger Antelmann

Field Summary
`static DefaultMetalTheme` `AQUA`
`static DefaultMetalTheme` `CHARCOAL`
`static DefaultMetalTheme` `CONTRAST`
`static DefaultMetalTheme` `EMERALD`
`static DefaultMetalTheme` `MARS`
`protected String` `name`
`static DefaultMetalTheme` `OCEAN`
`static DefaultMetalTheme` `RUBY`
`static DefaultMetalTheme` `STEEL`
`protected FontUIResource` `userTextFont`

Constructor Summary
`CustomTheme()` convenience constructor
`CustomTheme(String name)` convenience constructor
`CustomTheme(String name, Color primary1, Color primary2, Color primary3)`
`CustomTheme(String name, Color primary1, Color primary2, Color primary3, Color secondary1, Color secondary2, Color secondary3)`
`CustomTheme(String name, Properties props)` allows the construction of a theme based on a set of properties.

Method Summary
`ColorUIResource` `getBlack()`
`FontUIResource` `getControlTextFont()`
`FontUIResource` `getMenuTextFont()`
`String` `getName()`
`ColorUIResource` `getPrimary1()`
`ColorUIResource` `getPrimary2()`
`ColorUIResource` `getPrimary3()`
`Properties` `getProperties()` returns the properties that allow to reconstruct this theme using the appropriate constructor
`ColorUIResource` `getSecondary1()`
`ColorUIResource` `getSecondary2()`
`ColorUIResource` `getSecondary3()`
`FontUIResource` `getSubTextFont()`
`FontUIResource` `getSystemTextFont()`
`static DefaultMetalTheme[]` `getThemes()` returns some themes that may not be CustomTheme objects
`FontUIResource` `getUserTextFont()`
`ColorUIResource` `getWhite()`
`FontUIResource` `getWindowTitleFont()`
`void` `setBlack(ColorUIResource black)`
`void` `setPrimary1(ColorUIResource primary1)`
`void` `setPrimary2(ColorUIResource primary2)`
`void` `setPrimary3(ColorUIResource primary3)`
`void` `setProperties(Properties props)`
`void` `setSecondary1(ColorUIResource secondary1)`
`void` `setSecondary2(ColorUIResource secondary2)`
`void` `setSecondary3(ColorUIResource secondary3)`
`void` `setUserTextFont(FontUIResource font)`
`void` `setWhite(ColorUIResource white)`

Methods inherited from class javax.swing.plaf.metal.MetalTheme

`addCustomEntriesToTable, getAcceleratorForeground, getAcceleratorSelectedForeground, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getDesktopColor, getFocusColor, getHighlightedTextColor, getInactiveControlTextColor, getInactiveSystemTextColor, getMenuBackground, getMenuDisabledForeground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSystemTextColor, getTextHighlightColor, getUserTextColor, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### OCEAN

    public static DefaultMetalTheme OCEAN

### STEEL

    public static DefaultMetalTheme STEEL

### AQUA

    public static DefaultMetalTheme AQUA

### CHARCOAL

    public static DefaultMetalTheme CHARCOAL

### CONTRAST

    public static DefaultMetalTheme CONTRAST

### EMERALD

    public static DefaultMetalTheme EMERALD

### RUBY

    public static DefaultMetalTheme RUBY

### MARS

    public static DefaultMetalTheme MARS

### name

    protected String name

### userTextFont

    protected FontUIResource userTextFont

Constructor Detail

### CustomTheme

    public CustomTheme()

  convenience constructor

### CustomTheme

    public CustomTheme(String name)

  convenience constructor

### CustomTheme

    public CustomTheme(String name,
                       Properties props)

  allows the construction of a theme based on a set of properties. The properties are to contain the keys primary1 to primary3 and secondary1 to secondary3. The corresponding values must represent an integer containing the RGB value according to `Color.getRGB()`. if the property cannot be read as an integer corresponding to a valid RGB integer, it defaults to the super value.

### CustomTheme

    public CustomTheme(String name,
                       Color primary1,
                       Color primary2,
                       Color primary3)

### CustomTheme

    public CustomTheme(String name,
                       Color primary1,
                       Color primary2,
                       Color primary3,
                       Color secondary1,
                       Color secondary2,
                       Color secondary3)

Method Detail

### setProperties

    public void setProperties(Properties props)

### getProperties

    public Properties getProperties()

  returns the properties that allow to reconstruct this theme using the appropriate constructor

### getName

    public String getName()

  Overrides:
    `getName` in class `DefaultMetalTheme`

### getPrimary1

    public ColorUIResource getPrimary1()

  Overrides:
    `getPrimary1` in class `DefaultMetalTheme`

### getPrimary2

    public ColorUIResource getPrimary2()

  Overrides:
    `getPrimary2` in class `DefaultMetalTheme`

### getPrimary3

    public ColorUIResource getPrimary3()

  Overrides:
    `getPrimary3` in class `DefaultMetalTheme`

### getSecondary1

    public ColorUIResource getSecondary1()

  Overrides:
    `getSecondary1` in class `DefaultMetalTheme`

### getSecondary2

    public ColorUIResource getSecondary2()

  Overrides:
    `getSecondary2` in class `DefaultMetalTheme`

### getSecondary3

    public ColorUIResource getSecondary3()

  Overrides:
    `getSecondary3` in class `DefaultMetalTheme`

### getBlack

    public ColorUIResource getBlack()

  Overrides:
    `getBlack` in class `MetalTheme`

### getWhite

    public ColorUIResource getWhite()

  Overrides:
    `getWhite` in class `MetalTheme`

### getControlTextFont

    public FontUIResource getControlTextFont()

  Overrides:
    `getControlTextFont` in class `DefaultMetalTheme`

### getMenuTextFont

    public FontUIResource getMenuTextFont()

  Overrides:
    `getMenuTextFont` in class `DefaultMetalTheme`

### getSubTextFont

    public FontUIResource getSubTextFont()

  Overrides:
    `getSubTextFont` in class `DefaultMetalTheme`

### getSystemTextFont

    public FontUIResource getSystemTextFont()

  Overrides:
    `getSystemTextFont` in class `DefaultMetalTheme`

### getUserTextFont

    public FontUIResource getUserTextFont()

  Overrides:
    `getUserTextFont` in class `DefaultMetalTheme`

### getWindowTitleFont

    public FontUIResource getWindowTitleFont()

  Overrides:
    `getWindowTitleFont` in class `DefaultMetalTheme`

### getThemes

    public static DefaultMetalTheme[] getThemes()

  returns some themes that may not be CustomTheme objects

### setPrimary1

    public void setPrimary1(ColorUIResource primary1)

### setPrimary2

    public void setPrimary2(ColorUIResource primary2)

### setPrimary3

    public void setPrimary3(ColorUIResource primary3)

### setSecondary1

    public void setSecondary1(ColorUIResource secondary1)

### setSecondary2

    public void setSecondary2(ColorUIResource secondary2)

### setSecondary3

    public void setSecondary3(ColorUIResource secondary3)

### setBlack

    public void setBlack(ColorUIResource black)

### setWhite

    public void setWhite(ColorUIResource white)

### setUserTextFont

    public void setUserTextFont(FontUIResource font)

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads