Java Doc for PlasticLookAndFeel.java in  » Swing-Library » jgoodies-looks » com » jgoodies » looks » plastic » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » jgoodies looks » com.jgoodies.looks.plastic 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.swing.plaf.metal.MetalLookAndFeel
   com.jgoodies.looks.plastic.PlasticLookAndFeel

All known Subclasses:   com.jgoodies.looks.plastic.Plastic3DLookAndFeel,
PlasticLookAndFeel
public class PlasticLookAndFeel extends MetalLookAndFeel (Code)
The base class for the JGoodies Plastic look&feel family. Initializes class and component defaults for the Plastic L&f and provides keys and optional features for the Plastic family.
author:
   Karsten Lentzsch
version:
   $Revision: 1.36 $


Field Summary
final public static  StringBORDER_STYLE_KEY
     Client property key to set a border style - shadows the header style.
final public static  StringDEFAULT_THEME_KEY
     A System property key to set the default theme.
final public static  StringHIGH_CONTRAST_FOCUS_ENABLED_KEY
     A System property key that indicates that the high contrast focus colors shall be choosen - if applicable.
final public static  StringIS_3D_KEY
     Client property key to disable the pseudo 3D effect.
final public static  StringTAB_STYLE_DEFAULT_VALUE
     A System property value that indicates that Plastic shall render tabs in the Plastic 1.0 style.
final protected static  StringTAB_STYLE_KEY
     A System property key for the rendering style of the Plastic TabbedPane.
final public static  StringTAB_STYLE_METAL_VALUE
     A System property value that indicates that Plastic shall render tabs in the Metal L&F style.

Constructor Summary
public  PlasticLookAndFeel()
     Constructs the PlasticLookAndFeel, creates the default theme and sets it as current Plastic theme.

Method Summary
public static  PlasticThemecreateMyDefaultTheme()
     Creates and returns the default color theme.
protected static  PlasticThemecreateTheme(String themeName)
     Creates and returns a color theme from the specified theme name.
public static  ColorUIResourcegetControl()
    
public static  ColorUIResourcegetControlDarkShadow()
    
public static  ColorUIResourcegetControlHighlight()
    
public  StringgetDescription()
    
public  IcongetDisabledIcon(JComponent component, Icon icon)
     Returns an icon with a disabled appearance.
public static  ColorUIResourcegetFocusColor()
    
public static  FontPolicygetFontPolicy()
     Looks up and retrieves the FontPolicy used by the JGoodies Plastic Look&Feel family. If a FontPolicy has been set, it'll be returned. Otherwise, this method checks if a FontPolicy or FontSet is defined in the system properties or UIDefaults.
public static  booleangetHighContrastFocusColorsEnabled()
    
public  StringgetID()
    
public static  ListgetInstalledThemes()
     Lazily initializes and returns the List of installed color themes.
public static  BorderUIResourcegetInternalFrameBorder()
    
public static  ColorUIResourcegetMenuItemBackground()
    
public static  ColorUIResourcegetMenuItemSelectedBackground()
    
public static  ColorUIResourcegetMenuItemSelectedForeground()
    
public static  MicroLayoutPolicygetMicroLayoutPolicy()
     Looks up and retrieves the MicroLayoutPolicy used by the JGoodies Plastic Look&Fs.
public  StringgetName()
    
public static  BorderUIResourcegetPaletteBorder()
    
public static  PlasticThemegetPlasticTheme()
     Lazily initializes and returns the PlasticTheme. In Java 5 or later, this method looks up the theme using MetalLookAndFeel#getCurrentTheme.
public static  ColorUIResourcegetPrimaryControl()
    
public static  ColorUIResourcegetPrimaryControlDarkShadow()
    
public static  ColorUIResourcegetPrimaryControlHighlight()
    
public static  ColorUIResourcegetPrimaryControlInfo()
    
public static  ColorUIResourcegetPrimaryControlShadow()
    
public static  ColorUIResourcegetSimpleInternalFrameBackground()
    
public static  ColorUIResourcegetSimpleInternalFrameForeground()
    
public static  StringgetTabStyle()
    
