com.google.gwt.user.cellview.client

## Class CellBasedWidgetImpl

- java.lang.Object
- - com.google.gwt.user.cellview.client.CellBasedWidgetImpl

Direct Known Subclasses:
  CellBasedWidgetImplStandard, CellBasedWidgetImplTrident

    abstract class CellBasedWidgetImpl
    extends java.lang.Object

Implementation used by various cell based widgets.

### Field Summary

Fields
`(package private) java.util.Set<java.lang.String>` `focusableTypes` The set of natively focusable elements.

### Constructor Summary

Constructors
Constructor and Description
`CellBasedWidgetImpl()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static CellBasedWidgetImpl` `get()` Get the singleton instance.
`boolean` `isFocusable(Element elem)` Check if an element is focusable.
`void` `onBrowserEvent(Widget widget, Event event)` Process an event on a target cell.
`SafeHtml` `processHtml(SafeHtml html)` Takes in an html string and processes it, adding support for events.
`void` `resetFocus(Scheduler.ScheduledCommand command)` Reset focus on an element.
`protected int` `sinkEvent(Widget widget, java.lang.String typeName)` Get the event bits to sink for an event type.
`void` `sinkEvents(Widget widget, java.util.Set<java.lang.String> typeNames)` Sink events on the widget.

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

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

### Field Detail

#### focusableTypes

    final java.util.Set<java.lang.String> focusableTypes

The set of natively focusable elements.

### Constructor Detail

#### CellBasedWidgetImpl

    CellBasedWidgetImpl()

### Method Detail

#### get

    public static CellBasedWidgetImpl get()

Get the singleton instance.

Returns:
  the `CellBasedWidgetImpl` instance

#### isFocusable

    public boolean isFocusable(Element elem)

Check if an element is focusable. If an element is focusable, the cell widget should not steal focus from it.

Parameters:
  `elem` - the element
Returns:
  true if the element is focusable, false if not

#### onBrowserEvent

    public void onBrowserEvent(Widget widget,
                               Event event)

Process an event on a target cell.

Parameters:
  `widget` - the `Widget` on which the event occurred
  `event` - the event to handle

#### processHtml

    public SafeHtml processHtml(SafeHtml html)

Takes in an html string and processes it, adding support for events.

Parameters:
  `html` - the html string to process
Returns:
  the processed html string

#### resetFocus

    public void resetFocus(Scheduler.ScheduledCommand command)

Reset focus on an element.

Parameters:
  `command` - the command to execute when resetting focus

#### sinkEvents

    public final void sinkEvents(Widget widget,
                                 java.util.Set<java.lang.String> typeNames)

Sink events on the widget.

Parameters:
  `widget` - the `Widget` that will handle the events
  `typeNames` - the names of the events to sink

#### sinkEvent

    protected int sinkEvent(Widget widget,
                            java.lang.String typeName)

Get the event bits to sink for an event type.

Parameters:
  `widget` - the `Widget` that will handle the events
  `typeName` - the name of the event to sink
Returns:
  the event bits to sink, or -1 if no events to sink