com.vaadin.client.ui
Class VButton

java.lang.Object
  extended by FocusWidget
      extended by com.vaadin.client.ui.VButton
Direct Known Subclasses:
VColorPicker

public class VButton
extends FocusWidget


Field Summary
 Element captionElement
          For internal use only.
static java.lang.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.
 Element errorIndicatorElement
          For internal use only.
 Icon icon
          For internal use only.
protected  int mousedownX
           
protected  int mousedownY
           
protected static int MOVE_THRESHOLD
           
 Element wrapper
          For internal use only.
 
Constructor Summary
VButton()
           
 
Method Summary
 boolean isEnabled()
           
 void onBrowserEvent(Event event)
           
 void onClick()
          Called internally when the user finishes clicking on this button.
 void onClick(ClickEvent event)
           
 void setEnabled(boolean enabled)
          Sets whether this button is enabled.
 void setHtml(java.lang.String html)
           
 void setStyleName(java.lang.String style)
           
 void setStylePrimaryName(java.lang.String style)
           
 void setTabIndex(int index)
           
 void setText(java.lang.String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
See Also:
Constant Field Values

MOVE_THRESHOLD

protected static int MOVE_THRESHOLD

mousedownX

protected int mousedownX

mousedownY

protected int mousedownY

client

public ApplicationConnection client
For internal use only. May be removed or replaced in the future.


wrapper

public final Element wrapper
For internal use only. May be removed or replaced in the future.


errorIndicatorElement

public Element errorIndicatorElement
For internal use only. May be removed or replaced in the future.


captionElement

public final Element captionElement
For internal use only. May be removed or replaced in the future.


icon

public Icon icon
For internal use only. May be removed or replaced in the future.


clickPending

protected boolean clickPending
Helper flag to handle special-case where the button is moved from under mouse while clicking it. In this case mouse leaves the button without moving.


clickShortcut

public int clickShortcut
For internal use only. May be removed or replaced in the future.

Constructor Detail

VButton

public VButton()
Method Detail

setStyleName

public void setStyleName(java.lang.String style)

setStylePrimaryName

public void setStylePrimaryName(java.lang.String style)

setText

public void setText(java.lang.String text)

setHtml

public void setHtml(java.lang.String html)

onBrowserEvent

public void onBrowserEvent(Event event)

onClick

public void onClick(ClickEvent event)

onClick

public void onClick()
Called internally when the user finishes clicking on this button. The default behavior is to fire the click event to listeners. Subclasses that override #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.


setEnabled

public final void setEnabled(boolean enabled)
Sets whether this button is enabled.

Parameters:
enabled - true to enable the button, false to disable it

isEnabled

public final boolean isEnabled()

setTabIndex

public final void setTabIndex(int index)


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.