|
|||||||||||
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
Abstract base class for most widgets that can receive keyboard focus.
Field Summary |
Fields inherited from class java.lang.Object |
typeId, typeName |
Constructor Summary | |
protected |
FocusWidget(Element elem)
Creates a new focus component 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. |
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'. |
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 |
getParent, isAttached, onAttach, onDetach, 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 |
protected FocusWidget(Element elem)
Method Detail |
public void addClickListener(ClickListener listener)
SourcesClickEvents
addClickListener
in interface SourcesClickEvents
listener
- the listener interface to addpublic void addFocusListener(FocusListener listener)
SourcesFocusEvents
addFocusListener
in interface SourcesFocusEvents
listener
- the listener interface to addpublic void addKeyboardListener(KeyboardListener listener)
SourcesKeyboardEvents
addKeyboardListener
in interface SourcesKeyboardEvents
listener
- the listener interface to addpublic int getTabIndex()
HasFocus
getTabIndex
in interface HasFocus
public boolean isEnabled()
true
if the widget is enabledpublic void onBrowserEvent(Event event)
EventListener
onBrowserEvent
in interface EventListener
onBrowserEvent
in class Widget
public void removeClickListener(ClickListener listener)
SourcesClickEvents
removeClickListener
in interface SourcesClickEvents
listener
- the listener interface to removepublic void removeFocusListener(FocusListener listener)
SourcesFocusEvents
removeFocusListener
in interface SourcesFocusEvents
listener
- the listener interface to removepublic void removeKeyboardListener(KeyboardListener listener)
SourcesKeyboardEvents
removeKeyboardListener
in interface SourcesKeyboardEvents
listener
- the listener interface to removepublic void setAccessKey(char key)
HasFocus
setAccessKey
in interface HasFocus
key
- 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 HasFocus
focused
- 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 HasFocus
index
- the widget's tab index
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |