com.pietschy.command.face
Class MacOSFaceRenderer

java.lang.Object
  extended by com.pietschy.command.face.DefaultFaceRenderer
      extended by com.pietschy.command.face.MacOSFaceRenderer
All Implemented Interfaces:
FaceRenderer

public class MacOSFaceRenderer
extends DefaultFaceRenderer

MacOSFaceRender extends DefaultFaceRenderer to provide Mac specific rendering of buttons and menus. In particular this renderer ensures.


Field Summary
static java.lang.String TOGGLE_TABBED
           
 
Constructor Summary
MacOSFaceRenderer()
           
 
Method Summary
protected  void configureClientProperties(javax.swing.AbstractButton button, RenderContext buttonContext)
           
protected  void configureIcons(javax.swing.AbstractButton button, Face face)
           
protected  void configureMnemonic(javax.swing.AbstractButton button, Face face)
           
static boolean isButtonMnemonicsEnabled()
          Checks if the renderer will be configuring mnemonics on buttons.
static boolean isMenuIconsEnabled()
          Checks if the renderer will be displaying icons on menu items.
static boolean isMenuMnemonicsEnabled()
          Checks if the renderer will be configuring mnemonics on menu items.
 boolean isToolbarContext(RenderContext buttonContext)
          Checks the the current button context is rendering a toolbar.
static void setButtonMnemonicsEnabled(boolean buttonMnemonicsEnabled)
          Sets if the renderer will be configuring mnemonics on buttons.
static void setMenuIconsEnabled(boolean menuIconsEnabled)
          Sets if the renderer will be displaying icons on menu items.
static void setMenuMnemonicsEnabled(boolean menuMnemonicsEnabled)
          Sets if the renderer will be configuring mnemonics on menu items.
protected  boolean shouldDisplayMnemonic(javax.swing.AbstractButton button)
          Returns false.
 
Methods inherited from class com.pietschy.command.face.DefaultFaceRenderer
configureAccelerator, configureButton, configureMenu, configureText, configureTextPosition, configureToolTip, getBestFace, getDefaultGroupIcon, isDisplayTooltipsOnMenus, isHideToobarText, isPositionToolbarTextBelowIcon, setDefaultGroupIcon, setDisplayTooltipsOnMenus, setHideToobarText, setPositionToolbarTextBelowIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOGGLE_TABBED

public static final java.lang.String TOGGLE_TABBED
See Also:
Constant Field Values
Constructor Detail

MacOSFaceRenderer

public MacOSFaceRenderer()
Method Detail

configureClientProperties

protected void configureClientProperties(javax.swing.AbstractButton button,
                                         RenderContext buttonContext)
Overrides:
configureClientProperties in class DefaultFaceRenderer

configureMnemonic

protected void configureMnemonic(javax.swing.AbstractButton button,
                                 Face face)
Overrides:
configureMnemonic in class DefaultFaceRenderer

configureIcons

protected void configureIcons(javax.swing.AbstractButton button,
                              Face face)
Overrides:
configureIcons in class DefaultFaceRenderer

shouldDisplayMnemonic

protected boolean shouldDisplayMnemonic(javax.swing.AbstractButton button)
Returns false.

Parameters:
button - the button to check.
Returns:
false.

isToolbarContext

public boolean isToolbarContext(RenderContext buttonContext)
Checks the the current button context is rendering a toolbar. This simply checks that the parent groups isn't null and that the button face is Face.TOOLBAR.

Parameters:
buttonContext - the RenderContext for the current button.
Returns:
true if the button has a toolbar face and is being rendered as part of a group.

isButtonMnemonicsEnabled

public static boolean isButtonMnemonicsEnabled()
Checks if the renderer will be configuring mnemonics on buttons.

Returns:
true if the buttons mnemonics are enabled, false otherwise.

setButtonMnemonicsEnabled

public static void setButtonMnemonicsEnabled(boolean buttonMnemonicsEnabled)
Sets if the renderer will be configuring mnemonics on buttons.

Parameters:
buttonMnemonicsEnabled - true if the buttons mnemonics are enabled, false otherwise.

isMenuMnemonicsEnabled

public static boolean isMenuMnemonicsEnabled()
Checks if the renderer will be configuring mnemonics on menu items.

Returns:
true if the menu mnemonics are enabled, false otherwise.

setMenuMnemonicsEnabled

public static void setMenuMnemonicsEnabled(boolean menuMnemonicsEnabled)
Sets if the renderer will be configuring mnemonics on menu items.

Parameters:
menuMnemonicsEnabled - true if the menu mnemonics are enabled, false otherwise.

isMenuIconsEnabled

public static boolean isMenuIconsEnabled()
Checks if the renderer will be displaying icons on menu items.

Returns:
true if the menu icons are enabled, false otherwise.

setMenuIconsEnabled

public static void setMenuIconsEnabled(boolean menuIconsEnabled)
Sets if the renderer will be displaying icons on menu items.

Parameters:
menuIconsEnabled - true if the menu icons are enabled, false otherwise.


Copyright © 2006 - 2007 Andrew Pietsch