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

java.lang.Object
  extended bycom.google.gwt.user.client.ui.UIObject
      extended bycom.google.gwt.user.client.ui.Widget
          extended bycom.google.gwt.user.client.ui.Panel
              extended bycom.google.gwt.user.client.ui.SimplePanel
                  extended bycom.google.gwt.user.client.ui.FocusPanel
All Implemented Interfaces:
EventListener, HasFocus, HasWidgets, SourcesClickEvents, SourcesFocusEvents, SourcesKeyboardEvents, SourcesMouseEvents

public class FocusPanel
extends SimplePanel
implements HasFocus, SourcesClickEvents, SourcesMouseEvents

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


Field Summary
 
Fields inherited from class java.lang.Object
typeId, typeName
 
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.
 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 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, clear, getContainerElement, getWidget, getWidgetCount, getWidgetIndex, iterator, remove, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, disown, onAttach, onDetach
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
getParent, isAttached, onLoad
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
equals, finalize, hashCode
 

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

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

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

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


This javadoc distribution was not produced by Google. The official documentation is here.