public static  ColorUIResourcegetTitleTextColor()
    
public static  FontUIResourcegetTitleTextFont()
    
public static  ColorUIResourcegetWindowTitleBackground()
    
public static  ColorUIResourcegetWindowTitleForeground()
    
public static  ColorUIResourcegetWindowTitleInactiveBackground()
    
public static  ColorUIResourcegetWindowTitleInactiveForeground()
    
protected  voidinitClassDefaults(UIDefaults table)
     Initializes the class defaults, that is, overrides some UI delegates with JGoodies Plastic implementations.
protected  voidinitComponentDefaults(UIDefaults table)
    
protected  voidinitSystemColorDefaults(UIDefaults table)
     Unlike my superclass I register a unified shadow color.
public  voidinitialize()
     Invoked during UIManager#setLookAndFeel.
protected static  voidinstallDefaultThemes()
     Install the default color themes.
public static  voidinstallTheme(PlasticTheme theme)
     Installs a color theme.
protected  booleanis3DEnabled()
    
public static  booleanisSelectTextOnKeyboardFocusGained()
    
public static  voidset3DEnabled(boolean b)
    
public static  voidsetFontPolicy(FontPolicy fontPolicy)
     Sets the FontPolicy to be used with the JGoodies Plastic L&F family.
public static  voidsetHighContrastFocusColorsEnabled(boolean b)
    
public static  voidsetMicroLayoutPolicy(MicroLayout microLayoutPolicy)
     Sets the MicroLayoutPolicy to be used with the JGoodies Plastic L&Fs.
public static  voidsetPlasticTheme(PlasticTheme theme)
     Sets the theme for colors and fonts used by the Plastic L&F.

After setting the theme, you need to re-install the Look&Feel, as well as update the UI's of any previously created components - just as if you'd change the Look&Feel.

public static  voidsetSelectTextOnKeyboardFocusGained(boolean b)
     Sets whether text field text shall be selected when it gains focus via the keyboard.
public static  voidsetTabStyle(String tabStyle)
    
public  voiduninitialize()
     Invoked during UIManager#setLookAndFeel.

Field Detail
BORDER_STYLE_KEY
final public static String BORDER_STYLE_KEY(Code)
Client property key to set a border style - shadows the header style.



DEFAULT_THEME_KEY
final public static String DEFAULT_THEME_KEY(Code)
A System property key to set the default theme.



HIGH_CONTRAST_FOCUS_ENABLED_KEY
final public static String HIGH_CONTRAST_FOCUS_ENABLED_KEY(Code)
A System property key that indicates that the high contrast focus colors shall be choosen - if applicable. If not set, some focus colors look good but have low contrast. Basically, the low contrast scheme uses the Plastic colors before 1.0.7, and the high contrast scheme is 1.0.7 - 1.0.9.



IS_3D_KEY
final public static String IS_3D_KEY(Code)
Client property key to disable the pseudo 3D effect.



TAB_STYLE_DEFAULT_VALUE
final public static String TAB_STYLE_DEFAULT_VALUE(Code)
A System property value that indicates that Plastic shall render tabs in the Plastic 1.0 style. This is the default.



TAB_STYLE_KEY
final protected static String TAB_STYLE_KEY(Code)
A System property key for the rendering style of the Plastic TabbedPane. Valid values are: default for the Plastic 1.0 tabs, and metal for the Metal L&F tabs.



TAB_STYLE_METAL_VALUE
final public static String TAB_STYLE_METAL_VALUE(Code)
A System property value that indicates that Plastic shall render tabs in the Metal L&F style.




Constructor Detail
PlasticLookAndFeel
public PlasticLookAndFeel()(Code)
Constructs the PlasticLookAndFeel, creates the default theme and sets it as current Plastic theme.




Method Detail
createMyDefaultTheme
public static PlasticTheme createMyDefaultTheme()(Code)
Creates and returns the default color theme. Honors the current platform and platform flavor - if available. the default color theme for the current environemt



createTheme
protected static PlasticTheme createTheme(String themeName)(Code)
Creates and returns a color theme from the specified theme name.
Parameters:
  themeName - the unqualified name of the theme to create the associated color theme or null in case ofa problem



