public class VButton
extends com.google.gwt.user.client.ui.FocusWidget
implements com.google.gwt.event.dom.client.ClickHandler
Modifier and Type | Field and Description |
---|---|
com.google.gwt.dom.client.Element |
captionElement
For internal use only.
|
static String |
CLASSNAME |
protected boolean |
clickPending
Helper flag to handle special-case where the button is moved from under
mouse while clicking it.
|
int |
clickShortcut
For internal use only.
|
ApplicationConnection |
client
For internal use only.
|
com.google.gwt.dom.client.Element |
errorIndicatorElement
For internal use only.
|
Icon |
icon
For internal use only.
|
protected int |
mousedownX |
protected int |
mousedownY |
protected static int |
MOVE_THRESHOLD |
com.google.gwt.dom.client.Element |
wrapper
For internal use only.
|
Constructor and Description |
---|
VButton() |
Modifier and Type | Method and Description |
---|---|
boolean |
isEnabled() |
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
void |
onClick()
Called internally when the user finishes clicking on this button.
|
void |
onClick(com.google.gwt.event.dom.client.ClickEvent event) |
void |
setEnabled(boolean enabled)
Sets whether this button is enabled.
|
void |
setHtml(String html) |
void |
setStyleName(String style) |
void |
setStylePrimaryName(String style) |
void |
setTabIndex(int index) |
void |
setText(String text) |
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, onAttach, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setFocus
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, 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, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
public static final String CLASSNAME
protected static int MOVE_THRESHOLD
protected int mousedownX
protected int mousedownY
public ApplicationConnection client
public final com.google.gwt.dom.client.Element wrapper
public com.google.gwt.dom.client.Element errorIndicatorElement
public final com.google.gwt.dom.client.Element captionElement
public Icon icon
protected boolean clickPending
public int clickShortcut
public void setStyleName(String style)
setStyleName
in class com.google.gwt.user.client.ui.UIObject
public void setStylePrimaryName(String style)
setStylePrimaryName
in class com.google.gwt.user.client.ui.UIObject
public void setText(String text)
public void setHtml(String html)
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent
in interface com.google.gwt.user.client.EventListener
onBrowserEvent
in class com.google.gwt.user.client.ui.Widget
public void onClick(com.google.gwt.event.dom.client.ClickEvent event)
onClick
in interface com.google.gwt.event.dom.client.ClickHandler
public void onClick()
#onClickStart()
should override this method to restore
the normal widget display.
To add custom code for a click event, override
onClick(ClickEvent)
instead of this.
For internal use only. May be removed or replaced in the future.
public final void setEnabled(boolean enabled)
setEnabled
in interface com.google.gwt.user.client.ui.HasEnabled
setEnabled
in class com.google.gwt.user.client.ui.FocusWidget
enabled
- true
to enable the button, false
to
disable itpublic final boolean isEnabled()
isEnabled
in interface com.google.gwt.user.client.ui.HasEnabled
isEnabled
in class com.google.gwt.user.client.ui.FocusWidget
public final void setTabIndex(int index)
setTabIndex
in interface com.google.gwt.user.client.ui.Focusable
setTabIndex
in class com.google.gwt.user.client.ui.FocusWidget
Copyright © 2019 Vaadin Ltd. All rights reserved.