org.springframework.richclient.application.config
Class JGoodiesLooksConfigurer

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.application.config.JGoodiesLooksConfigurer
All Implemented Interfaces:
InitializingBean

public class JGoodiesLooksConfigurer
extends Object
implements InitializingBean

JGoodies looks configurer bean. Allows to set various options available in the JGoodies looks library. Use this as follows:

 <bean id="lookAndFeelConfigurer"
 class="org.springframework.richclient.application.config.JGoodiesLooksConfigurer">
  <property name="popupDropShadowEnabled" value="false" />
  <property name="theme">
      <bean class="com.jgoodies.looks.plastic.theme.ExperienceBlue" />
  </property>
  </bean>
 

Additionally the LaF FQN can be set using setLaFName(String). Use the static name constants defined in JGoodies Options to set this property. Default LaF if not specified is the Options#PLASTICXP_NAME. It is possible to define other LaF's as well, but any other property set in this bean will not be in effect if used in that way. If you do need to set another LaF without additional configuration use UIManagerConfigurer and/or create a specific configurer bean for the LaF of your choice.


Constructor Summary
JGoodiesLooksConfigurer()
          Default constructor.
JGoodiesLooksConfigurer(UIManagerConfigurer configurer)
          Constructor allowing to pass your own UIManagerConfigurer.
 
Method Summary
 void afterPropertiesSet()
           
 void set3DEnabled(boolean threeDEnabled)
           
 void setDefaultIconSize(Dimension size)
           
 void setFontSizeHints(com.jgoodies.looks.FontPolicy fontPolicy)
           
 void setHighContrastFocusColorsEnabled(boolean highContrastEnabled)
           
 void setLaFName(String laFName)
           Set the FQN of the LaF to use.
 void setPopupDropShadowEnabled(boolean enabled)
           
 void setTabIconsEnabled(boolean enabled)
           
 void setTabStyle(String tabStyle)
           
 void setTheme(com.jgoodies.looks.plastic.PlasticTheme theme)
           
 void setUseNarrowButtons(boolean enabled)
           
 void setUseSystemFonts(boolean enabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JGoodiesLooksConfigurer

public JGoodiesLooksConfigurer()
Default constructor.


JGoodiesLooksConfigurer

public JGoodiesLooksConfigurer(UIManagerConfigurer configurer)
Constructor allowing to pass your own UIManagerConfigurer.

Parameters:
configurer - the UIManagerConfigurer to use when setting the LaF.
Method Detail

setDefaultIconSize

public void setDefaultIconSize(Dimension size)
Parameters:
size - default Dimension for the icons.
See Also:
Options.setDefaultIconSize(java.awt.Dimension)

setTheme

public void setTheme(com.jgoodies.looks.plastic.PlasticTheme theme)
Parameters:
theme - PlasticTheme to use.
See Also:
PlasticLookAndFeel.setPlasticTheme(com.jgoodies.looks.plastic.PlasticTheme)

setPopupDropShadowEnabled

public void setPopupDropShadowEnabled(boolean enabled)
Parameters:
enabled - set to true if drop shadows should be used.
See Also:
Options.setPopupDropShadowEnabled(boolean)

setTabIconsEnabled

public void setTabIconsEnabled(boolean enabled)
Parameters:
enabled - set to true if tab icons should be enabled.
See Also:
Options.setTabIconsEnabled(boolean)

setUseNarrowButtons

public void setUseNarrowButtons(boolean enabled)
Parameters:
enabled - set to true if narrow buttons should be used.
See Also:
Options.setUseNarrowButtons(boolean)

setUseSystemFonts

public void setUseSystemFonts(boolean enabled)
Parameters:
enabled - set to true if narrow buttons should be used.
See Also:
Options.setUseSystemFonts(boolean)

setFontSizeHints

public void setFontSizeHints(com.jgoodies.looks.FontPolicy fontPolicy)
Parameters:
fontPolicy - the font policy.
See Also:
PlasticLookAndFeel.setFontPolicy(com.jgoodies.looks.FontPolicy)

set3DEnabled

public void set3DEnabled(boolean threeDEnabled)
Parameters:
threeDEnabled - set to true if 3D should be enabled.
See Also:
PlasticLookAndFeel.set3DEnabled(boolean)

setHighContrastFocusColorsEnabled

public void setHighContrastFocusColorsEnabled(boolean highContrastEnabled)
Parameters:
highContrastEnabled - set to true if high contrast should be enabled.
See Also:
PlasticLookAndFeel.setHighContrastFocusColorsEnabled(boolean)

setTabStyle

public void setTabStyle(String tabStyle)
Parameters:
tabStyle - set the tab style that should be used.
See Also:
PlasticLookAndFeel.setTabStyle(String)

setLaFName

public void setLaFName(String laFName)

Set the FQN of the LaF to use. This should be on of:

  • {@link com.jgoodies.looks.Options#PLASTIC_NAME
  • {@link com.jgoodies.looks.Options#PLASTIC3D_NAME
  • {@link com.jgoodies.looks.Options#PLASTICXP_NAME
  • {@link com.jgoodies.looks.Options#JGOODIES_WINDOWS_NAME
  • {@link com.jgoodies.looks.Options#DEFAULT_LOOK_NAME

Default LaF if not specified is Options#PLASTICXP_NAME. Note that you could mention any LaF FQN here, but all other options would then be ignored.

Parameters:
laFName - the FQN of the LaF you want to install on the UIManagerConfigurer.

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception


Copyright © 2004-2009 The Spring Framework. All Rights Reserved.