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 DefaultFaceRenderer

    java.lang.Object
      com.pietschy.command.face.DefaultFaceRenderer

All Implemented Interfaces:
  FaceRenderer

Direct Known Subclasses:
  MacOSFaceRenderer

    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.

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 context)` Configures the specified button using the specified `RenderContext`.
`protected void` | `configureClientProperties(javax.swing.AbstractButton button, RenderContext buttonContext)`
`protected void` | `configureIcons(javax.swing.AbstractButton button, Face face)`
`void` | `configureMenu(javax.swing.JMenuItem menu, RenderContext context)` Configures the specified button using the specified `RenderContext`.
`protected void` | `configureMnemonic(javax.swing.AbstractButton button, Face face)`
`protected void` | `configureText(javax.swing.AbstractButton button, RenderContext context)` Configures the text attributes of the button.
`protected void` | `configureTextPosition(javax.swing.AbstractButton button, RenderContext context)`
`protected void` | `configureToolTip(javax.swing.AbstractButton button, Face face)` This method
`protected Face` | `getBestFace(RenderContext buttonContext)`
`protected javax.swing.Icon` | `getDefaultGroupIcon()`
`boolean` | `isDisplayTooltipsOnMenus()`
`boolean` | `isHideToobarText()` Checks if toolbar buttons should never display text.
`boolean` | `isPositionToolbarTextBelowIcon()` Checks if text should always be rendered below the icons on toolbars.
`void` | `setDefaultGroupIcon(javax.swing.Icon defaultGroupIcon)`
`void` | `setDisplayTooltipsOnMenus(boolean displayTooltipsOnMenus)`
`void` | `setHideToobarText(boolean hideToobarText)` Configures this render to never render text on toolbar buttons.
`void` | `setPositionToolbarTextBelowIcon(boolean positionToolbarTextBelowIcon)` Configures this renderer to always display toolbar text below the icon.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultFaceRenderer

    public DefaultFaceRenderer()

Method Detail

### isPositionToolbarTextBelowIcon

    public boolean isPositionToolbarTextBelowIcon()

  Description copied from interface: `FaceRenderer`
  Checks if text should always be rendered below the icons on toolbars.

  Specified by:
    `isPositionToolbarTextBelowIcon` in interface `FaceRenderer`
  Returns:
    `true` if the text of toolbar buttons should aways be rendered below the icon, `false` to use the face configuration as is.

### setPositionToolbarTextBelowIcon

    public void setPositionToolbarTextBelowIcon(boolean positionToolbarTextBelowIcon)

  Description copied from interface: `FaceRenderer`
  Configures this renderer to always display toolbar text below the icon.

  Specified by:
    `setPositionToolbarTextBelowIcon` in interface `FaceRenderer`
  Parameters:
    `positionToolbarTextBelowIcon` - `true` to display toolbar text below the icon, `false` to use the face configuration.

### isHideToobarText

    public boolean isHideToobarText()

  Description copied from interface: `FaceRenderer`
  Checks if toolbar buttons should never display text.

  Specified by:
    `isHideToobarText` in interface `FaceRenderer`
  Returns:
    `true` if toolbar buttons should never display text, false if the face normal configuration should be used.

### setHideToobarText

    public void setHideToobarText(boolean hideToobarText)

  Description copied from interface: `FaceRenderer`
  Configures this render to never render text on toolbar buttons.

  Specified by:
    `setHideToobarText` in interface `FaceRenderer`
  Parameters:
    `hideToobarText` - `true` to never render text on toolbar buttons, `false` to use the face configration.

### isDisplayTooltipsOnMenus

    public boolean isDisplayTooltipsOnMenus()

### setDisplayTooltipsOnMenus

    public void setDisplayTooltipsOnMenus(boolean displayTooltipsOnMenus)

### configureButton

    public void configureButton(javax.swing.AbstractButton button,
                                RenderContext context)

  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.
    `context` - the `RenderContext` of the button.

### getBestFace

    protected Face getBestFace(RenderContext buttonContext)
                        throws FaceNotFoundException

  Throws:
    `FaceNotFoundException`

### getDefaultGroupIcon

    protected javax.swing.Icon getDefaultGroupIcon()

### setDefaultGroupIcon

    public void setDefaultGroupIcon(javax.swing.Icon defaultGroupIcon)

### configureMenu

    public void configureMenu(javax.swing.JMenuItem menu,
                              RenderContext context)

  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.
    `context` - the `RenderContext` of the menu.

### configureText

    protected void configureText(javax.swing.AbstractButton button,
                                 RenderContext context)

  Configures the text attributes of the button.

  Parameters:
    `button` - the button to configureMenu.
    `context` -

### configureMnemonic

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

### configureTextPosition

    protected void configureTextPosition(javax.swing.AbstractButton button,
                                         RenderContext context)

### configureToolTip

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

  This method

  Parameters:
    `button` -
    `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)

### configureClientProperties

    protected void configureClientProperties(javax.swing.AbstractButton button,
                                             RenderContext buttonContext)

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