net.sourceforge.steelme
Class SteelmeTheme

java.lang.Object
  extended by javax.swing.plaf.metal.MetalTheme
      extended by javax.swing.plaf.metal.DefaultMetalTheme
          extended by net.sourceforge.steelme.SteelmeTheme

public class SteelmeTheme
extends DefaultMetalTheme

A MetalTheme with persistence and public accessor methods.


Constructor Summary
SteelmeTheme()
          Creates a new SteelmeTheme instance which copies the attributes of DefaultMetalTheme.
SteelmeTheme(Color ip1, Color ip2, Color ip3, Color is1, Color is2, Color is3, Font iif, Color it1, Color it2, Color iw, Color ib)
          Creates a new SteelmeTheme instance.
SteelmeTheme(File themeFile)
          Creates a new SteelmeTheme instance with attributes loaded from the specified file.
SteelmeTheme(InputStream stream)
          pass an inputstream pointing to a properties file.
SteelmeTheme(MetalTheme orig)
          Creates a new SteelmeTheme instance which copies the attributes of the given MetalTheme.
 
Method Summary
 void applyTheme(Component who)
          Applies this theme to the Root component of the given component.
 ColorUIResource getB()
          Describe getB method here.
protected  ColorUIResource getBlack()
          Describe getBlack method here.
protected static String getColorString(Color color)
          Convert a color to 3 integers separated by commas with values from 0..255 which represent it's red, green, and blue components.
 ColorUIResource getControlTextColor()
          Describe getControlTextColor method here.
 FontUIResource getControlTextFont()
          Describe getControlTextFont method here.
 ColorUIResource getHighlightedTextColor()
          Describe getHighlightedTextColor method here.
 ColorUIResource getInactiveControlTextColor()
          Describe getInactiveControlTextColor method here.
 ColorUIResource getInactiveSystemTextColor()
          Describe getInactiveSystemTextColor method here.
 FontUIResource getMenuTextFont()
          Describe getMenuTextFont method here.
 String getName()
          Returns this theme's name.
 ColorUIResource getP1()
          Describe getP1 method here.
 ColorUIResource getP2()
          Describe getP2 method here.
 ColorUIResource getP3()
          Describe getP3 method here.
protected  ColorUIResource getPrimary1()
          Describe getPrimary1 method here.
protected  ColorUIResource getPrimary2()
          Describe getPrimary2 method here.
protected  ColorUIResource getPrimary3()
          Describe getPrimary3 method here.
 ColorUIResource getS1()
          Describe getS1 method here.
 ColorUIResource getS2()
          Describe getS2 method here.
 ColorUIResource getS3()
          Describe getS3 method here.
protected  ColorUIResource getSecondary1()
          Describe getSecondary1 method here.
protected  ColorUIResource getSecondary2()
          Describe getSecondary2 method here.
protected  ColorUIResource getSecondary3()
          Describe getSecondary3 method here.
 FontUIResource getSubTextFont()
          Describe getSubTextFont method here.
 ColorUIResource getSystemTextColor()
          Describe getSystemTextColor method here.
 FontUIResource getSystemTextFont()
          Describe getSystemTextFont method here.
 ColorUIResource getT1()
          Describe getT1 method here.
 ColorUIResource getT2()
          Describe getT2 method here.
 ColorUIResource getUserTextColor()
          Describe getUserTextColor method here.
 FontUIResource getUserTextFont()
          Describe getUserTextFont method here.
 ColorUIResource getW()
          Describe getW method here.
protected  ColorUIResource getWhite()
          Describe getWhite method here.
 FontUIResource getWindowTitleFont()
          Describe getWindowTitleFont method here.
 void save()
          Saves the file to resources/themes/ThemeName.theme.
 void save(OutputStream stream)
          Describe save method here.
 void setBlack(Color black)
          Describe setBlack method here.
 void setFont(Font fnt)
          Describe setFont method here.
 void setName(String name)
          Sets this theme's name.
 void setPrimary1(Color x)
          Describe setPrimary1 method here.
 void setPrimary2(Color x)
          Describe setPrimary2 method here.
 void setPrimary3(Color x)
          Describe setPrimary3 method here.
 void setSecondary1(Color x)
          Describe setSecondary1 method here.
 void setSecondary2(Color x)
          Describe setSecondary2 method here.
 void setSecondary3(Color x)
          Describe setSecondary3 method here.
 void setTarget(Component target)
          Sets the component to update when the theme is applied.
 void setText1(Color x)
          Describe setText1 method here.
 void setText2(Color x)
          Describe setText2 method here.
 void setWhite(Color white)
          Describe setWhite method here.
 
