|
GWT 2.7.0 | |||||||
| 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
public class 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 ClickHandler() {
public void onClick(ClickEvent event) {
Window.alert("How high?");
}
});
// Add it to the root panel.
RootPanel.get().add(b);
}
}
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.Widget |
|---|
eventsToSink |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR |
| Constructor Summary | |
|---|---|
|
Button()
Creates a button with no caption. |
protected |
Button(Element element)
This constructor may be used by subclasses to explicitly use an existing element. |
|
Button(SafeHtml html)
Creates a button with the given HTML caption. |
|
Button(SafeHtml html,
ClickHandler handler)
Creates a button with the given HTML caption and click listener. |
|
Button(java.lang.String html)
Creates a button with the given HTML caption. |
|
Button(java.lang.String html,
ClickHandler handler)
Creates a button with the given HTML caption and click listener. |
|
Button(java.lang.String html,
ClickListener listener)
Deprecated. Use Button(String, ClickHandler) instead |
| Method Summary | |
|---|---|
void |
click()
Programmatic equivalent of the user clicking the button. |
protected ButtonElement |
getButtonElement()
Get the underlying button element. |
static Button |
wrap(Element element)
Creates a Button widget that wraps an existing <button> element. |
| Methods inherited from class com.google.gwt.user.client.ui.ButtonBase |
|---|
getHTML, getText, setHTML, setHTML, setText |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, sinkEvents, unsinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public Button()
public Button(SafeHtml html)
html - the HTML captionpublic Button(java.lang.String html)
html - the HTML caption
@Deprecated
public Button(java.lang.String html,
ClickListener listener)
Button(String, ClickHandler) instead
html - the HTML captionlistener - the click listener
public Button(SafeHtml html,
ClickHandler handler)
html - the html captionhandler - the click handler
public Button(java.lang.String html,
ClickHandler handler)
html - the HTML captionhandler - the click handlerprotected Button(Element element)
element - the element to be used| Method Detail |
|---|
public static Button wrap(Element element)
RootPanel.detachNow(Widget).
element - the element to be wrappedpublic void click()
protected ButtonElement getButtonElement()
ButtonElement
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||