All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class java.awt.swing.basic.BasicLookAndFeel

java.lang.Object
    |
    +----java.awt.swing.AbstractLookAndFeel
            |
            +----java.awt.swing.basic.BasicLookAndFeel

public class BasicLookAndFeel
extends AbstractLookAndFeel
implements Serializable

Constructor Index

 o BasicLookAndFeel()

Method Index

 o getDefaults()
This method is called once by UIManger.setLookAndFeel to create the look and feel specific defaults table.
 o getDescription()
Return a one line description of this look and feel implementation, e.g.
 o getName()
Return a short string that identifies this look and feel, e.g.
 o initClassDefaults(UIDefaults)
Initialize the uiClassID to BasicComponentUI mapping.
 o initComponentDefaults(UIDefaults)
 o initSystemColorDefaults(UIDefaults)
Load the SystemColors into the defaults table.
 o installBorder(JComponent, String)
Convenience method for installing Basic's default Border object on the specified component if either the border is currently null or already an instance of UIResource.
 o installColors(JComponent, String, String)
Convenience method for initializing a components foreground and background color properties with values from the current defaults table.
 o installColorsAndFont(JComponent, String, String, String)
Convenience method for initializing a components foreground background and font properties with values from the current defaults table.
 o isNativeLookAndFeel()
If the underlying platform has a "native" look and feel, and this is an implementation of it, return true.
 o isSupportedLookAndFeel()
Return true if the underlying platform supports and or permits this look and feel.
 o loadSystemColors(UIDefaults, String[])
If this is the native look and feel the initial values for the system color properties are the same as the SystemColor constants.
 o uninstallBorder(JComponent)
Convenience method for un-installing Basic's default border on the specified component if the border is currently an instance of UIResource.

Constructors

 o BasicLookAndFeel
public BasicLookAndFeel()

Methods

 o getName
public String getName()
Return a short string that identifies this look and feel, e.g.

Overrides:
getName in class AbstractLookAndFeel
 o getDescription
public String getDescription()
Return a one line description of this look and feel implementation, e.g.

Overrides:
getDescription in class AbstractLookAndFeel
 o isNativeLookAndFeel
public boolean isNativeLookAndFeel()
If the underlying platform has a "native" look and feel, and this is an implementation of it, return true.

Overrides:
isNativeLookAndFeel in class AbstractLookAndFeel
 o isSupportedLookAndFeel
public boolean isSupportedLookAndFeel()
Return true if the underlying platform supports and or permits this look and feel.

Overrides:
isSupportedLookAndFeel in class AbstractLookAndFeel
 o installColors
public static void installColors(JComponent c,
                                 String defaultBgName,
                                 String defaultFgName)
Convenience method for initializing a components foreground and background color properties with values from the current defaults table. The properties are only set if the current value is either null or a UIResource.

Parameters:
c - the target component for installing default color/font properties
defaultBgName - the key for the default background
defaultFgName - the key for the default foreground
See Also:
installColorsAndFont, getColor
 o installColorsAndFont
public static void installColorsAndFont(JComponent c,
                                        String defaultBgName,
                                        String defaultFgName,
                                        String defaultFontName)
Convenience method for initializing a components foreground background and font properties with values from the current defaults table. The properties are only set if the current value is either null or a UIResource.

Parameters:
c - the target component for installing default color/font properties
defaultBgName - the key for the default background
defaultFgName - the key for the default foreground
defaultFontName - the key for the default font
See Also:
installColors, getColor, getFont
 o installBorder
public static void installBorder(JComponent c,
                                 String defaultBorderName)
Convenience method for installing Basic's default Border object on the specified component if either the border is currently null or already an instance of UIResource.

Parameters:
c - the target component for installing default border
defaultBorderName - the key specifying the default border
 o uninstallBorder
public static void uninstallBorder(JComponent c)
Convenience method for un-installing Basic's default border on the specified component if the border is currently an instance of UIResource.

Parameters:
c - the target component for uninstalling default border
 o initClassDefaults
protected void initClassDefaults(UIDefaults table)
Initialize the uiClassID to BasicComponentUI mapping. The JComponent classes define their own uiClassID constants (see AbstractComponent.getUIClassID). This table must map those constants to a BasicComponentUI class of the appropriate type.

See Also:
getDefaults
 o loadSystemColors
protected void loadSystemColors(UIDefaults table,
                                String[] systemColors)
If this is the native look and feel the initial values for the system color properties are the same as the SystemColor constants. If not we use the integer color values in the systemColors argument.

 o initSystemColorDefaults
protected void initSystemColorDefaults(UIDefaults table)
Load the SystemColors into the defaults table. The keys for SystemColor defaults are the same as the names of the public fields in SystemColor. If the table is being created on a native Windows platform we use the SystemColor values, otherwise we create color objects whose values match the defaults Windows95 colors.

 o initComponentDefaults
protected void initComponentDefaults(UIDefaults table)
 o getDefaults
public UIDefaults getDefaults()
This method is called once by UIManger.setLookAndFeel to create the look and feel specific defaults table.

Overrides:
getDefaults in class AbstractLookAndFeel

All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Submit a bug or feature