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

## com.google.gwt.user.client.ui
Class FocusPanel

    java.lang.Object
      com.google.gwt.user.client.ui.UIObject
          com.google.gwt.user.client.ui.Widget
              com.google.gwt.user.client.ui.Panel
                  com.google.gwt.user.client.ui.SimplePanel
                      com.google.gwt.user.client.ui.FocusPanel

All Implemented Interfaces:
  EventListener, HasFocus, HasWidgets, SourcesClickEvents, SourcesFocusEvents, SourcesKeyboardEvents, SourcesMouseEvents, SourcesMouseWheelEvents, java.lang.Iterable<Widget>

    public class FocusPanel

extends SimplePanel
implements HasFocus, SourcesClickEvents, SourcesMouseEvents, SourcesMouseWheelEvents

A simple panel that makes its contents focusable, and adds the ability to catch mouse and keyboard events.

Nested Class Summary

Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
`UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled`

Field Summary

Fields inherited from class com.google.gwt.user.client.ui.UIObject
`DEBUG_ID_PREFIX`

Constructor Summary
`FocusPanel()`
`FocusPanel(Widget child)`

Method Summary
`void` | `addClickListener(ClickListener listener)` Adds a listener interface to receive click events.
`void` | `addFocusListener(FocusListener listener)` Adds a listener interface to receive mouse events.
`void` | `addKeyboardListener(KeyboardListener listener)` Adds a listener interface to receive keyboard events.
`void` | `addMouseListener(MouseListener listener)` Adds a listener interface to receive mouse events.
`void` | `addMouseWheelListener(MouseWheelListener listener)` Adds a listener interface to receive mouse events.
`int` | `getTabIndex()` Gets the widget's position in the tab index.
`void` | `onBrowserEvent(Event event)` Fired whenever a browser event is received.
`void` | `removeClickListener(ClickListener listener)` Removes a previously added listener interface.
`void` | `removeFocusListener(FocusListener listener)` Removes a previously added listener interface.
`void` | `removeKeyboardListener(KeyboardListener listener)` Removes a previously added listener interface.
`void` | `removeMouseListener(MouseListener listener)` Removes a previously added listener interface.
`void` | `removeMouseWheelListener(MouseWheelListener listener)` Removes a previously added listener interface.
`void` | `setAccessKey(char key)` Sets the widget's 'access key'.
`void` | `setFocus(boolean focused)` Explicitly focus/unfocus this widget.
`void` | `setTabIndex(int index)` Sets the widget's position in the tab index.

Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
`add, getContainerElement, getWidget, iterator, remove, setWidget`

Methods inherited from class com.google.gwt.user.client.ui.Panel
`adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan`

Methods inherited from class com.google.gwt.user.client.ui.Widget
`getParent, isAttached, onAttach, onDetach, removeFromParent`

Methods inherited from class com.google.gwt.user.client.ui.UIObject
`addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents`

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

Constructor Detail

### FocusPanel

    public FocusPanel()

### FocusPanel

    public FocusPanel(Widget child)

Method Detail

### addClickListener

    public void addClickListener(ClickListener listener)

  Description copied from interface: `SourcesClickEvents`
  Adds a listener interface to receive click events.

  Specified by:
    `addClickListener` in interface `SourcesClickEvents`
  Parameters:
    `listener` - the listener interface to add

### addFocusListener

    public void addFocusListener(FocusListener listener)

  Description copied from interface: `SourcesFocusEvents`
  Adds a listener interface to receive mouse events.

  Specified by:
    `addFocusListener` in interface `SourcesFocusEvents`
  Parameters:
    `listener` - the listener interface to add

### addKeyboardListener

    public void addKeyboardListener(KeyboardListener listener)

  Description copied from interface: `SourcesKeyboardEvents`
  Adds a listener interface to receive keyboard events.

  Specified by:
    `addKeyboardListener` in interface `SourcesKeyboardEvents`
  Parameters:
    `listener` - the listener interface to add

