|
||||||||||
| 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
com.google.gwt.user.client.ui.ButtonBase
com.google.gwt.user.client.ui.Button
A standard push-button widget.
public class ButtonExample implements EntryPoint {
public void onModuleLoad() {
// Make a new button that does something when you click it.
Button b = new Button("Jump!", new ClickListener() {
public void onClick(Widget sender) {
Window.alert("How high?");
}
});
// Add it to the root panel.
RootPanel.get().add(b);
}
}
| Constructor Summary | |
Button()
Creates a button with no caption. |
|
Button(java.lang.String html)
Creates a button with the given HTML caption. |
|
Button(java.lang.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, removeFromParent |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, 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 |
public Button()
public Button(java.lang.String html)
html - the HTML caption
public Button(java.lang.String html,
ClickListener listener)
html - the HTML captionlistener - the click listener| Method Detail |
public void click()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||