public class Button extends ButtonBase
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
DEBUG_ID_PREFIX
Modifier | Constructor and Description |
---|---|
|
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(String html)
Creates a button with the given HTML caption.
|
|
Button(String html,
ClickHandler handler)
Creates a button with the given HTML caption and click listener.
|
|
Button(String html,
ClickListener listener)
Deprecated.
Use
Button(String, ClickHandler) instead |
Modifier and Type | Method and Description |
---|---|
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.
|
getHTML, getText, setHTML, setHTML, setText
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, getTabIndex, isEnabled, onAttach, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setEnabled, setFocus, setTabIndex
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
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
fireEvent
public Button()
public Button(SafeHtml html)
html
- the HTML captionpublic Button(String html)
html
- the HTML caption@Deprecated public Button(String html, ClickListener listener)
Button(String, ClickHandler)
insteadhtml
- the HTML captionlistener
- the click listenerpublic Button(SafeHtml html, ClickHandler handler)
html
- the html captionhandler
- the click handlerpublic Button(String html, ClickHandler handler)
html
- the HTML captionhandler
- the click handlerprotected Button(Element element)
element
- the element to be usedpublic static Button wrap(Element element)
RootPanel.detachNow(Widget)
.element
- the element to be wrappedpublic void click()
protected ButtonElement getButtonElement()
ButtonElement
Copyright © 2016. All rights reserved.