com.google.gwt.user.client.ui
Class Button
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.FocusWidget
com.google.gwt.user.client.ui.ButtonBase
com.google.gwt.user.client.ui.Button
- All Implemented Interfaces:
- EventListener, HasFocus, HasHTML, HasText, SourcesClickEvents, SourcesFocusEvents, SourcesKeyboardEvents
- public class Button
- extends ButtonBase
A standard push-button widget.
CSS Style Rules
Example
code
Constructor Summary |
Button()
Creates a button with no caption. |
Button(String html)
Creates a button with the given HTML caption. |
Button(String html,
ClickListener listener)
Creates a button with the given HTML caption and click listener. |
Method Summary |
void |
click()
Programmatic equivalent of the user clicking the button. |
Methods inherited from class com.google.gwt.user.client.ui.FocusWidget |
addClickListener, addFocusListener, addKeyboardListener, getTabIndex, isEnabled, onBrowserEvent, removeClickListener, removeFocusListener, removeKeyboardListener, setAccessKey, setEnabled, setFocus, setTabIndex |
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 |
Button
public Button()
- Creates a button with no caption.
Button
public Button(String html)
- Creates a button with the given HTML caption.
- Parameters:
html
- the HTML caption
Button
public Button(String html,
ClickListener listener)
- Creates a button with the given HTML caption and click listener.
- Parameters:
html
- the HTML captionlistener
- the click listener
click
public void click()
- Programmatic equivalent of the user clicking the button.
This javadoc distribution was not produced by Google. The official documentation is here.