Google Web Toolkit (Beta)
Search this site:

# Class ButtonBase

public class ButtonBase
extends FocusWidget
implements HasHTML
// Superclass of `CustomButton`, `CheckBox`, `Button`
Abstract base class for Button, CheckBox, RadioButton.

## Constructors

ButtonBase(Element) | Creates a new ButtonBase that wraps the given browser element.

## Methods

getHTML() | Gets this object's contents as HTML.
getText() | Gets this object's text.
setHTML(String) | Sets this object's contents via HTML.
setText(String) | Sets this object's text.

## Constructor Detail

### ButtonBase

protected ButtonBase(Element elem)
Creates a new ButtonBase that wraps the given browser element.

#### Parameters

elem
  the DOM element to be wrapped

## Method Detail

### getHTML

public String getHTML()
Gets this object's contents as HTML.

#### Return Value

the object's HTML

### getText

public String getText()
Gets this object's text.

#### Return Value

the object's text

### setHTML

public void setHTML(String html)
Sets this object's contents via HTML. Use care when setting an object's HTML; it is an easy way to expose script-based security problems. Consider using setText(String) whenever possible.

#### Parameters

html
  the object's new HTML

### setText

public void setText(String text)
Sets this object's text.

#### Parameters

text
  the object's new text