Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.pietschy.command.face
Class MacOSFaceRenderer

    java.lang.Object
      com.pietschy.command.face.DefaultFaceRenderer
          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.

- icons are not rendered on menus
- mnemonics on buttons and menus are ignored
- quaqua client properties are set correctly for buttons created by ToggleGroup members.

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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 - 2007 Andrew Pietsch