FileDocCategorySizeDatePackage
MetalTheme.javaAPI DocJava SE 5 API5165Fri Aug 26 14:58:08 BST 2005javax.swing.plaf.metal

MetalTheme

public abstract class MetalTheme extends Object
This abstract class acts as a generic way to describe the colors used by Metal. Subclasses of MetalTheme can be used to swap the colors in a Metal application.
version
1.27 12/19/03
author
Steve Wilson

Fields Summary
static final int
CONTROL_TEXT_FONT
static final int
SYSTEM_TEXT_FONT
static final int
USER_TEXT_FONT
static final int
MENU_TEXT_FONT
static final int
WINDOW_TITLE_FONT
static final int
SUB_TEXT_FONT
static ColorUIResource
white
private static ColorUIResource
black
Constructors Summary
Methods Summary
public voidaddCustomEntriesToTable(javax.swing.UIDefaults table)

public javax.swing.plaf.ColorUIResourcegetAcceleratorForeground()

 return getPrimary1(); 
public javax.swing.plaf.ColorUIResourcegetAcceleratorSelectedForeground()

 return getBlack(); 
protected javax.swing.plaf.ColorUIResourcegetBlack()

 return black; 
public javax.swing.plaf.ColorUIResourcegetControl()

 return getSecondary3(); 
public javax.swing.plaf.ColorUIResourcegetControlDarkShadow()

 return getSecondary1(); 
public javax.swing.plaf.ColorUIResourcegetControlDisabled()

 return getSecondary2(); 
public javax.swing.plaf.ColorUIResourcegetControlHighlight()

 return getWhite(); 
public javax.swing.plaf.ColorUIResourcegetControlInfo()

 return getBlack(); 
public javax.swing.plaf.ColorUIResourcegetControlShadow()

 return getSecondary2(); 
public javax.swing.plaf.ColorUIResourcegetControlTextColor()

 return getControlInfo(); 
public abstract javax.swing.plaf.FontUIResourcegetControlTextFont()

public javax.swing.plaf.ColorUIResourcegetDesktopColor()

 return getPrimary2(); 
public javax.swing.plaf.ColorUIResourcegetFocusColor()

 return getPrimary2(); 
public javax.swing.plaf.ColorUIResourcegetHighlightedTextColor()

 return getControlTextColor(); 
public javax.swing.plaf.ColorUIResourcegetInactiveControlTextColor()

 return getControlDisabled(); 
public javax.swing.plaf.ColorUIResourcegetInactiveSystemTextColor()

 return getSecondary2(); 
public javax.swing.plaf.ColorUIResourcegetMenuBackground()

 return getSecondary3(); 
public javax.swing.plaf.ColorUIResourcegetMenuDisabledForeground()

 return getSecondary2(); 
public javax.swing.plaf.ColorUIResourcegetMenuForeground()

 return  getBlack(); 
public javax.swing.plaf.ColorUIResourcegetMenuSelectedBackground()

 return getPrimary2(); 
public javax.swing.plaf.ColorUIResourcegetMenuSelectedForeground()

 return getBlack(); 
public abstract javax.swing.plaf.FontUIResourcegetMenuTextFont()

public abstract java.lang.StringgetName()

protected abstract javax.swing.plaf.ColorUIResourcegetPrimary1()

protected abstract javax.swing.plaf.ColorUIResourcegetPrimary2()

protected abstract javax.swing.plaf.ColorUIResourcegetPrimary3()

public javax.swing.plaf.ColorUIResourcegetPrimaryControl()

 return getPrimary3(); 
public javax.swing.plaf.ColorUIResourcegetPrimaryControlDarkShadow()

 return getPrimary1(); 
public javax.swing.plaf.ColorUIResourcegetPrimaryControlHighlight()

 return getWhite(); 
public javax.swing.plaf.ColorUIResourcegetPrimaryControlInfo()

 return getBlack(); 
public javax.swing.plaf.ColorUIResourcegetPrimaryControlShadow()

 return getPrimary2(); 
protected abstract javax.swing.plaf.ColorUIResourcegetSecondary1()

protected abstract javax.swing.plaf.ColorUIResourcegetSecondary2()

protected abstract javax.swing.plaf.ColorUIResourcegetSecondary3()

public javax.swing.plaf.ColorUIResourcegetSeparatorBackground()

 return getWhite(); 
public javax.swing.plaf.ColorUIResourcegetSeparatorForeground()

 return getPrimary1(); 
public abstract javax.swing.plaf.FontUIResourcegetSubTextFont()

public javax.swing.plaf.ColorUIResourcegetSystemTextColor()
Returns the color used, by default, for the text in labels and titled borders.

 return getBlack(); 
public abstract javax.swing.plaf.FontUIResourcegetSystemTextFont()

public javax.swing.plaf.ColorUIResourcegetTextHighlightColor()

 return getPrimary3(); 
public javax.swing.plaf.ColorUIResourcegetUserTextColor()

 return getBlack(); 
public abstract javax.swing.plaf.FontUIResourcegetUserTextFont()

protected javax.swing.plaf.ColorUIResourcegetWhite()


       

         // these are blue in Metal Default Theme
       
       

         // these are gray in Metal Default Theme
       
       

       
       
       
       
       
       

        return white; 
public javax.swing.plaf.ColorUIResourcegetWindowBackground()

 return getWhite(); 
public javax.swing.plaf.ColorUIResourcegetWindowTitleBackground()

 return getPrimary3(); 
public abstract javax.swing.plaf.FontUIResourcegetWindowTitleFont()

public javax.swing.plaf.ColorUIResourcegetWindowTitleForeground()

 return getBlack(); 
public javax.swing.plaf.ColorUIResourcegetWindowTitleInactiveBackground()

 return getSecondary3(); 
public javax.swing.plaf.ColorUIResourcegetWindowTitleInactiveForeground()

 return getBlack(); 
voidinstall()
This is invoked when a MetalLookAndFeel is installed and about to start using this theme. When we can add API this should be nuked in favor of DefaultMetalTheme overriding addCustomEntriesToTable.

    
booleanisSystemTheme()
Returns true if this is a theme provided by the core platform.

        return false;