### addMouseListener

    public void addMouseListener(MouseListener listener)

  Description copied from interface: `SourcesMouseEvents`
  Adds a listener interface to receive mouse events.

  Specified by:
    `addMouseListener` in interface `SourcesMouseEvents`
  Parameters:
    `listener` - the listener interface to add

### addMouseWheelListener

    public void addMouseWheelListener(MouseWheelListener listener)

  Description copied from interface: `SourcesMouseWheelEvents`
  Adds a listener interface to receive mouse events.

  Specified by:
    `addMouseWheelListener` in interface `SourcesMouseWheelEvents`
  Parameters:
    `listener` - the listener interface to add

### getTabIndex

    public int getTabIndex()

  Description copied from interface: `HasFocus`
  Gets the widget's position in the tab index.

  Specified by:
    `getTabIndex` in interface `HasFocus`
  Returns:
    the widget's tab index

### onBrowserEvent

    public void onBrowserEvent(Event event)

  Description copied from interface: `EventListener`
  Fired whenever a browser event is received.

  Specified by:
    `onBrowserEvent` in interface `EventListener`
  Overrides:
    `onBrowserEvent` in class `Widget`
  Parameters:
    `event` - the event received

### removeClickListener

    public void removeClickListener(ClickListener listener)

  Description copied from interface: `SourcesClickEvents`
  Removes a previously added listener interface.

  Specified by:
    `removeClickListener` in interface `SourcesClickEvents`
  Parameters:
    `listener` - the listener interface to remove

### removeFocusListener

    public void removeFocusListener(FocusListener listener)

  Description copied from interface: `SourcesFocusEvents`
  Removes a previously added listener interface.

  Specified by:
    `removeFocusListener` in interface `SourcesFocusEvents`
  Parameters:
    `listener` - the listener interface to remove

### removeKeyboardListener

    public void removeKeyboardListener(KeyboardListener listener)

  Description copied from interface: `SourcesKeyboardEvents`
  Removes a previously added listener interface.

  Specified by:
    `removeKeyboardListener` in interface `SourcesKeyboardEvents`
  Parameters:
    `listener` - the listener interface to remove

### removeMouseListener

    public void removeMouseListener(MouseListener listener)

  Description copied from interface: `SourcesMouseEvents`
  Removes a previously added listener interface.

  Specified by:
    `removeMouseListener` in interface `SourcesMouseEvents`
  Parameters:
    `listener` - the listener interface to remove

### removeMouseWheelListener

    public void removeMouseWheelListener(MouseWheelListener listener)

  Description copied from interface: `SourcesMouseWheelEvents`
  Removes a previously added listener interface.

  Specified by:
    `removeMouseWheelListener` in interface `SourcesMouseWheelEvents`
  Parameters:
    `listener` - the listener interface to remove

### setAccessKey

    public void setAccessKey(char key)

  Description copied from interface: `HasFocus`
  Sets the widget's 'access key'. This key is used (in conjunction with a browser-specific modifier key) to automatically focus the widget.

  Specified by:
    `setAccessKey` in interface `HasFocus`
  Parameters:
    `key` - the widget's access key

### setFocus

    public void setFocus(boolean focused)

  Description copied from interface: `HasFocus`
  Explicitly focus/unfocus this widget. Only one widget can have focus at a time, and the widget that does will receive all keyboard events.

  Specified by:
    `setFocus` in interface `HasFocus`
  Parameters:
    `focused` - whether this widget should take focus or release it

### setTabIndex

    public void setTabIndex(int index)

  Description copied from interface: `HasFocus`
  Sets the widget's position in the tab index. If more than one widget has the same tab index, each such widget will receive focus in an arbitrary order. Setting the tab index to `-1` will cause this widget to be removed from the tab order.

  Specified by:
    `setTabIndex` in interface `HasFocus`
  Parameters:
    `index` - the widget's tab index

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