Methods inherited from class javax.swing.plaf.metal.MetalTheme
addCustomEntriesToTable, getAcceleratorForeground, getAcceleratorSelectedForeground, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getDesktopColor, getFocusColor, getMenuBackground, getMenuDisabledForeground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getTextHighlightColor, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SteelmeTheme

public SteelmeTheme(Color ip1,
                    Color ip2,
                    Color ip3,
                    Color is1,
                    Color is2,
                    Color is3,
                    Font iif,
                    Color it1,
                    Color it2,
                    Color iw,
                    Color ib)
Creates a new SteelmeTheme instance.

Parameters:
ip1 - a Color value
ip2 - a Color value
ip3 - a Color value
is1 - a Color value
is2 - a Color value
is3 - a Color value
iif - a Font value
it1 - a Color value
it2 - a Color value
iw - a Color value
ib - a Color value

SteelmeTheme

public SteelmeTheme()
Creates a new SteelmeTheme instance which copies the attributes of DefaultMetalTheme.


SteelmeTheme

public SteelmeTheme(MetalTheme orig)
Creates a new SteelmeTheme instance which copies the attributes of the given MetalTheme.

Parameters:
orig - a MetalTheme value

SteelmeTheme

public SteelmeTheme(File themeFile)
Creates a new SteelmeTheme instance with attributes loaded from the specified file.

Parameters:
themeFile - a File value

SteelmeTheme

public SteelmeTheme(InputStream stream)
pass an inputstream pointing to a properties file. Colors will be initialized to be the same as the DefaultMetalTheme, and then any colors provided in the properties file will override that.

Parameters:
stream - an InputStream value
Method Detail

applyTheme

public void applyTheme(Component who)
Applies this theme to the Root component of the given component.

Parameters:
who - a Component value

getName

public String getName()
Returns this theme's name.

Overrides:
getName in class DefaultMetalTheme
Returns:
a String value

setName

public void setName(String name)
Sets this theme's name.

Parameters:
n - a String value

getPrimary1

protected ColorUIResource getPrimary1()
Describe getPrimary1 method here.

Overrides:
getPrimary1 in class DefaultMetalTheme
Returns:
a ColorUIResource value

getPrimary2

protected ColorUIResource getPrimary2()
Describe getPrimary2 method here.

Overrides:
getPrimary2 in class DefaultMetalTheme
Returns:
a ColorUIResource value

getPrimary3

protected ColorUIResource getPrimary3()
Describe getPrimary3 method here.

Overrides:
getPrimary3 in class DefaultMetalTheme
Returns:
a ColorUIResource value

getSecondary1

protected ColorUIResource getSecondary1()
Describe getSecondary1 method here.

Overrides:
getSecondary1 in class DefaultMetalTheme
Returns:
a ColorUIResource value

getSecondary2

protected ColorUIResource getSecondary2()
Describe getSecondary2 method here.

Overrides:
getSecondary2 in class DefaultMetalTheme
Returns:
a ColorUIResource value

getSecondary3

protected ColorUIResource getSecondary3()
Describe getSecondary3 method here.

Overrides:
getSecondary3 in class DefaultMetalTheme
Returns:
a ColorUIResource value

getP1

public ColorUIResource getP1()
Describe getP1 method here.

Returns:
a ColorUIResource value

getP2

public ColorUIResource getP2()
Describe getP2 method here.

Returns:
a ColorUIResource value

getP3

public ColorUIResource getP3()
Describe getP3 method here.

Returns:
a ColorUIResource value

getS1

public ColorUIResource getS1()
Describe getS1 method here.

Returns:
a ColorUIResource value

getS2

public ColorUIResource getS2()
Describe getS2 method here.

Returns:
a ColorUIResource value

getS3

public ColorUIResource getS3()
Describe getS3 method here.

Returns:
a ColorUIResource value

getT1

public ColorUIResource getT1()
Describe getT1 method here.

Returns:
a ColorUIResource value

getT2

public ColorUIResource getT2()
Describe getT2 method here.

Returns:
a ColorUIResource value

getW

public ColorUIResource getW()
Describe getW method here.

Returns:
a ColorUIResource value

getB

public ColorUIResource getB()
Describe getB method here.

Returns:
a ColorUIResource value

getWhite

protected ColorUIResource getWhite()
Describe getWhite method here.