getControl
public static ColorUIResource getControl()(Code)



getControlDarkShadow
public static ColorUIResource getControlDarkShadow()(Code)



getControlHighlight
public static ColorUIResource getControlHighlight()(Code)



getDescription
public String getDescription()(Code)



getDisabledIcon
public Icon getDisabledIcon(JComponent component, Icon icon)(Code)
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.
Parameters:
  component - the component that will display the icon, may be null.
Parameters:
  icon - the icon to generate disabled icon from. disabled icon, or null if a suitable icon can not be generated.




getFocusColor
public static ColorUIResource getFocusColor()(Code)



getFontPolicy
public static FontPolicy getFontPolicy()(Code)
Looks up and retrieves the FontPolicy used by the JGoodies Plastic Look&Feel family. If a FontPolicy has been set, 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 Plastic font policy will be returned. the FontPolicy set for this Look&feel - if any,the FontPolicy specified in the system properties or UIDefaults- if any, or the default Plastic font policy.
See Also:   PlasticLookAndFeel.setFontPolicy
See Also:   Options.PLASTIC_FONT_POLICY_KEY
See Also:   FontPolicies
See Also:   FontPolicies.customSettingsPolicy(FontPolicy)
See Also:   FontPolicies.getDefaultPlasticPolicy



getHighContrastFocusColorsEnabled
public static boolean getHighContrastFocusColorsEnabled()(Code)



getID
public String getID()(Code)



getInstalledThemes
public static List getInstalledThemes()(Code)
Lazily initializes and returns the List of installed color themes. a list of installed color/font themes



getInternalFrameBorder
public static BorderUIResource getInternalFrameBorder()(Code)



getMenuItemBackground
public static ColorUIResource getMenuItemBackground()(Code)



getMenuItemSelectedBackground
public static ColorUIResource getMenuItemSelectedBackground()(Code)



getMenuItemSelectedForeground
public static ColorUIResource getMenuItemSelectedForeground()(Code)



getMicroLayoutPolicy
public static MicroLayoutPolicy getMicroLayoutPolicy()(Code)
Looks up and retrieves the MicroLayoutPolicy used by the JGoodies Plastic Look&Fs. If a MicroLayoutPolicy has been set for this look, it'll be returned. Otherwise, the default Plastic micro layout policy will be returned. the MicroLayoutPolicy set for this Look&feel - if any,or the default Plastic MicroLayoutPolicy.
See Also:   PlasticLookAndFeel.setMicroLayoutPolicy
See Also:   Options.PLASTIC_MICRO_LAYOUT_POLICY_KEY
See Also:   MicroLayoutPolicies



getName
public String getName()(Code)



getPaletteBorder
public static BorderUIResource getPaletteBorder()(Code)



getPlasticTheme
public static PlasticTheme getPlasticTheme()(Code)
Lazily initializes and returns the PlasticTheme. In Java 5 or later, this method looks up the theme using MetalLookAndFeel#getCurrentTheme. In Java 1.4 it is requested from the UIManager. Both access methods use an AppContext to store the theme, so that applets in different contexts don't share the theme. the current PlasticTheme



getPrimaryControl
public static ColorUIResource getPrimaryControl()(Code)



getPrimaryControlDarkShadow
public static ColorUIResource getPrimaryControlDarkShadow()(Code)



getPrimaryControlHighlight
public static ColorUIResource getPrimaryControlHighlight()(Code)



getPrimaryControlInfo
public static ColorUIResource getPrimaryControlInfo()(Code)



getPrimaryControlShadow
public static ColorUIResource getPrimaryControlShadow()(Code)



getSimpleInternalFrameBackground
public static ColorUIResource getSimpleInternalFrameBackground()(Code)



getSimpleInternalFrameForeground
public static ColorUIResource getSimpleInternalFrameForeground()(Code)



getTabStyle
public static String getTabStyle()(Code)



getTitleTextColor
public static ColorUIResource getTitleTextColor()(Code)



getTitleTextFont
public static FontUIResource getTitleTextFont()(Code)



getWindowTitleBackground
public static ColorUIResource getWindowTitleBackground()(Code)



