com.jgoodies.looks.windows
Class WindowsLookAndFeel

java.lang.Object
  extended by javax.swing.LookAndFeel
      extended by javax.swing.plaf.basic.BasicLookAndFeel
          extended by com.sun.java.swing.plaf.windows.WindowsLookAndFeel
              extended by com.jgoodies.looks.windows.WindowsLookAndFeel
All Implemented Interfaces:
Serializable

public final class WindowsLookAndFeel
extends com.sun.java.swing.plaf.windows.WindowsLookAndFeel

The main class of the JGoodies Windows Look&Feel. This look provides several corrections and extensions to Sun's Windows L&F. In addition it tries to provide a unified look for the J2SE 1.4.0x, 1.4.1x, 1.4.2, and 1.5 environments.

Version:
$Revision: 1.36 $
Author:
Karsten Lentzsch
See Also:
Serialized Form

Field Summary
static String BORDER_STYLE_KEY
          An optional client property key for JMenu and JToolBar to set a border style - shadows the header style.
 
Constructor Summary
WindowsLookAndFeel()
           
 
Method Summary
static Border getButtonBorder()
           
static Icon getCheckBoxIcon()
           
 String getDescription()
           
 Icon getDisabledIcon(JComponent component, Icon icon)
          Returns an icon with a disabled appearance.
static FontPolicy getFontPolicy()
          Looks up and retrieves the FontPolicy used by the JGoodies Windows Look&Feel.
 String getID()
           
static MicroLayoutPolicy getMicroLayoutPolicy()
          Looks up and retrieves the MicroLayoutPolicy used by the JGoodies Windows Look&Feel.
 String getName()
           
static Icon getRadioButtonIcon()
           
protected  void initClassDefaults(UIDefaults table)
          Initializes the class defaults, that is, overrides some UI delegates with JGoodies Windows implementations.
protected  void initComponentDefaults(UIDefaults table)
          Initializes the component defaults.
 void initialize()
          Invoked during UIManager#setLookAndFeel.
static void setFontPolicy(FontPolicy fontPolicy)
          Sets the FontPolicy to be used with the JGoodies Windows L&F.
static void setMicroLayoutPolicy(MicroLayout microLayoutPolicy)
          Sets the MicroLayoutPolicy to be used with the JGoodies Windows L&F.
 void uninitialize()
          Invoked during UIManager#setLookAndFeel.
 
Methods inherited from class com.sun.java.swing.plaf.windows.WindowsLookAndFeel
createAudioAction, getLayoutStyle, initSystemColorDefaults, isClassicWindows, isMnemonicHidden, isNativeLookAndFeel, isSupportedLookAndFeel, provideErrorFeedback, setMnemonicHidden
 
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
getAudioActionMap, getDefaults, loadSystemColors, playSound
 
Methods inherited from class javax.swing.LookAndFeel
getDesktopPropertyValue, getDisabledSelectedIcon, getSupportsWindowDecorations, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, toString, uninstallBorder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BORDER_STYLE_KEY

public static final String BORDER_STYLE_KEY
An optional client property key for JMenu and JToolBar to set a border style - shadows the header style.

See Also:
Constant Field Values
Constructor Detail

WindowsLookAndFeel

public WindowsLookAndFeel()
Method Detail

getID

public String getID()
Overrides:
getID in class com.sun.java.swing.plaf.windows.WindowsLookAndFeel

getName

public String getName()
Overrides:
getName in class com.sun.java.swing.plaf.windows.WindowsLookAndFeel

getDescription

public String getDescription()
Overrides:
getDescription in class com.sun.java.swing.plaf.windows.WindowsLookAndFeel

getFontPolicy

public static FontPolicy getFontPolicy()
Looks up and retrieves the FontPolicy used by the JGoodies Windows Look&Feel. If a FontPolicy has been set for this look, it'll be returned. Otherwise, this method checks if a FontPolicy or FontSet is defined in the system properties or UIDefaults. If so, it is returned. If no FontPolicy has been set for this look, in the system properties or UIDefaults, the default Windows font policy will be returned.

