|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.FocusWidget
public abstract class FocusWidget
Abstract base class for most widgets that can receive keyboard focus.
| Constructor Summary | |
|---|---|
protected |
FocusWidget()
Creates a new focus widget with no element. |
protected |
FocusWidget(Element elem)
Creates a new focus widget that wraps the specified browser element. |
| 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. |
protected static com.google.gwt.user.client.ui.impl.FocusImpl |
getFocusImpl()
Gets the FocusImpl instance. |
int |
getTabIndex()
Gets the widget's position in the tab index. |
boolean |
isEnabled()
Gets whether this widget is enabled. |
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 |
setAccessKey(char key)
Sets the widget's 'access key'. |
protected void |
setElement(Element elem)
Sets this object's browser element. |
void |
setEnabled(boolean enabled)
Sets whether this widget is enabled. |
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.Widget |
|---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, 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 |
|---|
protected FocusWidget()
setElement(Element)
must be called before any other methods.
protected FocusWidget(Element elem)
elem - the element to be wrapped| Method Detail |
|---|
protected static com.google.gwt.user.client.ui.impl.FocusImpl getFocusImpl()
public void addClickListener(ClickListener listener)
SourcesClickEvents
addClickListener in interface SourcesClickEventslistener - the listener interface to addpublic void addFocusListener(FocusListener listener)
SourcesFocusEvents
addFocusListener in interface SourcesFocusEventslistener - the listener interface to addpublic void addKeyboardListener(KeyboardListener listener)
SourcesKeyboardEvents
addKeyboardListener in interface SourcesKeyboardEventslistener - the listener interface to addpublic int getTabIndex()
HasFocus
getTabIndex in interface HasFocuspublic boolean isEnabled()
true if the widget is enabledpublic void onBrowserEvent(Event event)
EventListener
onBrowserEvent in interface EventListeneronBrowserEvent in class Widgetevent - the event receivedpublic void removeClickListener(ClickListener listener)
SourcesClickEvents
removeClickListener in interface SourcesClickEventslistener - the listener interface to removepublic void removeFocusListener(FocusListener listener)
SourcesFocusEvents
removeFocusListener in interface SourcesFocusEventslistener - the listener interface to removepublic void removeKeyboardListener(KeyboardListener listener)
SourcesKeyboardEvents
removeKeyboardListener in interface SourcesKeyboardEventslistener - the listener interface to removepublic void setAccessKey(char key)
HasFocus
setAccessKey in interface HasFocuskey - the widget's access keypublic void setEnabled(boolean enabled)
enabled - true to enable the widget, false
to disable itpublic void setFocus(boolean focused)
HasFocus
setFocus in interface HasFocusfocused - whether this widget should take focus or release itpublic void setTabIndex(int index)
HasFocus-1 will cause this widget to
be removed from the tab order.
setTabIndex in interface HasFocusindex - the widget's tab indexprotected void setElement(Element elem)
Widget
setElement in class Widgetelem - the object's new element
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||