getWindowTitleForeground
public static ColorUIResource getWindowTitleForeground()(Code)



getWindowTitleInactiveBackground
public static ColorUIResource getWindowTitleInactiveBackground()(Code)



getWindowTitleInactiveForeground
public static ColorUIResource getWindowTitleInactiveForeground()(Code)



initClassDefaults
protected void initClassDefaults(UIDefaults table)(Code)
Initializes the class defaults, that is, overrides some UI delegates with JGoodies Plastic implementations.
Parameters:
  table - the UIDefaults table to work with
See Also:   javax.swing.plaf.basic.BasicLookAndFeel.getDefaults



initComponentDefaults
protected void initComponentDefaults(UIDefaults table)(Code)



initSystemColorDefaults
protected void initSystemColorDefaults(UIDefaults table)(Code)
Unlike my superclass I register a unified shadow color. This color is used by my ThinBevelBorder class.
Parameters:
  table - the UIDefaults table to work with



initialize
public void initialize()(Code)
Invoked during UIManager#setLookAndFeel. In addition to the superclass behavior, we install the ShadowPopupFactory.
See Also:   PlasticLookAndFeel.uninitialize



installDefaultThemes
protected static void installDefaultThemes()(Code)
Install the default color themes.



installTheme
public static void installTheme(PlasticTheme theme)(Code)
Installs a color theme.
Parameters:
  theme - the theme to install



is3DEnabled
protected boolean is3DEnabled()(Code)



isSelectTextOnKeyboardFocusGained
public static boolean isSelectTextOnKeyboardFocusGained()(Code)



set3DEnabled
public static void set3DEnabled(boolean b)(Code)



setFontPolicy
public static void setFontPolicy(FontPolicy fontPolicy)(Code)
Sets the FontPolicy to be used with the JGoodies Plastic L&F family. If the specified policy is null, the default will be reset.
Parameters:
  fontPolicy - the FontPolicy to be used with the JGoodies Plastic L&F family, or null to resetto the default
See Also:   PlasticLookAndFeel.getFontPolicy()
See Also:   Options.PLASTIC_FONT_POLICY_KEY



setHighContrastFocusColorsEnabled
public static void setHighContrastFocusColorsEnabled(boolean b)(Code)



setMicroLayoutPolicy
public static void setMicroLayoutPolicy(MicroLayout microLayoutPolicy)(Code)
Sets the MicroLayoutPolicy to be used with the JGoodies Plastic L&Fs. If the specified policy is null, the default will be reset.
Parameters:
  microLayoutPolicy - the MicroLayoutPolicy to be used with the JGoodies Plastic L&Fs, or null to reset to the default
See Also:   PlasticLookAndFeel.getMicroLayoutPolicy()
See Also:   Options.PLASTIC_MICRO_LAYOUT_POLICY_KEY



setPlasticTheme
public static void setPlasticTheme(PlasticTheme theme)(Code)
Sets the theme for colors and fonts used by the Plastic L&F.

After setting the theme, you need to re-install the Look&Feel, as well as update the UI's of any previously created components - just as if you'd change the Look&Feel.
Parameters:
  theme - the PlasticTheme to be set
throws:
  NullPointerException - if the theme is null.
See Also:   PlasticLookAndFeel.getPlasticTheme()




setSelectTextOnKeyboardFocusGained
public static void setSelectTextOnKeyboardFocusGained(boolean b)(Code)
Sets whether text field text shall be selected when it gains focus via the keyboard. This is enabled on Windows by default and disabled on all other platforms.
Parameters:
  b -



setTabStyle
public static void setTabStyle(String tabStyle)(Code)



uninitialize
public void uninitialize()(Code)
Invoked during UIManager#setLookAndFeel. In addition to the superclass behavior, we uninstall the ShadowPopupFactory.
See Also:   PlasticLookAndFeel.initialize



