org.pietschy.command

Class DefaultFaceRenderer

Implemented Interfaces:
FaceRenderer
Known Direct 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

Method Summary

protected void
configureAccelerator(JMenuItem menu, Face face)
Safely sets the accelerator for the specified menu.
void
configureButton(AbstractButton button, RenderContext buttonContext)
Configures the specified button using the specified RenderContext.
protected void
configureIcons(AbstractButton button, Face face)
void
configureMenu(JMenuItem menu, RenderContext menuContext)
Configures the specified button using the specified RenderContext.
protected void
configureMnemonic(AbstractButton button, Face face)
protected void
configureText(AbstractButton button, Face face)
Configures the text attributes of the button.
protected void
configureTextPosition(AbstractButton button, Face face)
protected void
configureToolTip(AbstractButton button, Face face)
protected DownArrowIcon
getDefaultGroupIcon()
protected Face
getFace(RenderContext buttonContext)
static void
setDefaultGroupIcon(DownArrowIcon defaultGroupIcon)

Field Details

defaultGroupIcon

public static DownArrowIcon defaultGroupIcon

Method Details

configureAccelerator

protected void configureAccelerator(JMenuItem menu,
                                    Face face)
Safely sets the accelerator for the specified menu.
Parameters:
menu -
face -

configureButton

public void configureButton(AbstractButton button,
                            RenderContext buttonContext)
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.

configureIcons

protected void configureIcons(AbstractButton button,
                              Face face)

configureMenu

public void configureMenu(JMenuItem menu,
                          RenderContext menuContext)
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.

configureMnemonic

protected void configureMnemonic(AbstractButton button,
                                 Face face)

configureText

protected void configureText(AbstractButton button,
                             Face face)
Configures the text attributes of the button.
Parameters:
button - the button to configureMenu.
face -

configureTextPosition

protected void configureTextPosition(AbstractButton button,
                                     Face face)

configureToolTip

protected void configureToolTip(AbstractButton button,
                                Face face)

getDefaultGroupIcon

protected DownArrowIcon getDefaultGroupIcon()

getFace

protected Face getFace(RenderContext buttonContext)

setDefaultGroupIcon

public static void setDefaultGroupIcon(DownArrowIcon defaultGroupIcon)