Overrides:
getWhite in class MetalTheme
Returns:
a ColorUIResource value

getBlack

protected ColorUIResource getBlack()
Describe getBlack method here.

Overrides:
getBlack in class MetalTheme
Returns:
a ColorUIResource value

getControlTextFont

public FontUIResource getControlTextFont()
Describe getControlTextFont method here.

Overrides:
getControlTextFont in class DefaultMetalTheme
Returns:
a FontUIResource value

getMenuTextFont

public FontUIResource getMenuTextFont()
Describe getMenuTextFont method here.

Overrides:
getMenuTextFont in class DefaultMetalTheme
Returns:
a FontUIResource value

getSubTextFont

public FontUIResource getSubTextFont()
Describe getSubTextFont method here.

Overrides:
getSubTextFont in class DefaultMetalTheme
Returns:
a FontUIResource value

getSystemTextFont

public FontUIResource getSystemTextFont()
Describe getSystemTextFont method here.

Overrides:
getSystemTextFont in class DefaultMetalTheme
Returns:
a FontUIResource value

getUserTextFont

public FontUIResource getUserTextFont()
Describe getUserTextFont method here.

Overrides:
getUserTextFont in class DefaultMetalTheme
Returns:
a FontUIResource value

getWindowTitleFont

public FontUIResource getWindowTitleFont()
Describe getWindowTitleFont method here.

Overrides:
getWindowTitleFont in class DefaultMetalTheme
Returns:
a FontUIResource value

getSystemTextColor

public ColorUIResource getSystemTextColor()
Describe getSystemTextColor method here.

Overrides:
getSystemTextColor in class MetalTheme
Returns:
a ColorUIResource value

getUserTextColor

public ColorUIResource getUserTextColor()
Describe getUserTextColor method here.

Overrides:
getUserTextColor in class MetalTheme
Returns:
a ColorUIResource value

getControlTextColor

public ColorUIResource getControlTextColor()
Describe getControlTextColor method here.

Overrides:
getControlTextColor in class MetalTheme
Returns:
a ColorUIResource value

getHighlightedTextColor

public ColorUIResource getHighlightedTextColor()
Describe getHighlightedTextColor method here.

Overrides:
getHighlightedTextColor in class MetalTheme
Returns:
a ColorUIResource value

getInactiveControlTextColor

public ColorUIResource getInactiveControlTextColor()
Describe getInactiveControlTextColor method here.

Overrides:
getInactiveControlTextColor in class MetalTheme
Returns:
a ColorUIResource value

getInactiveSystemTextColor

public ColorUIResource getInactiveSystemTextColor()
Describe getInactiveSystemTextColor method here.

Overrides:
getInactiveSystemTextColor in class MetalTheme
Returns:
a ColorUIResource value

setPrimary1

public void setPrimary1(Color x)
Describe setPrimary1 method here.

Parameters:
x - a Color value

setPrimary2

public void setPrimary2(Color x)
Describe setPrimary2 method here.

Parameters:
x - a Color value

setPrimary3

public void setPrimary3(Color x)
Describe setPrimary3 method here.

Parameters:
x - a Color value

setSecondary1

public void setSecondary1(Color x)
Describe setSecondary1 method here.

Parameters:
x - a Color value

setSecondary2

public void setSecondary2(Color x)
Describe setSecondary2 method here.

Parameters:
x - a Color value

setSecondary3

public void setSecondary3(Color x)
Describe setSecondary3 method here.

Parameters:
x - a Color value

setText1

public void setText1(Color x)
Describe setText1 method here.

Parameters:
x - a Color value

setText2

public void setText2(Color x)
Describe setText2 method here.

Parameters:
x - a Color value

setWhite

public void setWhite(Color white)
Describe setWhite method here.

Parameters:
x - a Color value

setBlack

public void setBlack(Color black)
Describe setBlack method here.

Parameters:
x - a Color value

setFont

public void setFont(Font fnt)
Describe setFont method here.

Parameters:
f - a Font value

save

public void save()
Saves the file to resources/themes/ThemeName.theme.


save

public void save(OutputStream stream)
Describe save method here.

Parameters:
t - an OutputStream value

getColorString

protected static String getColorString(Color color)
Convert a color to 3 integers separated by commas with values from 0..255 which represent it's red, green, and blue components.

Parameters:
c - a Color value
Returns:
a String value

setTarget

public void setTarget(Component target)
Sets the component to update when the theme is applied.

Parameters:
cx - a Component value