org.pietschy.command
Class DefaultFaceRenderer

java.lang.Object
  extended by org.pietschy.command.DefaultFaceRenderer
All Implemented Interfaces:
FaceRenderer
Direct Known Subclasses:
MacFaceRenderer

public class DefaultFaceRenderer
extends java.lang.Object
implements FaceRenderer

The DefaultFaceRender provides the base methods for configuring buttons and menus as well as a standard implementation that is suitable for most platforms.


Field Summary
static DownArrowIcon defaultGroupIcon
           
 
Constructor Summary
DefaultFaceRenderer()
           
 
Method Summary
protected  void configureAccelerator(javax.swing.JMenuItem menu, Face face)
          Safely sets the accelerator for the specified menu.
 void configureButton(javax.swing.AbstractButton button, RenderContext buttonContext)
          Configures the specified button using the specified RenderContext.
protected  void configureIcons(javax.swing.AbstractButton button, Face face)
           
 void configureMenu(javax.swing.JMenuItem menu, RenderContext menuContext)
          Configures the specified button using the specified RenderContext.
protected  void configureMnemonic(javax.swing.AbstractButton button, Face face)
           
protected  void configureText(javax.swing.AbstractButton button, Face face)
          Configures the text attributes of the button.
protected  void configureTextPosition(javax.swing.AbstractButton button, Face face)
           
protected  void configureToolTip(javax.swing.AbstractButton button, Face face)
           
protected  DownArrowIcon getDefaultGroupIcon()
           
protected  Face getFace(RenderContext buttonContext)
           
static void setDefaultGroupIcon(DownArrowIcon defaultGroupIcon)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultGroupIcon

public static DownArrowIcon defaultGroupIcon
Constructor Detail

DefaultFaceRenderer

public DefaultFaceRenderer()
Method Detail

configureButton

public void configureButton(javax.swing.AbstractButton button,
                            RenderContext buttonContext)
Description copied from interface: FaceRenderer
Configures the specified button using the specified RenderContext.

Specified by:
configureButton in interface FaceRenderer
Parameters:
button - the button to configure.
buttonContext - the RenderContext of the button.

getFace

protected Face getFace(RenderContext buttonContext)

getDefaultGroupIcon

protected DownArrowIcon getDefaultGroupIcon()

setDefaultGroupIcon

public static void setDefaultGroupIcon(DownArrowIcon defaultGroupIcon)

configureMenu

public void configureMenu(javax.swing.JMenuItem menu,
                          RenderContext menuContext)
Description copied from interface: FaceRenderer
Configures the specified button using the specified RenderContext.

Specified by:
configureMenu in interface FaceRenderer
Parameters:
menu - the menu to configure.
menuContext - the RenderContext of the menu.

configureText

protected void configureText(javax.swing.AbstractButton button,
                             Face face)
Configures the text attributes of the button.

Parameters:
button - the button to configureMenu.
face -

configureTextPosition

protected void configureTextPosition(javax.swing.AbstractButton button,
                                     Face face)

configureMnemonic

protected void configureMnemonic(javax.swing.AbstractButton button,
                                 Face face)

configureToolTip

protected void configureToolTip(javax.swing.AbstractButton button,
                                Face face)

configureAccelerator

protected void configureAccelerator(javax.swing.JMenuItem menu,
                                    Face face)
Safely sets the accelerator for the specified menu.

Parameters:
menu -
face -

configureIcons

protected void configureIcons(javax.swing.AbstractButton button,
                              Face face)