Returns:
the FontPolicy set for this Look&feel - if any, the FontPolicy specified in the system properties or UIDefaults - if any, or the default Windows font policy.
See Also:
setFontPolicy(com.jgoodies.looks.FontPolicy), Options.WINDOWS_FONT_POLICY_KEY, FontPolicies, FontPolicies.customSettingsPolicy(FontPolicy), FontPolicies.getDefaultWindowsPolicy()

setFontPolicy

public static void setFontPolicy(FontPolicy fontPolicy)
Sets the FontPolicy to be used with the JGoodies Windows L&F. If the specified policy is null, the default will be reset.

Parameters:
fontPolicy - the FontPolicy to be used with the JGoodies Windows L&F, or null to reset to the default
See Also:
getFontPolicy(), Options.WINDOWS_FONT_POLICY_KEY

getMicroLayoutPolicy

public static MicroLayoutPolicy getMicroLayoutPolicy()
Looks up and retrieves the MicroLayoutPolicy used by the JGoodies Windows Look&Feel. If a MicroLayoutPolicy has been set for this look, it'll be returned. Otherwise, the default Windows micro layout policy will be returned.

Returns:
the MicroLayoutPolicy set for this Look&feel - if any, or the default Windows MicroLayoutPolicy.
See Also:
setMicroLayoutPolicy(com.jgoodies.looks.MicroLayout), Options.WINDOWS_MICRO_LAYOUT_POLICY_KEY, MicroLayoutPolicies, MicroLayoutPolicies.getDefaultWindowsPolicy()

setMicroLayoutPolicy

public static void setMicroLayoutPolicy(MicroLayout microLayoutPolicy)
Sets the MicroLayoutPolicy to be used with the JGoodies Windows L&F. If the specified policy is null, the default will be reset.

Parameters:
microLayoutPolicy - the MicroLayoutPolicy to be used with the JGoodies Windows L&F, or null to reset to the default
See Also:
getMicroLayoutPolicy(), Options.WINDOWS_MICRO_LAYOUT_POLICY_KEY

initialize

public void initialize()
Invoked during UIManager#setLookAndFeel. In addition to the superclass behavior, we install the ShadowPopupFactory.

Overrides:
initialize in class com.sun.java.swing.plaf.windows.WindowsLookAndFeel
See Also:
uninitialize()

uninitialize

public void uninitialize()
Invoked during UIManager#setLookAndFeel. In addition to the superclass behavior, we uninstall the ShadowPopupFactory.

Overrides:
uninitialize in class com.sun.java.swing.plaf.windows.WindowsLookAndFeel
See Also:
initialize()

getDisabledIcon

public Icon getDisabledIcon(JComponent component,
                            Icon icon)
Returns an icon with a disabled appearance. This method is used to generate a disabled icon when one has not been specified.

This method will be used only on JDK 5.0 and later.

Overrides:
getDisabledIcon in class com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Parameters:
component - the component that will display the icon, may be null.
icon - the icon to generate disabled icon from.
Returns:
disabled icon, or null if a suitable icon can not be generated.

initClassDefaults

protected void initClassDefaults(UIDefaults table)
Initializes the class defaults, that is, overrides some UI delegates with JGoodies Windows implementations.

Overrides:
initClassDefaults in class com.sun.java.swing.plaf.windows.WindowsLookAndFeel

initComponentDefaults

protected void initComponentDefaults(UIDefaults table)
Initializes the component defaults.

Overrides:
initComponentDefaults in class com.sun.java.swing.plaf.windows.WindowsLookAndFeel

getButtonBorder

public static Border getButtonBorder()

getCheckBoxIcon

public static Icon getCheckBoxIcon()

getRadioButtonIcon

public static Icon getRadioButtonIcon()


Copyright © 2001-2007 JGoodies Karsten Lentzsch. All Rights Reserved.