com.google.gwt.cell.client

## Class ButtonCellBase.DefaultAppearance<C>

- java.lang.Object
- - com.google.gwt.cell.client.ButtonCellBase.DefaultAppearance<C>

Type Parameters:
  `C` - the type that this Cell represents

All Implemented Interfaces:
  ButtonCellBase.Appearance<C>

Direct Known Subclasses:
  TextButtonCell.DefaultAppearance

Enclosing class:
  ButtonCellBase<C>

    public static class ButtonCellBase.DefaultAppearance<C>
    extends java.lang.Object
    implements ButtonCellBase.Appearance<C>

The default implementation of the `ButtonCellBase.Appearance`.

### Nested Class Summary

Nested Classes
`static interface` `ButtonCellBase.DefaultAppearance.Resources` The resources used by this appearance.
`static interface` `ButtonCellBase.DefaultAppearance.Style` The Styles used by this appearance.
`(package private) static interface` `ButtonCellBase.DefaultAppearance.Template` The templates used by this appearance.

### Constructor Summary

Constructors
Constructor and Description
`DefaultAppearance(SafeHtmlRenderer<C> renderer)` Construct a new `ButtonCellBase.DefaultAppearance` using the default styles.
`DefaultAppearance(SafeHtmlRenderer<C> renderer, ButtonCellBase.DefaultAppearance.Resources resources)` Construct a new `ButtonCellBase.DefaultAppearance` using the specified resources.

### Method Summary

All Methods Instance Methods Concrete Methods
`SafeHtmlRenderer<C>` `getRenderer()` Return the `SafeHtmlRenderer` used by this Appearance to render the contents of the button.
`void` `onPush(Element parent)` Called when the user pushes the button down.
`void` `onUnpush(Element parent)` Called when the user releases the button from being pushed.
`void` `render(ButtonCellBase<C> cell, Cell.Context context, C value, SafeHtmlBuilder sb)` Render the button and its contents.
`void` `setFocus(Element parent, boolean focused)` Explicitly focus/unfocus this cell.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DefaultAppearance

    public DefaultAppearance(SafeHtmlRenderer<C> renderer)

Construct a new `ButtonCellBase.DefaultAppearance` using the default styles.

Parameters:
  `renderer` - the `SafeHtmlRenderer` used to render the contents

#### DefaultAppearance

    public DefaultAppearance(SafeHtmlRenderer<C> renderer,
                             ButtonCellBase.DefaultAppearance.Resources resources)

Construct a new `ButtonCellBase.DefaultAppearance` using the specified resources.

Parameters:
  `renderer` - the `SafeHtmlRenderer` used to render the contents
  `resources` - the resources and styles to apply to the button

### Method Detail

#### getRenderer

    public SafeHtmlRenderer<C> getRenderer()

Return the `SafeHtmlRenderer` used by this Appearance to render the contents of the button.

Returns:
  a `SafeHtmlRenderer` instance

#### onPush

    public void onPush(Element parent)

Description copied from interface: `ButtonCellBase.Appearance`
Called when the user pushes the button down.

Specified by:
  `onPush` in interface `ButtonCellBase.Appearance<C>`
Parameters:
  `parent` - the parent Element

#### onUnpush

    public void onUnpush(Element parent)

Description copied from interface: `ButtonCellBase.Appearance`
Called when the user releases the button from being pushed.

Specified by:
  `onUnpush` in interface `ButtonCellBase.Appearance<C>`
Parameters:
  `parent` - the parent Element

#### render

    public void render(ButtonCellBase<C> cell,
                       Cell.Context context,
                       C value,
                       SafeHtmlBuilder sb)

Description copied from interface: `ButtonCellBase.Appearance`
Render the button and its contents.

Specified by:
  `render` in interface `ButtonCellBase.Appearance<C>`
Parameters:
  `cell` - the cell that is being rendered
  `context` - the `Context` of the cell
  `value` - the value that generated the content
  `sb` - the `SafeHtmlBuilder` to render into

#### setFocus

    public void setFocus(Element parent,
                         boolean focused)

Description copied from interface: `ButtonCellBase.Appearance`
Explicitly focus/unfocus this cell.

Specified by:
  `setFocus` in interface `ButtonCellBase.Appearance<C>`
Parameters:
  `parent` - the parent element
  `focused` - whether this cell should take focus or release it