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

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.FocusWidget
              extended bycom.google.gwt.user.client.ui.ButtonBase
                  extended bycom.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


Field Summary
 
Fields inherited from class java.lang.Object
typeId, typeName
 
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.ButtonBase
getHTML, getText, setHTML, setText
 
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.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

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 caption
listener - the click listener
Method Detail

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.