Methods inherited from javax.swing.plaf.metal.MetalLookAndFeel
protected void createDefaultTheme()(Code)(Java Doc)
public static ColorUIResource getAcceleratorForeground()(Code)(Java Doc)
public static ColorUIResource getAcceleratorSelectedForeground()(Code)(Java Doc)
public static ColorUIResource getBlack()(Code)(Java Doc)
public static ColorUIResource getControl()(Code)(Java Doc)
public static ColorUIResource getControlDarkShadow()(Code)(Java Doc)
public static ColorUIResource getControlDisabled()(Code)(Java Doc)
public static ColorUIResource getControlHighlight()(Code)(Java Doc)
public static ColorUIResource getControlInfo()(Code)(Java Doc)
public static ColorUIResource getControlShadow()(Code)(Java Doc)
public static ColorUIResource getControlTextColor()(Code)(Java Doc)
public static FontUIResource getControlTextFont()(Code)(Java Doc)
public static MetalTheme getCurrentTheme()(Code)(Java Doc)
public UIDefaults getDefaults()(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public static ColorUIResource getDesktopColor()(Code)(Java Doc)
public Icon getDisabledIcon(JComponent component, Icon icon)(Code)(Java Doc)
public Icon getDisabledSelectedIcon(JComponent component, Icon icon)(Code)(Java Doc)
public static ColorUIResource getFocusColor()(Code)(Java Doc)
public static ColorUIResource getHighlightedTextColor()(Code)(Java Doc)
public String getID()(Code)(Java Doc)
public static ColorUIResource getInactiveControlTextColor()(Code)(Java Doc)
public static ColorUIResource getInactiveSystemTextColor()(Code)(Java Doc)
public LayoutStyle getLayoutStyle()(Code)(Java Doc)
public static ColorUIResource getMenuBackground()(Code)(Java Doc)
public static ColorUIResource getMenuDisabledForeground()(Code)(Java Doc)
public static ColorUIResource getMenuForeground()(Code)(Java Doc)
public static ColorUIResource getMenuSelectedBackground()(Code)(Java Doc)
public static ColorUIResource getMenuSelectedForeground()(Code)(Java Doc)
public static FontUIResource getMenuTextFont()(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public static ColorUIResource getPrimaryControl()(Code)(Java Doc)
public static ColorUIResource getPrimaryControlDarkShadow()(Code)(Java Doc)
public static ColorUIResource getPrimaryControlHighlight()(Code)(Java Doc)
public static ColorUIResource getPrimaryControlInfo()(Code)(Java Doc)
public static ColorUIResource getPrimaryControlShadow()(Code)(Java Doc)
public static ColorUIResource getSeparatorBackground()(Code)(Java Doc)
public static ColorUIResource getSeparatorForeground()(Code)(Java Doc)
public static FontUIResource getSubTextFont()(Code)(Java Doc)
public boolean getSupportsWindowDecorations()(Code)(Java Doc)
public static ColorUIResource getSystemTextColor()(Code)(Java Doc)
public static FontUIResource getSystemTextFont()(Code)(Java Doc)
public static ColorUIResource getTextHighlightColor()(Code)(Java Doc)
public static ColorUIResource getUserTextColor()(Code)(Java Doc)
public static FontUIResource getUserTextFont()(Code)(Java Doc)
public static ColorUIResource getWhite()(Code)(Java Doc)
public static ColorUIResource getWindowBackground()(Code)(Java Doc)
public static ColorUIResource getWindowTitleBackground()(Code)(Java Doc)
public static FontUIResource getWindowTitleFont()(Code)(Java Doc)
public static ColorUIResource getWindowTitleForeground()(Code)(Java Doc)
public static ColorUIResource getWindowTitleInactiveBackground()(Code)(Java Doc)
public static ColorUIResource getWindowTitleInactiveForeground()(Code)(Java Doc)
protected void initClassDefaults(UIDefaults table)(Code)(Java Doc)
protected void initComponentDefaults(UIDefaults table)(Code)(Java Doc)
protected void initSystemColorDefaults(UIDefaults table)(Code)(Java Doc)
public boolean isNativeLookAndFeel()(Code)(Java Doc)
public boolean isSupportedLookAndFeel()(Code)(Java Doc)
public void provideErrorFeedback(Component component)(Code)(Java Doc)
public static void setCurrentTheme(MetalTheme theme)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.